debbieau1
asked on
highest attempt in table
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you! That is exactly what I needed.
sorry to say but doesn't seems much clear to me, can you please provide us with create table script, some data for that table and your desired results?