SQL按类型分组,取日期最大的一条数据

		 select a.id,a.ORGANIZATION,a.CREATE_TIME,n from
(select id,ORGANIZATION,CREATE_TIME,row_number() over(partition by ORGANIZATION order by CREATE_TIME desc) as n
from t_pln_annual_target_header) a
where n<=1
row_number() over(partition by ORGANIZATION order by CREATE_TIME desc) as n
是按照什么分组,并且按照什么排序,会返回其中的rowumber,在外层用n取控制取多少条数据
                    SQL按类型分组,取日期最大的一条数据		 select a.id,a.ORGANIZATION,a.CREATE_TIME,n from(select id,ORGANIZATION,CREATE_TIME,row_number() over(partition by ORGANIZATION order by CREATE_TIME desc) as nfrom t_pln_annual_target_header) awhere n&lt;=1row_number() over(parti