Sobes.tech
Junior

Report by departments and months

livecode

Task condition

Create a report by departments and months. Display dept_id, month, total sales amount, and number of sales. Year is not important. Extract the month from the date using MONTH(date).

+----+---------+------------+----------+
| id | dept_id |   date     | sale_amt |
+----+---------+------------+----------+
| 1  |   1     | 01.01.19   |    35    |
| 12 |   1     | 02.01.19   |    22    |
| 3  |   1     | 01.02.19   |    12    |
| 4  |   2     | 01.04.19   |   123    |
| 5  |   2     | 04.04.19   |   234    |
| 15 |   2     | 06.04.19   |   345    |
| 6  |   2     | 07.04.19   |    77    |
+----+---------+------------+----------+