AI-assisted generation of SQL comprehension questions

Goodfellow, Martin and Lambert, Alasdair and Fagan, Andrew and Booth, Robbie; (2026) AI-assisted generation of SQL comprehension questions. In: DataEd’26: 5th International Workshop on Data Systems Education. CEUR Workshop Proceedings . CEUR Workshop Proceedings.

[thumbnail of Goodfellow-etal-2026-AI-Assisted-Generation-of-SQL-Comprehension-Questions]
Preview
Text. Filename: Goodfellow-etal-2026-AI-Assisted-Generation-of-SQL-Comprehension-Questions.pdf
Final Published Version
License: Creative Commons Attribution 4.0 logo

Download (994kB)| Preview

Abstract

Students often struggle to fully comprehend the SQL queries they write. These gaps in understanding may remain hidden until later in their studies. At that stage, misconceptions about relational concepts, query semantics, formulation, or execution behaviour are difficult to remediate, particularly when students encounter increasingly complex queries. The increasing use of GenAI tools (e.g., GitHub Copilot) for query construction can further mask conceptual weaknesses. Acommoninstructional strategy for addressing this issue is the use of SQL comprehension questions that require students to predict query results, explain query logic, or identify semantic errors. Such questions help surface misconceptions and may also support academic integrity by requiring students to demonstrate conceptual understanding beyond producing a working query. However, creating scalable sets of high-quality questions is labour-intensive. This tool demonstration presents an openly available extension of a prior GenAI-based system that automatically generates Java code comprehension questions, adapted to the domain of SQL. The tool automatically derives multiple-choice SQL comprehension questions directly from queries and integrates with the CodeRunner automated assessment platform to support rapid generation and deployment of scalable, personalised assessments. It is designed to support timely feedback, reduce instructor workload, and support conceptual understanding of SQL.

ORCID iDs

Goodfellow, Martin ORCID logoORCID: https://orcid.org/0000-0003-2151-8442, Lambert, Alasdair ORCID logoORCID: https://orcid.org/0000-0002-9762-2193, Fagan, Andrew ORCID logoORCID: https://orcid.org/0000-0001-9714-2096 and Booth, Robbie;