I am trying to get the number(total) of distinct dates in a report. I have tried the following(along w/ a million other ways):
Select count (*)
from (select distinct mbdate from DateTable
where MBDATE between [parameter passed from form] and [parameter2 from form] and datepart("w", mbdate) = 1.
I only want to count the number of sundays... also they have to be distinct because i am using this number for an average... distinct b/c there are several items w/ the same date... i only want to count unique dates.
Thank you for your help.