0
我有名爲id
和key
的列。我按id
排序數據,我需要得到每個id
的前5個鍵。sas按照編號排序和篩選
PROC SQL OUTOBS=5;
CREATE TABLE WORK.QUERY_001 AS
SELECT DISTINCT t1.*
FROM work.DATA t1
ORDER BY t1.id,
t1.key DESC;
QUIT;
另外,我忘了提,這已經無關SAS宏! – mjsqu