Tags / greatest-n-per-group
Querying Single Rows in a Table with Multiple Rows in a Subquery Using Row Number and Aggregate Functions
Retrieving Latest Date and Total Enrollments from Duplicated School Records
How to Fix SQL Distinct with ORDER BY: Avoiding Duplicates and Getting the Right Results
Delete Records from a Table Based on Count and Latest Record
Using Arrays for Conditional Aggregation in BigQuery: A Pivot Table Solution
Using Aggregation Functions to Retrieve Unique Values in Oracle
Retrieving Maximum Values: Sub-Query vs Self-Join Approach
Joining Two Tables and Getting the Most Recent Records for a Given Name: A SQL Solution Using Correlated Subqueries