Interview questions
Predict the result, find the errors, explain the solution. You can read the questions without an account.
10 questions
What does
5 + NULLreturn?Predict the resultFrom interview write-ups: T-BankWill
manager_id = NULLfind an employee with no manager?Predict the resultWhat do
COUNT(*)andSUMreturn for a department with no employees?Predict the resultWhat do
COUNT(*),COUNT(x), andCOUNT(DISTINCT x)return?Predict the resultFind the bugs: employees missing a department or salary
Find the errorsWhat does
COALESCEreturn when a customer's city is missing?Predict the resultHow does
CASEclassify an employee with a missing salary?Predict the resultWhat does
NULLIFreturn for employee salaries?Predict the resultFind the bugs: listing customers from Berlin
Find the errors