I am using Access to query FoxPro database. I am trying to have multiple distinct counts. The query works with one distinct count but not with multiples. Here is the query, any ideas?
Osher
SELECT trnsdate, count(distinct(ordernbr)) as ord_count, count(distinct(ticketnbr)) as employee, count(distinct(tranhst.partnbr)) as TotLines, sum(shipqty) as TotQty, sum(shipqty*itemas.weight) as Totweight
FROM tranhst, salhst, itemas
WHERE trnsdate Between DateTime(2002,04,30) And DateTime(2002,04,30) And transcode = 'SHP' and tranhst.document = salhst.invoicenbr and tranhst.partnbr = salhst.partnbr and salhst.partnbr = itemas.partnum
GROUP BY trnsdate
Osher
SELECT trnsdate, count(distinct(ordernbr)) as ord_count, count(distinct(ticketnbr)) as employee, count(distinct(tranhst.partnbr)) as TotLines, sum(shipqty) as TotQty, sum(shipqty*itemas.weight) as Totweight
FROM tranhst, salhst, itemas
WHERE trnsdate Between DateTime(2002,04,30) And DateTime(2002,04,30) And transcode = 'SHP' and tranhst.document = salhst.invoicenbr and tranhst.partnbr = salhst.partnbr and salhst.partnbr = itemas.partnum
GROUP BY trnsdate