From the course: Advanced SQL – Window Functions
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Rank window functions - SQL Tutorial
From the course: Advanced SQL – Window Functions
Challenge: Rank window functions
- [Instructor] As I promised, I believe you will find this challenge more difficult than the previous warm up one. Naturally, it will involve rank window functions. It may also require aggregate window functions, or even group aggregate functions just to make thing more interesting. This challenge is an example of a common category of challenges that I frequently encounter in the real world, analyzing time series data, for example stock prices or sensor readings over time. I recommend that you use a similar approach to the one I demonstrated with a previous solution. Break down your solution into small, digestible chunks using as many CTEs as you feel comfortable with. After each one, execute a select star, preferably by an order by to keep row order consistent for visual reference, and once you're happy with it, proceed to the next step. Remember that data type issues can hinder your progress, so make sure to cast…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.