+ Reply to Thread
Results 1 to 1 of 1

SQL code sum by unique identifier in column only show max result

  1. #1
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    SQL code sum by unique identifier in column only show max result

    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
    Attached Files Attached Files
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-08-2015, 10:07 PM
  2. Replies: 2
    Last Post: 04-16-2014, 05:13 PM
  3. Merging data using unique column identifier?
    By jjinca in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 05-14-2013, 07:55 AM
  4. [SOLVED] Copying the details of a code based on their unique identifier.
    By Jarvin24 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2013, 07:32 AM
  5. Function to show which group(s) a unique identifier are in
    By bradbracey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 05:04 PM
  6. VBA code for comparing a worksheet with a column and show the result with a color
    By Derken73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2012, 08:46 PM
  7. Combine column- two lists, with unique identifier
    By bchalker in forum Excel General
    Replies: 1
    Last Post: 07-09-2008, 11:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1