Question: I am using this query to get the latest requests from a table and somehow it is not giving me the latest dates. Is there
I am using this query to get the latest requests from a table and somehow it is not giving me the latest dates. Is there another way to write it? I thought the MAX function was going to give me the latest date.
SELECT * FROM global_data.process_logger p1 WHERE last_request = (SELECT MAX(last_request) FROM global_data.process_logger p2 WHERE p1.process_name = p2.process_name);
This the db I am using and the dates I should be getting should be from February.

When I run the query this is what I am getting. Dates from January. Any help catching the error would be appreciated. I am using postgresql.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
