Closed djmolny closed 1 year ago
Here's a query that counts flights per Chief for a given time period:
SELECT family_name, given_name, count(*) AS c
FROM members, flights, pilot_flights, contests
WHERE chief_id = members.id AND flight_id = flights.id
AND contest_id = contests.id
AND start >= '2017-01-01'
AND start <= '2017-12-31'
GROUP BY members.id
ORDER BY c DESC
Display the number of contests, total flights, and flights by category for everyone who served as a Chief Judge in the selected year.