G
Guest
I have this query (yes I know "date" is a reserved word). I would like it to find the maximum date per "cont_eduID" and only if it
is over a year old return the results. This query is finding all the dates that are older than a year and then selecting the maximum
of those (per "cont_eduID") and returning the results. anyone know how I can correct this?
Thanks a bunch!
SELECT login.first_name, login.last_name, Max(contedu.date)
FROM login INNER JOIN contedu ON login.ID = contedu.cont_eduID
WHERE contedu.date < NOW() - 365.25 GROUP BY login.last_name, login.first_name;
is over a year old return the results. This query is finding all the dates that are older than a year and then selecting the maximum
of those (per "cont_eduID") and returning the results. anyone know how I can correct this?
Thanks a bunch!
SELECT login.first_name, login.last_name, Max(contedu.date)
FROM login INNER JOIN contedu ON login.ID = contedu.cont_eduID
WHERE contedu.date < NOW() - 365.25 GROUP BY login.last_name, login.first_name;