Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
SELECT Node,[time],MaximumFROM(SELECT *,DENSE_RANK() OVER (PARTITION BY DATEADD(mm,DATEDIFF(mm,0,[time]),0) ORDER BY Maximum DESC) AS SeqFROM Table)tWHERE Seq <=5
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
amurark
Yak Posting Veteran
55 Posts
Posted - 2012-12-27 : 00:11:31
Hi Visakh16thnaks alot or your expert answers . Pls check i am recieving sytax errroras missng operator in query expression 'dense over () 'Ankita
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2012-12-27 : 00:12:43
its not dense its DENSE_RANKB/w are you using sql server?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
amurark
Yak Posting Veteran
55 Posts
Posted - 2012-12-27 : 00:25:10
no rite now i took excel as my database for testing purposeAnkita
amurark
Yak Posting Veteran
55 Posts
Posted - 2012-12-27 : 01:41:05
Please ex[palin me the meaning also of this query Please .Ankita