🙏 We need your help! SQLtest.online has no ads and lives only on donations. Even a small amount helps. Donate now →
SQL code copied to buffer
Task 24:

Flight Distribution by Day

PostgreSQL
Find the distribution of flights from Moscow to St. Petersburg by day of the week. Display the result in three columns: day_of_week - day of the week in English (Sunday - Saturday), flights - number of flights on this day according to the schedule (scheduled_arrival), passengers - number of passengers according to the boarding_passes table. Sort the table by day of the week from Monday to Sunday.
Expected result Columns: 3 · Rows: 7
day_of_week flights passengers

Sample rows open after wrong checks: 0 of 3

Write your query below and click "Check it!". Tables are described in the right pane.

Tutorial

By checking a query, you agree that it is stored without your account details and may be included in anonymized datasets, including for AI training. Learn more

The query result will appear here. Ctrl+Enter - Run query