How to organize sellers and buyers in a SQL query, or remove duplicates or aggregate rows? I have this SQL statement: