I need to sum numbers in a field by decade.
Incidents table has year field and dead fields. I have been given this SQL query that supposedly does that:
'Code:select incident.dead as dead, incident_date as year from (select int(year('incident_date') / 10 * 10) as decade from incidents) from incidents group by decade;
but it complains about the outer FROM clause.