MYSQL - find and show all duplicates within date difference critria
问题 This query below selects all rows that have a row with the same father registering 335 days or less since earlier registration. Is there a way to edit this query so that it does not eliminate the duplicate row in the output? I need to see all instances of the registration for that father within 335 days of each other. SELECT * FROM ymca_reg a later WHERE NOT EXISTS ( SELECT 1 FROM ymca_reg a earlier WHERE earlier.Father_First_Name = later.Father_First_Name AND earlier.Father_Last_Name = later