Lesson 6 of 30 · Querying Basics
Quiz: SQL Querying Basics
You can now ask a database real questions: pick and rename columns with SELECT and AS, calculate new values, filter rows with WHERE, AND, OR and parentheses, match patterns, lists and ranges with LIKE, IN and BETWEEN, handle missing values with IS NULL, and sort and page through results with ORDER BY, LIMIT and OFFSET.
Answer these six questions before you face the chapter boss. Read every explanation, even for the questions you get right — each one points at a detail that trips up beginners.
What this quiz covers
The questions check what you learned in the Querying Basics chapter of Learn SQL. Not sure about a topic? Review its lesson first:
- SQL SELECT: Your First Query
Write your first SQL query with SELECT and FROM, read a table in a real SQLite database right in your browser, and see the result instantly.
- SQL SELECT Columns: Choose, Rename with AS and Calculate
Pick exactly the columns you need in SQL, set their order, rename them with AS aliases and calculate new values like price * 3 in a real database.
- SQL WHERE: Filter Rows with Conditions
Filter rows in SQL with WHERE. Compare values with =, <>, < and >, combine conditions with AND, OR and NOT, and group them with parentheses.
- SQL ORDER BY and LIMIT: Sort Results and Page Through Rows
Sort SQL results with ORDER BY, ASC and DESC, sort by several columns, and return just the rows you need with LIMIT and OFFSET.
- SQL LIKE, IN, BETWEEN and IS NULL: Patterns, Lists and Ranges
Match text patterns with SQL LIKE and its wildcards, test lists with IN and ranges with BETWEEN, and find missing values with IS NULL.
Keep learning
Need a quick reminder? The SQL cheat sheet has every topic of Learn SQL on one page.
Lesson last updated on .