04 Try it yourself Interactive

Six clauses, one row set, one step at a time

The same six students and the same query from section 02. Each press of Next runs exactly one clause and shows you the row set it hands to the next clause, with the rows and columns it removed marked in rose before they disappear. The label on the left of each row tells you which original student it came from, so you can watch Meera’s Pune fold into Asha’s at DISTINCT and then watch that merged row fall outside LIMIT 2 at the last step. Six clauses is the query as written; The alias trap is the same table with marks AS score and shows you what WHERE can and cannot see. Nothing plays on its own: Next, Back and Reset, or the arrow keys.

Six clauses
nothing has run yet
The highlighted line in the query below is the clause running right now. Watch it jump: line two runs first, and in neither run does it ever walk straight down from line one.
Press Next to begin. Each press runs one clause.


      
Rows before
Columns
Rows after
Rows removed
step 0 / 0