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
 General SQL Server Forums
 New to SQL Server Programming
 outputing largest number in list- SOLVED

Author  Topic 

ja660k
Starting Member

1 Post

Posted - 2008-09-05 : 03:39:04
hey guys, this is a noob question
im new to sql
but i need to find and display the highest number in a list

what i have so far is


select max(count(NUM))
from stats
group by NUM
/


instead of giving me the highest value it counts how many highest values there are ... 1

can anyone help?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-09-05 : 03:54:44
select max(NUM)
from stats



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-05 : 03:57:39
http://msdn.microsoft.com/en-us/library/aa933240(SQL.80).aspx
Go to Top of Page
   

- Advertisement -