select distinct columbs based on two 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';