From the course: SQL Hands-On Practice: Solve Business Problems

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Pulling the most recent sales data

Pulling the most recent sales data - SQL Tutorial

From the course: SQL Hands-On Practice: Solve Business Problems

Pulling the most recent sales data

- [Instructor] Imagine one day the sales manager is asking lots of questions about the sales team performance because it seems like some of the sales reps haven't made a lot of sales lately due to the state of the economy. Additionally, the manager suspects that several employees have quiet quit, or have stopped working as hard, due to low morale and aren't closing as many deals. The sales manager requests two reports to investigate. The first one is a report of the monthly sale amounts over the past six months by each sales rep and the second report the date and sale amount of the most recent sale per sales rep. Your teammate decides to tackle the first request and aggregate the sales by month and now you're stuck with the more challenging question. How are you going to figure out how to pull the most recent sale date and sale amount per sales rep? You know that you can pull the most recent sale date of the whole dataset…

Contents