SQL quiz.
Table orders has a column customer with the values Ana, Ben, Ana, NULL, NULL.
How many rows does this query return?
SELECT customer, COUNT(*)
FROM orders
GROUP BY customer;
SQL quiz.
Table a has a column x with the values 1, 2, 2.
Table b has a column x with the values 2, 3.
What's the output of this query?
SELECT COUNT(*) FROM (
SELECT x FROM a
UNION
SELECT x FROM b
) t;