Answer the question
In order to leave comments, you need to log in
How to select the sum of records by month and add a column with the name of the month and year?
I want to make a query that gives a grouping by month-year (2016 jun ...) and has a column with the name of the month and year,
now there is this
SELECT Month(ps_datetime), COUNT(ps_id) x FROM `patient_services` GROUP BY YEAR(ps_datetime), MONTH(ps_datetime)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question