0

I extract from date(e.g. 2020-11-19) to separe column year and month. Now i need group by "Celkem" to month. When i use sum() i have a problem that it also counts a year as column "Celkom" On each line need to have year for row in sql.

          Celkem  year  month
11     17.47  2020     11
19    305.10  2020     11
22   1197.50  2020     11
23   1848.10  2020     10
..       ...   ...    ...
288   369.59  2017     10
289    47.00  2017     10
290   277.00  2017     10

Expact:

1     1520.07  2020     11
2     1848.10  2020     10
3     .......  2020     9
4     .......  2020     8
Roman
  • 83
  • 1
  • 1
  • 10

0 Answers0