Colleagues,
I have a table called salas_usuarios, this table contains all the users registered in the rooms and another table called users, where I store the users. But I would like to check which users are not registered in a certain room. The query I am using is as follows:
SELECT *
FROM usuarios USU
INNER JOIN sala_usuarios SAL ON USU.id_usuario != SALA.codigo_usuario_fk
INNER JOIN predio PRE ON PRE.codigo_predio = SAL.codigo_predio_fk
WHERE SALA.codigo_sala =93
GROUP BY USU.id_usuario
Only list all users and not only room 93