Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
3. The DailySales table
Nested CTEs


Excellent! Let's move on.


Select all the information from the DailySales table.

A single row represents the daily results for a sales rep. It contains the following columns:

  • Day – the day to which the results apply,
  • SalesmanId – the rep's identifier,
  • ItemsSold – the number of items sold by that salesperson on that day,
  • AmountEarned – the amount of money acquired for the items,
  • Distance – the distance that salesperson drove on a given day,
  • Customers – the number of customers seen by that rep on that day.