Sometimes you may need to get first row in each group or min row in each group. Here’s how to get first record in each group in MySQL, PostgreSQL, SQL Server.
group by
How to Get Record with Max Value in MySQL
Many times you may need to select rows with max column value in SQL. Here’s how to get record with max value in MySQL, PostgreSQL, SQL Server.