17,086
社区成员
发帖
与我相关
我的任务
分享
SELECT pid,
pdepartment,
ptype,
pstation,
pstarttime,
pstoptime,
pline,
pposition,
pequipment,
pscope,
preason
FROM (select pid,
pdepartment,
ptype,
pstation,
pstarttime,
pstoptime,
pline,
pposition,
pequipment,
pscope,
preason,
row_number()over(order by pstarttime desc) rn
from powinfcol
where pdepartment = '1'
and ptype = '1'
and pstarttime >= to_date('2017-12-12', 'yyyy-mm-dd')
and pstarttime <= to_date('2017-12-14', 'yyyy-mm-dd'))
)
where rn <= 30