Unit 3: A3 Databases
Topic 3.3: SQL Questions
Practice 20 exam-style questions for IB Computer Science Topic 3.3. Review the question stems below, then unlock the full Question Bank to access markschemes, model answers, and AI grading.
1Determine2 marks
2026
Determine how many rows are returned by selecting the distinct class codes from a table of 800 students spread across 32 classes.
Markscheme and model answer locked
Unlock Question2Explain3 marks
2026
Explain why SELECT * should be avoided in an application's code.
Markscheme and model answer locked
Unlock Question4State2 marks
2026
State the two main sublanguages of SQL and what each is for.
Markscheme and model answer locked
Unlock Question5Identify2 marks
2026
Identify which sublanguage each of CREATE, SELECT, ALTER and UPDATE belongs to.
Markscheme and model answer locked
Unlock Question6Outline2 marks
2026
Outline what a SELECT statement does.
Markscheme and model answer locked
Unlock Question7Construct4 marks
2026
Write the SQL to list each employee's name alongside their manager's name, where Employee holds EmployeeID, Name and ManagerID.
Markscheme and model answer locked
Unlock Question8Construct3 marks
2026
Write the SQL to list the name and date of birth of every student born before 2009.
Markscheme and model answer locked
Unlock Question9Construct3 marks
2026
Write the SQL to list every student whose name begins with the letter K, in alphabetical order.
Markscheme and model answer locked
Unlock Question10Outline2 marks
2026
Outline the purpose of the WHERE clause.
Markscheme and model answer locked
Unlock Question11Choose1 mark
2026
Choose what an INNER JOIN returns.
Markscheme and model answer locked
Unlock Question12Explain3 marks
2026
Explain why omitting a WHERE clause from a DELETE statement is dangerous.
Markscheme and model answer locked
Unlock Question13Construct3 marks
2026
Write the SQL to count how many students are in each class.
Markscheme and model answer locked
Unlock Question14Construct3 marks
2026
Write the SQL to list only those classes with more than 25 students.
Markscheme and model answer locked
Unlock Question15Distinguish3 marks
2026
Distinguish between WHERE and HAVING.
Markscheme and model answer locked
Unlock Question16State3 marks
2026
State three aggregate functions available in SQL and what each returns.
Markscheme and model answer locked
Unlock Question17State1 mark
2026
State which columns a join between Student and Class would normally match on.
Markscheme and model answer locked
Unlock Question18Construct3 marks
2026
Write the SQL to find the average mark in the Result table for subject code PHY.
Markscheme and model answer locked
Unlock Question19Explain2 marks
2026
Explain what DISTINCT does in a SELECT statement.
Markscheme and model answer locked
Unlock Question20Construct3 marks
2026
Write the SQL to find the highest and lowest mark in the Result table for each subject.
Markscheme and model answer locked
Unlock QuestionReady to practice Topic 3.3?
Get instant AI feedback on your answers, view detailed markschemes, and track your progress across all IB Computer Science topics.
Start Practising Now