001Level 1

Chapter 1 · SELECT Basics

09. Departments Ordered by Budget

Easy10 XPHealthcare

The CFO wants a simple ranked list of departments by their budget. Return the department name, floor, and budget, sorted by budget from highest to lowest.

Tables

  • PKidINT
  • nameTEXT
  • floorINT
  • FKhead_doctor_id→ doctors.idINT
  • budgetREAL

Need help?

Ask Sol

AI tutor — looks at your current query and nudges you, without spoiling the answer.

Solution

Try the hints first — solving it yourself is what makes it stick.

Peek at the solution?

You can still earn the XP afterwards by submitting a working query — but you'll learn more if you give it one more try.