我有两个桌子
表A具有usr_id , usr_name , usr_status [1 or 0]
表B具有id , usr_id,tracked_date [Each user can track multiple time]
需要获取每个用户有usr_status = 1
如何通过mysql查询实现?
尝试过:
SELECT
*
FROM
tableb b
LEFT JOIN
tablea a ON a.usr_id = b.usr_id
GROUP BY a.usr_id
请咨询?