Ward occupancy

Ward occupancy

A ward head is planning rearrangements and wants to see which wards are currently the most crowded. Return the ward code and the number of patients in it. Sort the result by patient count in descending order.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables. Your answer must use the same column names as this sample — alias them with AS if needed.

ward_codecount
CARD-A4
CARD-B3
CARD-C2

Your query result will appear here

Focus radio
Paused · SomaFM · Fluid