Skip to content
skillbld
Day 3 of 14 30 minSELECTWHEREORDER BYLIMIT

Ask your data questions. Choose columns, filter rows with WHERE, sort with ORDER BY, page with LIMIT, and compute new values on the fly.

By the end of today you can

  • Select specific columns and rename them with AS
  • Filter rows with WHERE and comparison operators
  • Sort results with ORDER BY, ascending or descending
  • Limit and page through results with LIMIT and OFFSET
  • Remove duplicates with DISTINCT and compute expressions

What's inside

  • 8 sections
  • 3 diagrams and mind maps
  • 7 code examples you can run
  • 4-question quiz
  1. 1The shape of a query
  2. 2Choose columns
  3. 3Filter rows with WHERE
  4. 4Sort with ORDER BY
  5. 5LIMIT and OFFSET
  6. 6Calculated columns and aliases
  7. 7DISTINCT: unique values
  8. 8The order PostgreSQL runs a query

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free
Day 3: Querying with SELECT · PostgreSQL · SkillBld