I have a table (Requests) with the following fields:
id, requestType, userEmail, date
I want to find the average number of requests per user over a given period (i.e. over the last month). Any suggestions?
Thanks!
Greg
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Something like SUM feature will work. Might be a little slow.
SQL SUM
I would also recommend, if you have a lot of request, to have one row per user per day and just update the request total for that user.
Edit: If you want the last 30 days something like this query should work. It worked on my test table.