Postgresql – SQL join query returns each result three times
I have two tables, tx and earliest. I’m trying to join them based on "UserId" and "AcceptorCode", and only return the records where "CreatedOn" in tx is greater than or equal to "EarliestPayDate" in earliest. WITH tx AS( SELECT "AcceptorCode",…