147 B
147 B
Comparisons vs. Functions
- Improve the following query
SELECT count(*)
FROM shawarma_purchases
WHERE
YEAR(purchased_at) == '2017'
SELECT count(*)
FROM shawarma_purchases
WHERE
YEAR(purchased_at) == '2017'