Re: Aggregate function, Grouping
- From: "Vitali Kalinin" <vitkalinin@xxxxxxxxx>
- Date: Fri, 19 May 2006 15:00:50 +0300
How about this:
SELECT
bl.GR_KEY, bl.GroupOrder, bl.UseOverhead,
SUM (Amount * price) as "SubTotal",
SUM(IIF (bl.UseClientAmount = True,
bl.Amount + bl.ClientAmount,
bl.Amount)) as "RealAmount"
FROM
Budget_Lines bl
WHERE
bl.BU_KEY = :BU_KEY
GROUP BY
bl.BU_KEY, bl.GroupOrder, bl.UseOverhead, bl.GR_KEY
.
- Follow-Ups:
- Re: Aggregate function, Grouping
- From: Kim S
- Re: Aggregate function, Grouping
- References:
- Aggregate function, Grouping
- From: Kim S
- Aggregate function, Grouping
- Prev by Date: Re: Aggregate function, Grouping
- Next by Date: Re: Aggregate function, Grouping
- Previous by thread: Re: Aggregate function, Grouping
- Next by thread: Re: Aggregate function, Grouping
- Index(es):
Relevant Pages
|