Courses
SQL for Beginners: Ask Your Data Straight Questions
Final Check: SQL for Beginners
Fifteen scenario questions across the whole course. If you get twelve or more right, you can read a small database, change it safely and combine its tables without silent mistakes.
Course content
Join this Course
Sign in to save your progress.
-
Before You Write a Query
-
What a Relational Database Is and Why SQL Exists
-
Set Up PostgreSQL and Run Your First Query
-
-
-
Asking for Rows
-
SELECT, WHERE, ORDER BY and LIMIT
-
NULL Is Not a Value
-
-
-
Building and Changing Data
-
CREATE TABLE: Types and Constraints That Matter
-
INSERT, UPDATE and DELETE Without Regret
-
-
-
Summaries
-
COUNT, SUM and AVG
-
GROUP BY and HAVING
-
-
-
Combining Tables
-
Primary Keys, Foreign Keys and Why Tables Are Split
-
INNER JOIN and LEFT JOIN
-
When a Join Gives Too Many Rows or Too Few
-
-
- Final Check: SQL for Beginners
1.
A table needs a primary key for people, and you can choose an email address or a number the database creates. Which is better, and why?
2.
A colleague posts a query written for SQL Server that uses SELECT TOP 5. How do you limit rows to five in PostgreSQL?
3.
You page through products with LIMIT 3 OFFSET 3 and no ORDER BY, and page 2 repeats a row from page 1. What is the fix?
4.
The product Gel Pen exists. SELECT name FROM products WHERE name LIKE 'g%' returns nothing in PostgreSQL. Why, and what would match it?
5.
You write WHERE city NOT IN ('Cebu', NULL) and get zero rows, though many customers live elsewhere. What is the cause?
6.
A report must show every customer, with the text unknown where the city is missing, without changing the data. Which expression does it?
7.
A table has CHECK (percent_off BETWEEN 1 AND 100). What happens to INSERT ... VALUES ('BIGSALE', 150)?
8.
You store product prices in a double precision column, and a total is off by a fraction of a cent. What is the best fix?
9.
You are about to run UPDATE products SET price = price * 2 on a database you care about. What is the safest way to try it?
10.
In a table of 20 rows, 5 have a NULL in the column score. What do count(*) and count(score) return?
11.
You need customers who placed at least 3 orders that were not cancelled. Which query is correct?
12.
SELECT city, count(*) FROM customers GROUP BY city returns four rows, one with an empty city. What is that row?
13.
You want every customer listed with the number of orders they placed, and customers with no orders must show 0. Which join do you start from?
14.
You write FROM customers, orders and forget the matching condition. What do you get from 8 customers and 12 orders, and how would you have caught it?
15.
A query copied from an old MySQL answer selects customer_id, status and count(*) but groups only by customer_id. It ran there, and PostgreSQL stops it with an error. What does PostgreSQL want?
About
Fifteen scenario questions across the whole course. If you get twelve or more right, you can read a small database, change it safely and combine its tables without silent mistakes.
- Duration
- 15 min
- Last update
- 10/01/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.