Holiday Quiz

Link: http://jonathanlewis.wordpress.com/2009/12/24/holiday-quiz/

I have a table with one million rows, there are no indexes on the table. The table has a column called sortcode which has no nulls, and has been generated in a highly random way so that no value appears more than four times. Consider the following queries:

select
[...]