I have a query that has two tables that have a one to many relationship. I need to count the number of unique records on the one side. I saw a post where someone else had the same problem, and Pat Hartman said to remove the join to the many side. The problem is that I can't do that because I need to count the number of unique records on the one side based on criteria in the many side.
For example, let's say there's a table called Customers with a field called CustomerID and a table called Orders with a field called ProductName. Each customer can have many orders. What I want to do is count the number of customers (CustomerID) for a certain product name (ProductName).
Can anyone help?
For example, let's say there's a table called Customers with a field called CustomerID and a table called Orders with a field called ProductName. Each customer can have many orders. What I want to do is count the number of customers (CustomerID) for a certain product name (ProductName).
Can anyone help?