create or fix sql

Job ID: 31713767

Budget: $10 – $30 USD

i attach two tables
"monim"

"kriot_yomi"

in monim there are two fields that interest_me
a) "mone"
b) "mone_av"

in "kriot_yomi" there are two fields that interest me

"day_date"
"mone"


so "mone" is common in two tables
mone _av is a father of many "mone"
so "select mone_av from monim group by mone_av
can give us all the fathes abd select "mone_av from monim where mone = something" will give us the father


"kriot_ratsif" has records containing "mone and date ("day_date")

some "mone_av" has a record with day_date and some are missing

i want an sql that will find all the cases where there is no "day_date" and "mone" in "kriot_ratsif" where the mone is the "mone_av"

or fix this SQL

SELECT DISTINCT day_date ,mone_av fROM view_yomi
WHERE NOT IN (SELECT DISTINCT day_date, mone FROM kriot_yomi )

there should be only 1 record of "mone" and "day_date!"
-------------------------------------------------
Related categories: SQL MySQL Database Programming