batteredveg
New member
- Local time
- Today, 22:42
- Joined
- Mar 13, 2016
- Messages
- 2
Hey guys
Hope you can help me - I'm trying to create a query which summarises a table containing people's case references and dates of birth.
I want to summarise, in a query, how many adults and children are contained within each case (using some use of Group By and Count in Query Builder I imagine), but I can't seem to work it out.
My table looks something like this:
And I would like my query to output like this:
Any advice on a query which would do the job would be greatly appreciated!
Regards
Paul
Hope you can help me - I'm trying to create a query which summarises a table containing people's case references and dates of birth.
I want to summarise, in a query, how many adults and children are contained within each case (using some use of Group By and Count in Query Builder I imagine), but I can't seem to work it out.
My table looks something like this:
Code:
Record ID Case Ref Name Date of Birth ...
--------- -------- --------------------- -------------
10001 ABC1001 John Smith 01-Jan-84 ...
10002 ABC1001 Janie Smith 04-Feb-81 ...
10003 ABC1001 Mark Smith 15-Apr-15 ...
10004 ABC1001 Jackie Smith 15-Apr-15 ...
10005 XJN9999 Mary Brown 01-Feb-76 ...
10006 XJN9999 Peter Brown 25-Dec-15 ...
And I would like my query to output like this:
Code:
Case Ref Adult Count Child Count
-------- ----------- -----------
ABC1001 2 2
XJN9999 1 1
... ... ...
Any advice on a query which would do the job would be greatly appreciated!
Regards
Paul