From 44ccca630e2bf1b82a05c0eb0788ab32585efa7e Mon Sep 17 00:00:00 2001 From: kai591 <78866906+kai591@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:32:34 +0530 Subject: [PATCH] Update select-from-nobel.sql --- select-from-nobel.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/select-from-nobel.sql b/select-from-nobel.sql index 9e15cba..4efa58a 100644 --- a/select-from-nobel.sql +++ b/select-from-nobel.sql @@ -119,7 +119,7 @@ The expression subject IN ('Chemistry','Physics') can be used as a value - it wi Show the 1984 winners ordered by subject and winner name; but list Chemistry and Physics last. */ -SELECT winner, subject, subject IN ('Physics','Chemistry') +SELECT winner, subject FROM nobel -WHERE yr=1984 -ORDER BY subject IN ('Physics','Chemistry'),subject,winner +WHERE yr = 1984 +ORDER BY CASE WHEN subject IN ('Chemistry','Physics') THEN 1 ELSE 0 END,subject,winner