Maybe this is the wrong forum to ask this question in and if so please move if or let me know how. SQL is fairly new to me and I am learning much more each day.
The attached workbook is test data modified so that it can be uploaded and for privacy purposes. It has two tabs. Aged is test results of what the SQL code brings back. Sales tab is the table and data in SQL.
If you wanted to get the email of the top seller by product id for each row listed on the Aged tab how would you write the code? I understand if more information is needed however I believe this is something that can be provided given the information but I could be wrong.
My guess, would it be MAX(SUM(DISTINCT(expression
Bookmarks