OWNER DEPT 1 A 1 A 1 A 2 A 2 B 3 B 3 B 3 B 3 Cand I need to get a count of how many departments there are for each owner
OWNER NUM_DEPTS 1 1 (A) 2 2 (A/B) 3 2 (B/C)In VFP 9 I would do something like
SELECT aa.owner,COUNT(*) AS num_depts FROM (select DISTINCT owner,dept FROM myCursor) aa GROUP BY 1but I'm having trouble remembering how to do this in one statement in VFP 8