I have this query which is giving output as bill_to address instead to ship_to address for the given trx_numbers. I tried with adding joins and other tables still I'm unable to get the correct ship_to address. If I try to add one-one table and join, then I'm getting correct address for that party name, and then as soon as i join the transaction table(trx), the address changes and it's the wrong one. Attached is the query
sql query.sql