- Aug 24, 2001
- 1,590
- 0
- 0
This isn't the first time I asked for help on SQL statements in this board, but I preferred to open a new topic due to the lenght of my new request.
I need to create some reports from my db, wich is on a MySQL server ver. 3.23.54. My app is written in ASP. The db structure is quite simple, but effective.
Table: Users
Fields: Username, Country, DateTime (using 0000-00-00 00:00:00 format)
Table: UserLogins
Fields: Username, DateTime (using 0000-00-00 00:00:00 format)
Reports I have to create:
1. Top 10 of the most active users (no. of logins). This should bring up a recordset that will allow me to create a list such as this:
1. john32 (34 logins)
2. wacky (22 logins)
...
10. mikeBe (11 logins)
2. Users registered today. This one is easy. No help needed.
3. Users registered in the past seven days. Should bring up all the users that registered in the site during the past week.
4. Users by country. This one should create something like this:
USA (33 users)
Mexico (23 users)
Brazil (10 users)
...
Any help will be very much appreciated.
I need to create some reports from my db, wich is on a MySQL server ver. 3.23.54. My app is written in ASP. The db structure is quite simple, but effective.
Table: Users
Fields: Username, Country, DateTime (using 0000-00-00 00:00:00 format)
Table: UserLogins
Fields: Username, DateTime (using 0000-00-00 00:00:00 format)
Reports I have to create:
1. Top 10 of the most active users (no. of logins). This should bring up a recordset that will allow me to create a list such as this:
1. john32 (34 logins)
2. wacky (22 logins)
...
10. mikeBe (11 logins)
2. Users registered today. This one is easy. No help needed.
3. Users registered in the past seven days. Should bring up all the users that registered in the site during the past week.
4. Users by country. This one should create something like this:
USA (33 users)
Mexico (23 users)
Brazil (10 users)
...
Any help will be very much appreciated.
