THE JOB TESTS · SASFLYNET KFT. · FREE PRACTICE GUIDE
Practise SELECT, filtering, grouping and joins with fictional data. Examples use common PostgreSQL-compatible SQL. This is a knowledge practice set, not a coding assessment.
This original 12-question practice set describes only the sampled questions. It is not a validated proficiency level, aptitude percentile, language certificate or hiring recommendation. All examples and data are fictional.
Create a fictional orders table in a local practice database. Select specific columns, filter one status and order results by a numeric amount.
Use three North and South orders. Compare COUNT(*), COUNT(column) and grouped SUM; verify each result against the source rows.
Create two customers and one matching order. Compare an inner join with a left join and inspect the unmatched customer before adding another order.
Try one changed example from each topic without the guide. Repeating the same questions can reflect familiarity; use a new example to check transfer.
My answer and reasoning:
SELECT name FROM employees;
SELECT specifies the requested columns; FROM names the source table.
My answer and reasoning:
WHERE
WHERE selects rows that satisfy a condition before aggregation.
My answer and reasoning:
SELECT amount FROM orders ORDER BY amount DESC;
ORDER BY amount DESC requests descending order. Without ORDER BY, row order is not guaranteed.
My answer and reasoning:
WHERE note IS NULL
NULL is tested with IS NULL. Equality to NULL does not behave like equality to an ordinary value.
My answer and reasoning:
2
COUNT(expression) counts non-null expression values: 10 and 20.
My answer and reasoning:
3
COUNT(*) counts rows, including the row with a null amount.
My answer and reasoning:
30
The North rows contribute 10 + 20 = 30. The South row belongs to a different group.
My answer and reasoning:
HAVING SUM(amount) > 100
HAVING applies conditions to grouped results; WHERE applies to source rows.
My answer and reasoning:
Customers LEFT JOIN orders on matching customer ID
A left join preserves every left-side customer; unmatched right-side columns are null.
My answer and reasoning:
3
A one-to-many relationship produces one result row per matching pair, here three.
My answer and reasoning:
Duplicate region values from the result
DISTINCT removes duplicate selected rows in the output. It does not delete source records or guarantee ordering.
My answer and reasoning:
It removes them from the result
Unmatched rows have a null right-side order ID. The WHERE condition rejects those rows.
This worksheet sends no entries to us. Print or save it as PDF from your browser. Return to the free test.