G
Guest
I am trying to modify a sql code based on John Spencer's thread on 2/5/07.
Ideally I want my query result to show the count of each unique value grouped
by Lane, by LastName.
Supporting data:
Lane LastName MA_ID INT_ID INR_ID PRN_ID
A Smith 1264 23057 13128 3715
A Smith 1264 23057 13341 3705
B Jones 1264 23000 13144 3705
SELECT Count(Tmp.MA_ID) as CT_MA_ID
FROM
(SELECT DISTINCT MA_ID
FROM qryBPAI) as Tmp
My current attempt shows a total of MA_ID but I would like to include the
other columns and a grouping in a format as below. Any help would be
appreciated.
Lane LastName MA_ID INT_ID INR_ID PRN_ID
A Smith 1 1 2 2
A Jones 1 1 1 1
Ideally I want my query result to show the count of each unique value grouped
by Lane, by LastName.
Supporting data:
Lane LastName MA_ID INT_ID INR_ID PRN_ID
A Smith 1264 23057 13128 3715
A Smith 1264 23057 13341 3705
B Jones 1264 23000 13144 3705
SELECT Count(Tmp.MA_ID) as CT_MA_ID
FROM
(SELECT DISTINCT MA_ID
FROM qryBPAI) as Tmp
My current attempt shows a total of MA_ID but I would like to include the
other columns and a grouping in a format as below. Any help would be
appreciated.
Lane LastName MA_ID INT_ID INR_ID PRN_ID
A Smith 1 1 2 2
A Jones 1 1 1 1