Help Center> GaussDB(DWS)> Developer Guide> Data Read> Querying a Single Table
Updated on 2023-10-31 GMT+08:00

Querying a Single Table

Example table:

Simple Queries

Run the SELECT... FROM... statement to obtain the result from the database.

Filtering Test Results

Run the WHERE statement to filter the query result and find the queried part.

Sorting Results

Use the ORDER BY statement to sort query results.

Limiting the Number of Query Results

If you want the query to return only part of the result, you can use the LIMIT statement to limit the number of records returned in the query result.

Aggregated Query

If you want query data comprehensively, you can use the GROUP BY statement and aggregate functions to construct an aggregated query.