Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New posts in greatest-n-per-group

How to write"greatest n per group" type query, but with additional conditions?

PostgreSQL error: subquery must return only one column

Select exactly one row for each employee using unordered field as criteria

How to get maximum row of each group?

Mysql using filesort even when using index and only one row

JPQL/SQL get the latest of records grouped by columns

“greatest-n-per-group” query in Django 2.0?

Select The last 3 news from each category - Two tables - (MySQL - PHP)

How to add columns to a query without the need to put them in the group by?

How to SELECT DISTINCT Info with TOP 1 Info and an Order By FROM the Top 1 Info

Select items that are the top N results for a related table

How to 'add' a column to a query result while the query contains aggregate function?

Select rows with Max Value grouped by two columns

SQL-select top 3 values per group WITH CONDITION

How to return only the earliest date for each user (users have 100s of dates)

SQL: Filter rows with max value

GROUP BY in Postgres - no equality for JSON data type?

PostgreSQL: Select only the first record per id based on sort order

How to select the most recent set of dated records from a mysql table

SQL: Find the max record per group [duplicate]