From c80d20072bf9281267019dd47a9886d65e90a37b Mon Sep 17 00:00:00 2001 From: Apoorv Saxena <62635997+safierinx-a@users.noreply.github.com> Date: Sun, 18 Oct 2020 19:08:07 +0530 Subject: [PATCH] Corrected Q3 sqlzoo only returns correct answer if you order by the pos value. --- self-join.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/self-join.sql b/self-join.sql index 236fcd3..74b2925 100644 --- a/self-join.sql +++ b/self-join.sql @@ -26,6 +26,7 @@ SELECT id, name FROM stops JOIN route ON id=stop WHERE company = 'LRT' AND num=4 +ORDER BY pos --#4 /*