Interview questions
Predict the result, find the errors, explain the solution. You can read the questions without an account.
9 questions
Which duplicates does
GROUP BY … HAVING COUNT(*) > 1find?Predict the resultWill
LIMIT 1 OFFSET 1return the second-highest salary?Predict the resultFind the bugs: Count distinct events per user
Find the errorsWhich events will a query with
LIMITandOFFSETreturn?Predict the resultWhat remains after applying
UNION DISTINCTto two tables?Predict the resultFind the bugs: Deduplicating an event log
Find the errorsWhich row will
ROW_NUMBERkeep for each product?Predict the resultWhich city and order status pairs will
DISTINCTkeep?Predict the result