I am having a problem with a query and it is not returning the results I need.
In the following example (the field 'lev' is NOT providing the matching value for that record (for the 'attempt' that is output)
Hope that is clear enough
SELECT DISTINCT j.name, max(r.attempt) AS highest, j.active, j.jobID, r.lev
FROM (journals j
LEFT JOIN responses r ON r.jobID=j.jobID)
WHERE j.contactID = 220
GROUP BY r.jobID