1👍
✅
owner_id
not user_id
:
SELECT COUNT(*)
FROM links_grouptraffic
JOIN links_group on links_grouptraffic.which_group_id = links_group.id
WHERE links_grouptraffic.visitor_id = owner_id
AND links_grouptraffic.time > %s
Source:stackexchange.com