Dim RS As ResultSet=Sql1.ExecQuery($"SELECT strftime('%Y', date / 1000, 'unixepoch') as year,
strftime('%m', date / 1000, 'unixepoch') as month,
SUM( profit ) AS sum FROM tbl2 GROUP BY month;"$)
Do While RS.NextRow
Log(RS.GetString("year"))
Log(RS.GetString("month"))
Log(RS.GetString("sum"))
Log("====================")
Loop
RS.Close