Count sports by calendar quarter in SQL
Company: Reevo
Role: Software Engineer
Category: Data Manipulation (SQL/Python)
Difficulty: Medium
Interview Round: Take-home Project
You are given a table games(date DATE, team_name TEXT, sport_name TEXT). Write a SQL query that returns, for each year and calendar quarter (Q1–Q
4), each sport_name and the count of rows in that quarter. Output columns: year, quarter, sport_name, cnt. Order results by year, quarter, cnt DESC, sport_name ASC.
Quick Answer: This question evaluates a candidate's ability to perform date-based grouping and aggregation in SQL, including extracting year and calendar quarter and counting rows per sport.