Your Library
Chapter 3 · Query FundamentalsChoose columns, filter rows, and shape results
Contents
Chapter 2

Query Fundamentals

Choose columns, filter rows, and shape results

Reading data is at the core of SQL. A query specifies which table to read, which columns to return, which rows to keep, and how to order the result.

This chapter introduces SELECT, FROM, WHERE, operators, ORDER BY, row limits, DISTINCT, and aliases. Examples use broadly supported SQL unless a dialect is identified; details such as row-limit syntax and integer division vary between database systems.

In this chapter

  1. 2.1Query Fundamentals