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 Question
2Explain3 marks
2026
Explain why SELECT * should be avoided in an application's code.
Markscheme and model answer locked
Unlock Question
3State1 mark
2026
State what SQL stands for.
Markscheme and model answer locked
Unlock Question
4State2 marks
2026
State the two main sublanguages of SQL and what each is for.
Markscheme and model answer locked
Unlock Question
5Identify2 marks
2026
Identify which sublanguage each of CREATE, SELECT, ALTER and UPDATE belongs to.
Markscheme and model answer locked
Unlock Question
6Outline2 marks
2026
Outline what a SELECT statement does.
Markscheme and model answer locked
Unlock Question
7Construct4 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 Question
8Construct3 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 Question
9Construct3 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 Question
10Outline2 marks
2026
Outline the purpose of the WHERE clause.
Markscheme and model answer locked
Unlock Question
11Choose1 mark
2026
Choose what an INNER JOIN returns.
Markscheme and model answer locked
Unlock Question
12Explain3 marks
2026
Explain why omitting a WHERE clause from a DELETE statement is dangerous.
Markscheme and model answer locked
Unlock Question
13Construct3 marks
2026
Write the SQL to count how many students are in each class.
Markscheme and model answer locked
Unlock Question
14Construct3 marks
2026
Write the SQL to list only those classes with more than 25 students.
Markscheme and model answer locked
Unlock Question
15Distinguish3 marks
2026
Distinguish between WHERE and HAVING.
Markscheme and model answer locked
Unlock Question
16State3 marks
2026
State three aggregate functions available in SQL and what each returns.
Markscheme and model answer locked
Unlock Question
17State1 mark
2026
State which columns a join between Student and Class would normally match on.
Markscheme and model answer locked
Unlock Question
18Construct3 marks
2026
Write the SQL to find the average mark in the Result table for subject code PHY.
Markscheme and model answer locked
Unlock Question
19Explain2 marks
2026
Explain what DISTINCT does in a SELECT statement.
Markscheme and model answer locked
Unlock Question
20Construct3 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 Question

Ready 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