IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How can I tell who's surfing most today?, SQL for use the Advanced SQL viewer
Martyn
post Nov 15 2005, 03:30 PM
Post #1


WSF Commander
*******

Group: Admin
Posts: 4,662
Joined: 26-August 05
Member No.: 10



The following SQL will display a list of members who have surfed today and order them with the busiest at the top. To use this SQL login to your BCP and select Advanced SQL Viewer. Cut and paste it into the custom SQL text box and press submit.

CODE
SELECT vtp_members.id, vtp_members.name, vtp_members.email, count(vtp_tracking.id) hits_today
FROM vtp_members, vtp_tracking
WHERE vtp_tracking.credit_members_id=vtp_members.id
AND vtp_tracking.action_date=curdate()
GROUP BY vtp_members.id
ORDER BY hits_today DESC
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th March 2024 - 11:12 AM