SQL - Postgres - return maximum value for latest date [duplicate]
问题 This question already has an answer here : SQL query using WHERE IN clause (1 answer) Closed last year . This might be simple but I'm new to SQL and couldn't find how to do this exactly. I have following table: My requirement is follows: I need, for each Frequency (monthly & weekly), pick latest Date & its maximum Version of that latest Date. Then select records for all Dim & both Frequencies where Date and Version are same as the earlier picked. For example: There will single latest date &