I am trying to implement a mysql query for some report and can't figure it out.
Let's say we have a 'companies'
table, a 'users'
and a 'company_users'
.
The requested result set is:
'company_name', 'active_users', 'date'
(lets say 30 days back).
So I have to calculate user counts up to date based on users.created_at
.
I could use some help to achieve it without stored procedure because I'll need to join the result set with another table.
Thank you.
问问题
74 次