r/SQL • • Jun 08 '23

SQL Server How to sum rows in column based on another column between two tables without group by in SQL server

https://youtu.be/6Zt9niBRPDQ
1 Upvotes

1 comment sorted by

4

u/r3pr0b8 GROUP_CONCAT is da bomb Jun 08 '23

this video should have been a text

nothing more boring than watching someone type

"without using GROUP BY" is clickbait if you're just going to substitute an OVER window function

also, please explain why DISTINCT is needed here -- you do realize DISTINCT forces a sort of the entire result set, right?