Hello,
I have a question about writing an SQL query.
I have a table with the following fields (amongst others):
City
Store
SalesDollars
There are 10 cities, with each city containing 100+ stores, each with a SalesDollars numeric value.
1) How do I write a SELECT statement that will return the top 50 stores from each city (500 in total) ?
2) How do I create a field that is the ranking of all these stores in descending order by SalesDollars (1-500)?
Thank you in advance for your help!
Sam
I have a question about writing an SQL query.
I have a table with the following fields (amongst others):
City
Store
SalesDollars
There are 10 cities, with each city containing 100+ stores, each with a SalesDollars numeric value.
1) How do I write a SELECT statement that will return the top 50 stores from each city (500 in total) ?
2) How do I create a field that is the ranking of all these stores in descending order by SalesDollars (1-500)?
Thank you in advance for your help!
Sam