T
tessaco
I am not all that familiar with writing SQL and am hoping that you'll be able
to help!
I have a table containing sales territories and 3 digit zipcodes. Because of
an overlap in the data, I am not getting a unique list of zipcodes, but
rather a list that may look like this:
Zip Territory
012 Boston
012 Hartford
I would like to return a unique list of zipcodes, with the associated
territories based on which territory has the max amount of revenue.
Currently, my SQL looks like this:
SELECT Base.[3DIGITZIP], Max(Base.Volume) AS MaxOfVolume, Base.SALES_TER2
FROM Base
GROUP BY Base.[3DIGITZIP], Base.SALES_TER2
ORDER BY Base.[3DIGITZIP];
Any help would be appreciated!
to help!
I have a table containing sales territories and 3 digit zipcodes. Because of
an overlap in the data, I am not getting a unique list of zipcodes, but
rather a list that may look like this:
Zip Territory
012 Boston
012 Hartford
I would like to return a unique list of zipcodes, with the associated
territories based on which territory has the max amount of revenue.
Currently, my SQL looks like this:
SELECT Base.[3DIGITZIP], Max(Base.Volume) AS MaxOfVolume, Base.SALES_TER2
FROM Base
GROUP BY Base.[3DIGITZIP], Base.SALES_TER2
ORDER BY Base.[3DIGITZIP];
Any help would be appreciated!