Skip to main content
9 events
when toggle format what by license comment
Dec 27, 2018 at 15:42 comment added Rick James @Lansana - The %s is hung over from when you were doing the grouping in code? Change to MIN(updated_at). Get rid of id and amount in the GROUP BY.
Dec 27, 2018 at 6:35 comment added Lansana Updated question with an example query.
Dec 27, 2018 at 6:00 comment added Rick James @Lansana - Let's see the whole SELECT.
Dec 27, 2018 at 3:22 comment added Lansana Having to run a query like GROUP BY invoice.id, invoice.amount, DATE(invoice.updated_at) to avoid the Error 1055: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'redacted.invoice.amount' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by error. But this seems to give me a bad result, the group by seems to ignore the function on the updated_at column.
Dec 26, 2018 at 3:16 comment added Rick James @Lansana - I added yearly and monthly
Dec 26, 2018 at 3:16 history edited Rick James CC BY-SA 4.0
more
Dec 26, 2018 at 3:13 comment added Lansana Yearly are easy with this example, though I wonder how months would be handled given that not every month has 31 days.
Dec 26, 2018 at 3:13 vote accept Lansana
Dec 26, 2018 at 3:03 history answered Rick James CC BY-SA 4.0