My question is in the picture:
SQL query
Advertisement
Answer
if you need the last rev by num and week for each po_num you should use a subquery for max ver
select * from table a inner join ( select max(rev) max_rev , week , Po_num from table group by week, Po_num ) t on t.max_rev = a.rev and t.po_num = a.po_num and t.week = a.week