>>Second, it's not clear what into you store into StatisticDaily.User table because your query returns # of hits per user not the # of unique users.
>
>I have a stat for the number of logins done on a daily basis. I also have another stat for the number of unique logins done on a daily basis (as per the user). Then, I would like to add another stat, which is StatisticDaily.User, which will be the number of users that were online on a daily basis. Because, not every users are logging in every day. Some are staying online for days. The way I have done it so far works. For example, I could have a result like this for those three stats:
>
>
>Total logins Unique logins Users
> 1212 1200 1800
> 1117 1089 1760
> 1256 1200 1400
>
>
>So, basically, this command seems to work when I process it on a single day. But, I need to execute an update command so I will be able to update all previous records.
I still do not understand how do you get # of users from your query when it returns # of hits per user.
--sb--