I have tried GREATEST, but it came out with an error.
I have a time clock table.
1. date - date
2. time - time with out time zone
3. punch_in - boolean
SELECT MAX(GREATEST( MAX(date),MAX(time))) FROM timeclock;
I get an error:
ERROR: GREATEST/LEAST could not convert type time without time zone to date
SQL state: 42846
I have also tried
SELECT MAX(date), MAX(time) FROM timeclock;
But that did not give me the right result.
I need the highest date, and the highest time for that date, but it just gives me the max date, and the max time.