I have a dataset flight_demo which had 4 column namely origin, dest, carrier ,dep_time I want to find the bussiest time in a day for each carrier from dep_time column My code is: PROC SQL; CREATE TABLE xyz AS SELECT * FROM(SELECT DISTINCT DEP_TIME,CARRIER,n(DEP_TIME) AS N FROM CASE_1.FLIGHTM GROUP BY CARRIER,DEP_TIME ) ORDER BY N DESC ; QUIT; RUN; The problem with the output is that it gives for each time how many flight are departed from carrier what I want is only the bussiest time by each carrier like for example 18:59 DL 167 8:54 UA 166 7:55 B6 160 5:55 EV 158 i am not able to rectify how to do it using proc sql. Is there any other method to do such stuff? Any help will appreciate.
... View more