实现车辆库存表的一个功能,查询出所有出库车辆的最后一次出库记录
select fld_bike_id,fld_outstore_time from
(select fld_bike_id,fld_outstore_time,row_number() over (partition by fld_bike_id order by fld_outstore_time desc) rk from tb2_bike_out where fld_bike_id in
( select fld_bike_id from tb2_bike_storage where fld_mount = 0))
where rk=1;