INNER JOIN
er den rigtige tilgang.
Forespørgslen ville være
SELECT user.id, user.name, user.status
FROM table1 AS user
INNER JOIN table2 AS service1 ON service1.sid = user.id
INNER JOIN table3 AS service2 ON service2.oid = user.id
WHERE service1.status = 1 AND service2.status = 1
Hvis du vil have brugere, der er på service1 ELLER service2, kan forespørgslen være
SELECT user.id, user.name, user.status
FROM table1 AS user
WHERE user.id IN (SELECT sid FROM table2 WHERE status=1) OR
user.id IN (SELECT oid FROM table3 WHERE status=1)