• It would help us if you could post the DDL for the table(s) involved, sample data for the tables, and expected results based on the sample data.