use 2 distinct in one query of sql code example
Example: select distinct on 2 columns
SELECT agent_code, ord_amount, cust_code, ord_num
FROM orders
WHERE agent_code='A002';
SELECT agent_code, ord_amount, cust_code, ord_num
FROM orders
WHERE agent_code='A002';