Search results

  1. L

    Using SubQuery to find 0 Sales Stores

    bob_fitz, yes, you can do that. But my point is to learn how to write it as a SubQuery.
  2. L

    Using SubQuery to find 0 Sales Stores

    bob_fitz, just by looking at your code, the query will only list the stores with 0 sales but not count the number of stores. Even if you change it to COUNT for [Stores], it will only count the total number of stores. That's why I need to use SubQuery.
  3. L

    Using SubQuery to find 0 Sales Stores

    Let's call it [tbl_TEMP]
  4. L

    Using SubQuery to find 0 Sales Stores

    Well, can you venture an actual solution?
  5. L

    Using SubQuery to find 0 Sales Stores

    I am trying to learn subquery can can't wrap my head around this one and hoping someone can show me. Say a table 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?
  6. L

    Summing Last 4 Weeks Every Week

    Wow, great, that works. It will take me some time to digest it though. Thanks for your help!
  7. L

    Summing Last 4 Weeks Every Week

    Sorry, I am completely new to SQL, I tried reading DSum and Subquery but still couldn't figure it out. I tried: SELECT T1.Week, Sum(DSum("[Qty]","T1","[Week] = [Week] and [Week] > [Week]-3")) AS L4W FROM T1 GROUP BY T1.Week; This only sums up everything for every week. I have no idea how to...
  8. L

    Summing Last 4 Weeks Every Week

    How would you write the subquery so that it goes through every week and sums the last 4 week? I can only figure out how to do one specific week.
  9. L

    Summing Last 4 Weeks Every Week

    It sound simple enough but I couldn't figure it out. How do you sum numbers for a 4 week period every week? EX: Week Qty ----- ---- 1 10 2 20 3 30 4 40 5 50 6 60 Result: Week Qty ----- ---- 4 100 5 140 6 180 Any help would be appreciated
Back
Top Bottom