Optimized querying in PostgreSQL
问题 Assume you have a table named tracker with following records. issue_id | ingest_date | verb,status 10 2015-01-24 00:00:00 1,1 10 2015-01-25 00:00:00 2,2 10 2015-01-26 00:00:00 2,3 10 2015-01-27 00:00:00 3,4 11 2015-01-10 00:00:00 1,3 11 2015-01-11 00:00:00 2,4 I need the following results 10 2015-01-26 00:00:00 2,3 11 2015-01-11 00:00:00 2,4 I am trying out this query select * from etl_change_fact where ingest_date = (select max(ingest_date) from etl_change_fact); However, this gives me only