Untitled
public sql v1 · immutable-- show the expenses for each month, yields 30 recordsSELECT DATE_FORMAT(day, '%Y-%m') as month, FORMAT(SUM(amount), 2) as sumFROM tt_financesGROUP BY YEAR(day), MONTH(day)-- get the number of different months with expenses, should yield 1 record, but yields 30 records with counts between 1 and 34SELECT COUNT(1)FROM tt_financesGROUP BY YEAR(day), MONTH(day)