Hi,
I would like to count inspections and group them by customer (for those
where the repdate = #1/1/1900#)
Something like:
SELECT customerid, count() AS Inpections
FROM inspection
WHERE repdate = #1/1/1900#
GROUP BY customerid;
this works fine!
But now i would like the customer name instead of the ID
so i have to join in another table called Customer to find the CustomerName
with the right CustomerID
so i thought it would work like:
SELECT i.customerid, c.customername, count(i.repdate) AS Inpections
FROM inspection AS i, customer AS c
WHERE i.repdate = #1/1/1900#
and i.customerid = c.customerid
GROUP BY i.customerid, c.customername;
when i run this querry, the counts are not correct, (much to high) seems
like it also counts the iteration for the joined table or so.
anybody??
thanks a lot!
bjorn