SQL : Multiple Row and Column Subqueries - w3resource

PHOTO EMBED

Fri Oct 15 2021 14:24:45 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira #sql

select ord_num, agent_code, ord_date, ord_amount
from orders
where(agent_code, ord_amount) IN
(SELECT agent_code, MIN(ord_amount)
FROM orders 
GROUP BY agent_code);  
content_copyCOPY

https://www.w3resource.com/sql/subqueries/multiple-row-column-subqueries.php