skip to Main Content

Mysql – Group by year range SQL query

I have following query. I need MODEL_YEAR_FW 2003 to 2022 to be grouped 3 years each SELECT COUNT(VEHICLE_FW.MODEL_YEAR_FW) AS COUNT_VEHICLES, VEHICLES_FW.MODEL_YEAR_FW AS MODEL_YR FROM FWUSER.VEHICLES_FW WHERE VEHICLES_FW.ARCHIVE_STATUS_FW - 'N' AND ( (MODEL_YEAR_FW) >2003) GROUP BY VEHICLE_FW.MODEL_YEAR_FW ORDER BY VEHICLES_FW.MODEL_YEAR_FW Someone…

VIEW QUESTION
Back To Top
Search