Keep SQLtest alive: Help cover this month's $100 server costs to keep all lessons and the SQL playground online. Support the project →
SQL code copied to buffer
Task 45:

Quarterly earnings analysis

MySQL
Write a query to calculate the revenue of each store for each quarter of 2005.
The result should consist of the following fields: store_id and I, II , III, IV - amounts of income for each quarter, respectively
To define store_id value, use a join to the staff table
Expected result Columns: 5 · Rows: 2
store_id I II III IV

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

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