i have two tables "class" and "account_class (relation table)"
class
id name day time
1 course 1 sunday 08:00
2 course 2 monday 13:00
3 course 3 friday 19:00
4 course 4 saturday 01:00
and account_class
id username_account id_class
1 user1 1
2 user1 2
3 user2 3
4 user3 3
i want to select all class that not selected by user1, i tried left join, right join, inner join, but not working
here's my code
SELECT class.* FROM class WHERE NOT EXISTS (SELECT * FROM account_class WHERE account_class.username_account = 'faraazap')
if the code is correct, it should appear like this
id name day time
3 course 3 friday 19:00
4 course 4 saturday 01:00
Thanks