I want to use group by with join on below data:
statistics:
| id | user_id| date|
users:
| id | name | age|
My query which doesn't return table users:
SELECT user_id, sum(time_to_sec(date)/60) as mins
from `statistics`
JOIN user ON users.id = statistics.user_id
WHERE 1 and user_id=8 group BY user_id
Can anyone help?