need help with joins

  • Hi All,

    I need your help with joins. I have a table which contains the store number and day polled in the week. for example

    storeNo DayPolled

    ------------------------

    30 22-mar-2005

    30 23-mar-2005

    30 24-mar-2005

    30 25-mar-2005

    30 26-mar-2005

    30 27-mar-2005

    30 28-mar-2005

    ....

    ....

    so for each store there will be seven days in that week saying the store is opened on those 7 days. for some stores the store might not be opened seven days. I want to find those stores which are not opened 7 days and the day it is not opened. How could I do that?

    Thanks,

    Sridhar.

  • Select StoreNo

    From MyTable

    Where DayPolled between '22-Mar-2005' and '28-Mar-2005'

    group by StoreNo

    Having Count(*) < 7

    Edit: Sorry I just noticed this answers only part of your question.

  • i found the solution

    Thanks,

    Sridhar.

  • Don't keep it secret - what was the solution.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply