Monday, March 19, 2012

Need some advice for a query

HI all,

I use this query for some stats but the problem with it is, i can't sort on the day. Can someone help me with this query so that i can see the unique hits a day sorted by day?

SELECT CONVERT (varchar, SessionStart, 106) AS dag,
COUNT(DISTINCT IPAdress) AS visitors
FROM tblStats
WHERE Crawler = 'False'
GROUP BY CONVERT (varchar, SessionStart, 106)

Cheers WimHI all,

I use this query for some stats but the problem with it is, i can't sort on the day. Can someone help me with this query so that i can see the unique hits a day sorted by day?

SELECT CONVERT (varchar, SessionStart, 106) AS dag,
COUNT(DISTINCT IPAdress) AS visitors
FROM tblStats
WHERE Crawler = 'False'
GROUP BY CONVERT (varchar, SessionStart, 106)

Cheers Wim

Try using one of the other formats? Maybe 111 or 120?

Regards,

hmscott|||Try using one of the other formats? Maybe 111 or 120?

Regards,

hmscott

Thanx 111 certainly solves my problem!

Regards Wim

No comments:

Post a Comment