From 1c67cac846bc5e1af40757f5405ebd06a1080e76 Mon Sep 17 00:00:00 2001 From: Prithiviraj <59286864+Prithivi-Raj@users.noreply.github.com> Date: Fri, 20 Aug 2021 19:13:50 +0530 Subject: [PATCH] Update The PADS.mysql --- .../02_The PADS/The PADS.mysql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SQL/2_Advanced Select/02_The PADS/The PADS.mysql b/SQL/2_Advanced Select/02_The PADS/The PADS.mysql index 169ab9a..a3437b3 100644 --- a/SQL/2_Advanced Select/02_The PADS/The PADS.mysql +++ b/SQL/2_Advanced Select/02_The PADS/The PADS.mysql @@ -8,3 +8,21 @@ SELECT CONCAT('There are a total of ',COUNT(OCCUPATION),' ',LOWER(OCCUPATION),'s FROM OCCUPATIONS GROUP BY OCCUPATION ORDER BY COUNT(OCCUPATION), OCCUPATION; + +-- select case +-- when occupation ='doctor' then concat(name,'(D)') +-- when occupation = 'actor' then concat(name,'(A)') +-- when occupation = 'singer' then concat(name,'(S)') +-- else concat(name,'(P)') +-- end +-- from occupations +-- order by name; +-- select case +-- when occupation ='doctor' then concat('There are a total of ',count(occupation),' doctors.') +-- when occupation = 'actor' then concat('There are a total of ',count(occupation),' actors.') +-- when occupation = 'singer' then concat('There are a total of ',count(occupation),' singers.') +-- else concat('There are a total of ',count(occupation),' professors.') +-- end as h +-- from occupations +-- group by occupation +-- order by count(occupation), occupation;