Your question is Rank Branch Placements by Month. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How would you write a query to find branches that placed more than 100 candidates this month and rank them by total placements?
Use the provided branch and placement data. Consider only placements dated in the current calendar month.
branch_name, candidates_placed, total_placements, and placement_rank.total_placements descending, then branch_name ascending to break ties.| Column | Type | Description |
|---|---|---|
| branch_idPK | INT | Unique branch identifier |
| branch_name | VARCHAR(100) | Name of the recruitment branch |
| city | VARCHAR(100) | City where the branch operates |
| Column | Type | Description |
|---|---|---|
| placement_idPK | INT | Unique placement batch identifier |
| branch_id | INT | Branch responsible for the placements |
| placement_date | DATE | Date on which the placement batch was recorded |
| candidates_placed | INT | Number of candidates placed in the batch |
| placement_count | INT | Number of placement transactions in the batch |