Skip to main content
Extra Notes for SQL Items

A few extra pieces of information for SQL assessment items

Martine Holland avatar
Written by Martine Holland
Updated over a year ago

In addition to the usual typing or fill-in-the-blank instructions:

Context and Stem

  • Include schema diagrams to help explain the data structure

  • Use QuickDBD to create your schema diagram

    • The free version is sufficient

  • Save your schema as a png and upload to teach

  • Add as any other image in the context

Pre-Challenge Code

  • Define which database you need to use for this item

  • You can add a new database by following these instructions

Code 1

  • Use ORDER BY to make sure data is returned in the same way every time (SQL will randomly change the order if we don't tell it not to!)

  • Use LIMIT to restrict how much data is shown in the "Expected Output"

    • Remember that this is what the users result will be compared to, so it should be different if the answer is wrong or right

Did this answer your question?