Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hi All,
I have three table in my database
1) products with two columns - product, price
2) region with two columns - SalesPerson, Region
3) transactions with five columns - date, SalesPerson, Product, Discount, Units
I want region wise net revenue. Calculation for revenue is : price*(1-discount)*Units
I am using below query for it. but it is not working. Kindly help me out on this.
select R.Region,(P.Price*(1-T.Discount)*T.Units) as [Net Revenue]
from region as R
inner join Transactions as T
on R.SalesRep = T.SalesRep
inner join Products as P
on p.Products = t.Product
group by r.Region
Thanks in advance!
Regards,
Shweta
I have three table in my database
1) products with two columns - product, price
2) region with two columns - SalesPerson, Region
3) transactions with five columns - date, SalesPerson, Product, Discount, Units
I want region wise net revenue. Calculation for revenue is : price*(1-discount)*Units
I am using below query for it. but it is not working. Kindly help me out on this.
select R.Region,(P.Price*(1-T.Discount)*T.Units) as [Net Revenue]
from region as R
inner join Transactions as T
on R.SalesRep = T.SalesRep
inner join Products as P
on p.Products = t.Product
group by r.Region
Thanks in advance!
Regards,
Shweta
Last edited: