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
 Transact-SQL (2000)
 query results grouped by date

Author  Topic 

kaisdd
Starting Member

17 Posts

Posted - 2006-06-08 : 14:58:27
hello there,

i think i´m stuck with a sql query. hope somebody can help.

i have a tabel wich saves the number of access to items per day.
structure:

AccessID (int, pkey)
AccessItemID (int)
AccessDate (smalldatetime)
AccessCount (smallint)

i need to return 1 to n top record(s) for each day. thats it. but i can´t figure it out.

X002548
Not Just a Number

15586 Posts

Posted - 2006-06-08 : 15:48:29
Can you supply some more info like I ask in the help link in my sig?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

kaisdd
Starting Member

17 Posts

Posted - 2006-06-08 : 15:57:34
ups. i´m sorry. i think i found it.
it´s that "top n for each group" thing. ;)
sorry for my question
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-06-09 : 10:59:07
quote:
Originally posted by kaisdd

ups. i´m sorry. i think i found it.
it´s that "top n for each group" thing. ;)
sorry for my question


Refer point 2
http://weblogs.sqlteam.com/mladenp/archive/2005/08/01/7421.aspx

Madhivanan

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

- Advertisement -