Ask HN: What is the best online resource to learn advanced SQL?
448 pointsI too often find myself getting stuck when it comes to more advanced SQL queries. I have never actively learnt SQL and realise that I don't have a great mental model of how it works. I would like to improve this as it is killing my productivity from time to time.
Comments (97) 45 threads
Earlier commentsa) row_number over() and partition: in the abstract: https://www.youtube.com/watch?v=-X3eIyZV728
b) applied to customer value analysis: https://www.youtube.com/watch?v=iHxJvF0tZOA
c) applied to time differences (also uses materials from b above) https://www.youtube.com/watch?v=5f8tF4U70Ic
After a while you can write these from scratch and they generally work the 1st or 2nd time, but it takes lots of trial and error at first when setting up the partition and ordering clause within the OVER() expression.
http://tapoueh.org/blog/2013/08/20-Window-Functions
I recommend reading all things what Brent Ozar [1] has to say
There is also another blog from Dr. DMV on SQL Server performance [2]
[1] https://www.brentozar.com/ [2] http://www.sqlskills.com/blogs/glenn/category/dmv-queries/
All comments shown.
Couldn't load more comments. Check your connection and try again.