hello i have the database like this it has 2 tables users and payments
table payments has list of months and years when user has paid like, if the user has paid for the month of january 2019 database payments has month as 1 and year as 2019 and user is suppose to pay every month and i need to select the list of all the users who has not paid in any month .
right now i am doing it like this
select name,month,year from users u left join payments p where
( (u.usid=p.usid and subscribed='1') and
(year ='2018' and month NOT IN ='1,2,3,4,5,6,7,8,9,10,11,12') )
Thankx
It may be little simple to do but i cant figure it out .