469,964 Members | 1,616 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,964 developers. It's quick & easy.

Pls help me solving this....

Hi All,

I have a table Dept_Stores in Denormalized format

Dept_Name Money
Marketing 1500
Sales 2500
Marketing 1500
Production 5000
Sales 3500
Marketing 1000
Sales 3500

My question is , can i use the table which would result from a query

Select Dept_Name , Sum(Money) from Dept_stores group by dept_name; for any other subsequent queries like to find the Max , Min, Avg etc
Dec 24 '06 #1
1 1073
Let me put my question more clearly,

I want to get the department name (Dept_Name), Money earned or spent (Mny_Erned_Spnt) from the table Dept_Stores, which has the maximum amount of total Mny_Erned_Spnt.....

To put simply I need Max(Sum(Mny_Erned_Spnt))... Can you help me in getting an SQL for this requirement
Dec 25 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Juha Haataja | last post: by
16 posts views Thread by Martin Jørgensen | last post: by
5 posts views Thread by bparanj | last post: by
1 post views Thread by bparanj | last post: by
9 posts views Thread by TG | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.