Count distinct parent and child records
Posted on 2008-10-08
I have a query which returns a individual records where a parent-child realtionship exists. I would like to count the distinct parent records and distinct child records. Each parent can have >1 child, but for some reason the number of parent records = child records which is incorrect. Here is an example
Parent Record 001 + Child Record 001
Parent Record 001 + Child Record 002
Parent Record 001 + Child Record 003
The result I am looking for would be 1 Parent + 3 Child on a single row returned in my query. It should be fairly simple, but I am stumped.
Thanks in advance for your help.