Question: - - Query 5 SELECT CASE WHEN GroupID IS NULL THEN 'NoGroup' ELSE 'InAGroup' END AS Grouping, COUNT ( * ) AS NumInGroup FROM ManifestPassenger

-- Query 5
SELECT
CASE
WHEN GroupID IS NULL THEN 'NoGroup'
ELSE 'InAGroup'
END AS Grouping,
COUNT(*) AS NumInGroup
FROM ManifestPassenger
WHERE PassID IN (SELECT PassID FROM Passenger WHERE IsTest =1)
GROUP BY GroupID IS NULL
ORDER BY NumInGroup;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Thanks for sharing the SQL query Lets break down and explain the query step by step to understand it... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!