How Select first row in each group | PostgreSQL Tutorial

preview_player
Показать описание
Welcome to DWBIADDA's PostGre SQL latest interview questions and answers tutorial, as part of this lecture we will teach you, How Select the first row in each group
Рекомендации по теме
Комментарии
Автор

Thanks for making this. A question: Let's say i want to take the last selection, that is, the one with the highest amount for each customer id and use it to make an intersection with another table. How would you do that? As far as i know the cte only works once inmediatly after it's declared. My case is SIG oriented. i have a table with 1000's of point inside a states table (spatially speaking), i need to take just a single point inside each state and make a selection of the states that contain a point.

Refreshment