M
Mario Krsnic
Hello everybody,
how can I get only the last date value from the table Tblabsent. I tried so:
SELECT familyName, name, born, reason, max(absent) AS absent2
FROM persons INNER JOIN Tblabsent ON persons.id=tblAbsent.id
GROUP BY familyName, name, born, reason;
The query is ok, if it runs without column reason.
SELECT familyName, name, born, max(absent) AS absent2
FROM persons INNER JOIN Tblabsent ON persons.id=tblAbsent.id
GROUP BY familyName, name, born;
But I need the column reason. How to resolve it?
Thanks for your ideas!
Mario Krsnic
how can I get only the last date value from the table Tblabsent. I tried so:
SELECT familyName, name, born, reason, max(absent) AS absent2
FROM persons INNER JOIN Tblabsent ON persons.id=tblAbsent.id
GROUP BY familyName, name, born, reason;
The query is ok, if it runs without column reason.
SELECT familyName, name, born, max(absent) AS absent2
FROM persons INNER JOIN Tblabsent ON persons.id=tblAbsent.id
GROUP BY familyName, name, born;
But I need the column reason. How to resolve it?
Thanks for your ideas!
Mario Krsnic