clear markdown compare help best fiddles feedback dbanow.uk a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2335476 fiddles created (27402 in the last week).

CREATE TABLE members ( memberid integer PRIMARY KEY, name varchar(100) ) ;
 hidden batch(es)


INSERT INTO members (memberid, name) VALUES (1, 'member 1'), (2, 'member 2') ;
 hidden batch(es)


CREATE TABLE fees ( memberid integer REFERENCES members(memberid), amountpaid decimal(10,2) NOT NULL, paiddate date NOT NULL ) ;
 hidden batch(es)


INSERT INTO fees (memberid, amountpaid, paiddate) VALUES (1, 100.0, curdate()), (2, 100.0, curdate() - interval 1 month);
 hidden batch(es)


SELECT * FROM fees JOIN members ON fees.memberid = members.memberid;
memberid amountpaid paiddate memberid name
1 100.00 2020-01-20 1 member 1
2 100.00 2019-12-20 2 member 2
 hidden batch(es)


SELECT memberid, name FROM members WHERE memberid NOT IN (SELECT memberid FROM fees WHERE YEAR(paiddate) = YEAR(curdate()) AND MONTH(paiddate) = MONTH(curdate()) )
memberid name
2 member 2
 hidden batch(es)