select patient_id from patient where date(visit.date_started) > date(patient.date_created)
The statement i think is self explanatory to what i am trying to do. I have two tables, patient and visit. I want to get patients who have started a visit, which is recorded on another table, on a later day than when the patient was registered in the system, which a patient is recorded when registered. note: All i need returned is the data on the patients table after the filter.