How can I tell who's surfing most today?, SQL for use the Advanced SQL viewer |
How can I tell who's surfing most today?, SQL for use the Advanced SQL viewer |
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 |
|
|
Lo-Fi Version | Time is now: 1st November 2024 - 02:10 AM |