These queries work in SQL Server but not in Access. Can anyone see how I can
modify these so they will work in A2K
SELECT A.AdId,
COUNT(DISTINCT I.ImpressionId) AS Impressions,
COUNT(DISTINCT C.ClickId) AS Clicks
FROM tblAds A
LEFT JOIN tblImpressions I ON I.AdId = A.AdId
LEFT JOIN tblClicks C ON C.AdId = A.AdId
GROUP BY A.AdId
I understand Access doesn't have Count Distinct functionality but what about
the next query.
select
a.AdId
, isnull (i.Impressions, 0) Impressions
, isnull (c.Clicks, 0) Clicks
from
tblAds a
left join
(
select
AdId
, count (*) as Impressions
from
tblImpressions
group by
AdId
) i on i.AdId = a.AdId
left join
(
select
AdId
, count (*) as Clicks
from
tblClicks
group by
AdId
) c on c.AdId = a.AdId
Thanks to anyone who could help