I have been trying to write a SQL based query utilizing Count distinct, but am running into issues in how to correctly structure the format for Microsoft Access.
My current query is in the following format, I would like to transform the Count operation into distinct count, if possible:
SELECT
a.Customer_ID, a.First_Name,
COUNT (b.Payment_Method) AS Payment_Method <- would like to get the distinct count
Count (b.Store_Number) as Store_Number <- would like to get the distinct count
SUM (b.Sales_Amount) AS Sales_Amount
FROM Table1 a
INNER JOIN Table2 b ON a.Customer_ID = b.Customer_ID
WHERE (((a.Date_ID) > 1234))
GROUP BY a.Customer_ID, a.First_Name
I am familiar with the SQL construction of this query and was hoping to recreate the results using MS-Access.