I got a query: select id, phone, email, fType, user, date, area, formName, unit, eName from (SELECT Send.identity as id, Send.phone, Send.email, Send.form_type as fType, Send.user, Send.date, Ezer.area, Ezer.formName, UserName.unit, UserName.eName FROM (Send LEFT JOIN Ezer ON Send.form_type = Ezer.form_type) LEFT JOIN UserName ON Send.user = UserName.user);
Got another table ("Receive") with the columns date, idintity, and formType
I need to get the first query but with another flag column. I need to check if in the receive table there is a row with the same identity and form_type with date between the sent date and dateAdd('m', 1, send.date)
I am going in circle and can't find the answer
Please advice