Hey Guys,
Im having what I would think is a basic mysql error. take a look:
SELECT DISTINCT met, DATE_FORMAT( date_closed, '%b' ) AS distMonth
FROM jobs
WHERE (
date_closed <> ''
) AND (
met = (
SELECT count( * )
FROM jobs
WHERE met_SLA = 'Yes' )
)
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT count( * )
FROM jobs
WHERE met_SLA = 'Yes' ) ) LIM
The fields date_closed, met_SLA, are already in the DB. The field met is something I would like. In the end I was hoping it looks like this:
distMonth | met
jan | 10
feb | 6
june | 3
I can get the distinct months going but i cant get the 'met field'. Any help is greatly appreciated