Re: Sum of a column obtained from select query
From: zeyneddine (zeyneddine_at_discussions.microsoft.com)
Date: 08/13/04
- Next message: Joe Celko: "Re: Doubling the order"
- Previous message: Mike John: "Re: Email trigger not working - please help"
- In reply to: Partha Mandayam: "Re: Sum of a column obtained from select query"
- Next in thread: Joe Celko: "Re: Sum of a column obtained from select query"
- Reply: Joe Celko: "Re: Sum of a column obtained from select query"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 13 Aug 2004 12:39:02 -0700
select cpt4_code_id, count(cpt_code_id) as CPT4_CODE, desc_30
from claim_detail inner join claims on claim_detail.claim_id=claims.claim_id
inner join cpt4_code_mstr on cpt4_code_mstr.desc_30 =
claim_detail.cpt4_description where claims.refer_phys_last='Tom'
and claims.refer_phys_first='harry'
group by cpt4_code_id, desc_30
I need to get a sum of CPT4_CODE at the end of the result ***.
"Partha Mandayam" wrote:
> Please post your original query and I'll tell you how to modify it.
>
> Regards
>
> Partha Mandayam
> Software Consultant
> Home page: http://partha.tripod.com
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
>
- Next message: Joe Celko: "Re: Doubling the order"
- Previous message: Mike John: "Re: Email trigger not working - please help"
- In reply to: Partha Mandayam: "Re: Sum of a column obtained from select query"
- Next in thread: Joe Celko: "Re: Sum of a column obtained from select query"
- Reply: Joe Celko: "Re: Sum of a column obtained from select query"
- Messages sorted by: [ date ] [ thread ]