Count Distinct from Differnet Table
I'm trying to get a distinct count (example cars) that are stored in another table. I know in Access you need something like:
Code:
Select count(cartype) from (Select distinct(cartype) from DailyData)
But, I have the following SQL pieced together and all I can get is count (includes duplicates)
Code:
SELECT a.wDate, Sum(a.Sales) AS TotalSales, Count(b.cartype) as DiffCars
FROM DailyData a left join AllCarTypes b on a.wDate = b.wDate
where a.wDate = #06-27-2001#
GROUP BY a.wDate
I don't know the syntax to get the distinct count in my query.
Anyone have any ideas?