# SELECT, filtering and sorting

> A query clause that specifies values to return.

Course: [SQL and relational databases](https://studybrix.com/en/courses/sql-databases/index.md)
Level: university
Prerequisites: Basic computing and simple data tables.

## Notes

### SELECT

A query clause that specifies values to return.

### WHERE

A clause that filters rows using a condition.

### ORDER BY

A clause that defines the requested result ordering.

### Aggregate

A calculation such as COUNT or SUM that summarizes multiple rows.

## Practice questions

### 1. Which term best matches this description: A query clause that specifies values to return.

A. ORDER BY
B. Aggregate
C. SELECT
D. WHERE

Answer: SELECT

Explanation: SELECT is the matching concept in this lesson.

### 2. Which term best matches this description: A clause that filters rows using a condition.

A. WHERE
B. SELECT
C. ORDER BY
D. Aggregate

Answer: WHERE

Explanation: WHERE is the matching concept in this lesson.

### 3. Which concept would you apply first in a situation where a clause that defines the requested result ordering.

A. Aggregate
B. WHERE
C. SELECT
D. ORDER BY

Answer: ORDER BY

Explanation: The scenario directly calls for ORDER BY.

### 4. Name the concept described as: A calculation such as COUNT or SUM that summarizes multiple rows.

Answer: Aggregate

Explanation: The intended concept is Aggregate.

### 5. Which statement about SELECT is most accurate?

A. A calculation such as COUNT or SUM that summarizes multiple rows.
B. A clause that defines the requested result ordering.
C. A clause that filters rows using a condition.
D. A query clause that specifies values to return.

Answer: A query clause that specifies values to return.

Explanation: The definition in the lesson notes gives the required condition.

### 6. Explain one important difference between SELECT and WHERE.

Sample answer / marking guidance: SELECT: A query clause that specifies values to return. WHERE: A clause that filters rows using a condition.

Explanation: Credit a clear distinction using both definitions and an appropriate example if supplied.

### 7. Give a short example showing how ORDER BY would be used in practice.

Sample answer / marking guidance: A valid example should demonstrate this idea: A clause that defines the requested result ordering.

Explanation: Credit a relevant scenario that applies the concept rather than merely naming it.

### 8. Summarize why Aggregate matters in the lesson “SELECT, filtering and sorting”.

Sample answer / marking guidance: Aggregate matters because A calculation such as COUNT or SUM that summarizes multiple rows.

Explanation: Credit the core purpose, scope and any important limitation from the notes.

## Further reading

- https://www.postgresql.org/docs/

Original AI-assisted educational draft; not independently teacher-reviewed. References support further study, not copied exercises, affiliation or curriculum accreditation.
