🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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 →
  1. Q1. Why is wrong SQL often more dangerous than wrong Python?
  2. Q2. "List every student with their submission count" returns 3 rows, but there are 5 students. What is the most likely cause?
  3. Q3. What does this print? (code)
  4. Q4. Why does WHERE branch != 'CSE' leave out a student whose branch is NULL?
  5. Q5. What does this print? (code)
  6. 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?
  7. Q7. What is a correct fix for join fan-out?
  8. Q8. Which is the safe way to use a user-typed name in a query?
  9. Q9. What does this print? (code)
  10. Q10. Before running an AI-written DELETE ... WHERE ... on real data, what should you do?