NC查询报表根据物料先分类在根据日期排序
select pk_material , nqtorigtaxprice
from (select pk_material,
nqtorigtaxprice,
row_number() over(PARTITION by pk_material order by dbilldate desc) rn
from po_order_b
where nvl(dr, 0) = 0)
where rn = 1
原文链接:https://blog.csdn.net/wxingcai/article/details/91044302