Sum the billable hours (billable = 1) logged in calendar year 2025 for each client. Clients with no billable 2025 hours are not shown. Return client and billable_hours (ROUND to 1). Order by billable_hours DESC, then client.
| Column | Type |
|---|---|
| entry_id | INTEGER |
| emp_id | INTEGER |
| client | TEXT |
| work_date | DATE |
| hours | REAL |
| billable | BOOLEAN |
| entry_id | emp_id | client | work_date | hours | billable |
|---|---|---|---|---|---|
| 1 | 1 | BankCo | 2025-03-03 | 8 | 1 |
| 2 | 1 | BankCo | 2025-03-04 | 7.5 | 1 |
| 3 | 2 | RetailX | 2025-03-03 | 6 | 1 |
| 4 | 2 | RetailX | 2025-03-03 | 2 | 0 |
| 5 | 3 | BankCo | 2025-03-05 | 4 | 0 |
| 6 | 3 | Telco | 2025-04-01 | 9 | 1 |
| client | billable_hours |
|---|---|
| BankCo | 15.5 |
| Telco | 9 |
| RetailX | 6 |
Solve it in the live editor on this page — run on sample data, then submit against hidden tests.
{{ totalCount }} questions in the style asked at Amazon, Microsoft, Google, Meta, Flipkart and more — {{ hardPct }}% Hard. Write SQL in a real database engine in your browser, run it on sample data, then evaluate against hidden tests.
Company tags show where this type of question is commonly reported in interviews. Questions, data and solutions are written by TechTown.
{{ cur.statement }}
No submissions yet. Press Evaluate to submit your query.
{{ solutionSql }}
{{ out.error }}
You have solved your 3 free questions — nice work! Log in (free) to unlock all 150 questions, keep your streak and appear on the leaderboard.