Hi guys, need help on ADO SQL code for accessing Excel Data (using Excel version 2013)
i have data like this in picture
https://drive.google.com/open?id=1QGWO4fmCx8wYR-U1vkKEJq5xfDgPDSJS
what i need is shops in every office that have highest sum(credit) in each TOP
the yellow colour is the result, because the sum(credit) was the highest (green colour)
so
in office A, the TOP with highest sum(credit) is 15
in office B, the TOP with highest sum(credit) is 11
thanks
i have data like this in picture
what i need is shops in every office that have highest sum(credit) in each TOP
the yellow colour is the result, because the sum(credit) was the highest (green colour)
so
in office A, the TOP with highest sum(credit) is 15
in office B, the TOP with highest sum(credit) is 11
Code:
SELECT OFFICE, SHOP, TOP, CREDIT FROM [Sheet1$A1:S17878] WHERE SUM(CREDIT) = MAX(SUM(CREDIT))
thanks
Last edited: