I have a job table that holds jobs and leaddate is the field for the job entry.
The result I want to get is the number of jobs I have in each quarter. My query count
I think this should do the job:
SELECT YEAR(leaddate) AS year, QUARTER(leaddate) AS quarter, COUNT(jobid) AS jobcount FROM jobs WHERE contactid = '19249' GROUP BY YEAR(leaddate), QUARTER(leaddate) ORDER BY YEAR(leaddate), QUARTER(leaddate)