← All topics
Quiz: Checking AI-Written SQL: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Why is wrong SQL often more dangerous than wrong Python?
- Q2. "List every student with their submission count" returns 3 rows, but there are 5 students. What is the most likely cause?
- Q3. What does this print? (code)
- Q4. Why does WHERE branch != 'CSE' leave out a student whose branch is NULL?
- Q5. What does this print? (code)
- Q6. A student has 2 payments and 3 submissions. Joining both tables to the student and taking SUM(amount) adds each payment how many times?
- Q7. What is a correct fix for join fan-out?
- Q8. Which is the safe way to use a user-typed name in a query?
- Q9. What does this print? (code)
- Q10. Before running an AI-written DELETE ... WHERE ... on real data, what should you do?