I am trying to learn subquery can can't wrap my head around this one and hoping someone can show me.
Say table [tbl_Info] has these fields:
1. Week
2. Item
3. Store Number
4. Sales
How should I write a subquery to count the number of stores the have 0 sales for each particular item?
33 views but no one knows the answer?
Your request is a little vague. Are you interested in zero sales for an item in any week? Or are you trying to determine if a store has never had a sale of a particular item. What do you want your end result to show? Perhaps a little more information might get you a response.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Alan, good call.
The end result I am looking for is:
Group by:
Week, Item
So, essentially, I want to see how many stores have 0 sales within each week for each item.
Take a look at this for a starter.
http://www.databasedev.co.uk/sql-subqueries.html
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks