Dont know how to query last 100 visitors (1 Viewer)

pikachew

Registered User.
Local time
Today, 21:22
Joined
Jan 26, 2005
Messages
34
Hi all,
I have a table, "S" with the following columns
Columns are :
Sid
UserId
Date (Date/Time DataType)
Time (Date/Time DataType)
Amount

I need a query that returns the last 100 visitors to my site.
How can i do that?

Please advise
Many Thanks
 

MarkK

bit cruncher
Local time
Today, 06:22
Joined
Mar 17, 2004
Messages
8,186
This'll return the last 100 records in the table S if SID's are unique and ascending...

SELECT TOP 100 S.*
FROM S
ORDER BY S.SID DESC;

Not enough information to determine anything about the site or the visitors though. If one visit records one SID, and each visitor has a unique SID, and one visitor visited 50 times, then this is not your solution.
 

pikachew

Registered User.
Local time
Today, 21:22
Joined
Jan 26, 2005
Messages
34
Thanks a lot...It Seems to be working...
:)
 

Users who are viewing this thread

Top Bottom