A
ager669
I have two tables. One has the user_id and the sessions in a datetime format
(yyyy,mm,dd hh:mm:ss). The other one has the user_id and the users' company.
Example
table1
user_id time
t1 12-02-2005 11:51:00
t2 12-02-2005 12:02:00
t1 12-02-2005 12:30:30
table2
user_id company
t1 xpto1
t2 xpto2
If i want to know of many distinct users by company had connected by day how
can i do the query? It's easy if i want the number of sessions of each one!
result
date company #
12-02-2005 xpto1 1
12-02-2005 xpto2 1
Thanks in advance!
(yyyy,mm,dd hh:mm:ss). The other one has the user_id and the users' company.
Example
table1
user_id time
t1 12-02-2005 11:51:00
t2 12-02-2005 12:02:00
t1 12-02-2005 12:30:30
table2
user_id company
t1 xpto1
t2 xpto2
If i want to know of many distinct users by company had connected by day how
can i do the query? It's easy if i want the number of sessions of each one!
result
date company #
12-02-2005 xpto1 1
12-02-2005 xpto2 1
Thanks in advance!