r/SQL • • Jul 15 '26

SQL Server how to solve this ??

Consider a table named "Sales" with columns: SalespersonID, CustomerID, SaleDate. Write a SQL query to calculate the salesperson who made the highest number of sales each quarter.

0 Upvotes

20 comments sorted by

View all comments

Show parent comment

1

u/FretBoardHavoc Jul 15 '26

Some of these you would break out from the fields in the sales table- the sales table has the sale date as a field, so SaleYear and SaleQuarter(for example) are both derivable. SalesCount is also derivable.

1

u/jkelso2525 Jul 15 '26

Thank you I am trying to learn. What is your history with learning SQL? I am trying SQL bolt would you recommend that as a good starting point?