Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sql query help

Author  Topic 

pbajpei
Starting Member

2 Posts

Posted - 2002-09-26 : 12:18:55
Hi
I need help in writing a sql query for the data given below


Market Description Revenue
--------------------- --------------------
LARGE CORPORATE 0.0
LARGE CORPORATE 0.0
OTHERS 0.0
OTHERS 1.98
LARGE CORPORATE 5.1299999999999999
LARGE CORPORATE 6.8500000000000005
LARGE CORPORATE 10.98
LARGE CORPORATE 16.490000000000002
LARGE CORPORATE 21.129999999999999
LARGE CORPORATE 28.66
LARGE CORPORATE 38.579999999999998
OTHERS 68.420000000000002
OTHERS 87.590000000000003
LARGE CORPORATE 90.040000000000006
LARGE CORPORATE 511.94
LARGE CORPORATE 625.01999999999998
LARGE CORPORATE 662.75999999999999
LARGE CORPORATE 700.68000000000006
LARGE CORPORATE 2898.6799999999998
LARGE CORPORATE 3273.96
OTHERS 3285.4400000000001
LARGE CORPORATE 3580.0799999999999
LARGE CORPORATE 4089.1900000000001
LARGE CORPORATE 4373.5200000000004
LARGE CORPORATE 16207.550000000001
LARGE CORPORATE 19862.740000000002
LARGE CORPORATE 33186.150000000001
LARGE CORPORATE 107642.79000000001

The output of query should be in the following format

Market Description 1st 10%(revenue) 2nd 10%(revenue) 3rd 10%(revenue) 4th 10%(revenue) 5th 10%(revenue) rest 50%(revenue)
------------------ ---------------- ---------------- --------------- ---------------- --------------- ----------------

Would appreciate any help on this query.

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-09-26 : 12:24:21
quote:
Would appreciate any help on this query
We would appreciate a better description of what EXACTLY you want to appear in those columns. How about a sample of the output, not just a description of it?

Sorry, it is NOT AT ALL obvious what you're looking for.

Go to Top of Page

pbajpei
Starting Member

2 Posts

Posted - 2002-09-26 : 12:46:21
Hi
I'm also not sure of the output i was given the output format sheet. My understanding is i need to group the Market description an find the revenue percentage

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-09-26 : 13:20:23
quote:
I'm also not sure of the output i was given the output format sheet. My understanding is i need to group the Market description an find the revenue percentage
Please go back to whoever gave you that format sheet and smack them in the head.

PERCENTAGE OF WHAT??? I'm not yelling at you, but without any sample of the output, or a formula on what they want calculated, there's no way anyone can help you figure this out.

Go to Top of Page
   

- Advertisement -