Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New posts in greatest-n-per-group

R aggregate() by group using some function (e.g., max) but then project on other column

What SQL query can I use to get the first record of each group based on a certain column? [duplicate]

Is there a way to get 2 rows from each group of rows? [duplicate]

Getting `n` rows for each id in a result set MYSQL

Query conditionally return only one row per distinct id

Microsoft SQL Query - Return last record from second table

Group Private Messaging System

Select latest rows for combination of columns

Get the second highest sample date

Improve performance or redesign 'greatest-n-per-group' mysql query

Combine crosstab function with DISTINCT ON

Limit SQL query to only the top two counts per group [duplicate]

sql query to get latest record for each id

What is the best way to select rows with maximum value?

Postgres limit number of rows for each in WHERE IN id from another table

Find most recent distinct records and sort by created_at in Postgresql

How to create INSERT query that adds sequence number in one table to another

Selecting most recent as part of group by (or other solution ...)