Quote:
Originally Posted by MrEyes
- Total users online in the last [time period].
|
This information lives in the session table, and also the lastactivity field of the user table.
Quote:
All users that have received more than [X] negative rep in the last hour that are not in a specific user group.
|
reputation lives in the reputation table.
Quote:
Then foreach of the users in that result set, I would like to perform the following queries:
- Total real post count
- User registered time (days).
- Current user reputation score.
- Total negative reputation points received in the last [time period].
- Total positive reputation points received in the last [time period].
- Total posts made by user in the last [time period].
- Total user posts made by user in the last [time period] where neg rep has been given.
- Total user posts made by user in the last [time period] where pos rep has been given.
- Total user posts, in the last [time period], where negative rep received for it is greater than [value]
- Total user posts, in the last [time period], where positive rep received for it is greater than [value]
|
post count can be gotten from the post table.
user join details are in user
reputation is in the reupation table.
both reputation and post have a dateline field which contains the time of the event.
Quote:
I use the term [time period] as I am not yet sure what time period I will be using for the queries, most likely and hour but if the db is flexible enough to use 24 hours or 10 minutes that would be a great advantage.
|
dateline goes down to the second. you can do whatever time perido you want.
Quote:
In addition to this is it possible to script a query that will move a user to a specific user group?
|
Yes. group details are in the user table.
Quote:
I intend to run this set of queries every hour, so if you have any optimisation advice I am all ears (or eyes as the case maybe here )
|
Set it up as a vb cron.
You said you didnt want the queries, so I didn't include them.