Hi, I have a dataset called data_1, I would like to delete smallest on largest 'Room_Rate' from the data within each (Brand, HTL_CD, Prod_Class_Name, RM_NBR, RM_TYP, REF_ROOM_TYP, SEASON_ID, DY_TYP) combination. For the example as below (data_1), I would like to delete the first and last row. If I used the following syntax: Proc Sql;
Create Table data_2 as select
Brand
,Htl_Cd
,Prod_Class_Name
,RM_TYP
,REF_RM_TYP
,Season_Id
,DY_TYP
,Room_Rate
from data_1
group by 1, 2, 3, 4, 5, 6, 7
having Room_Rate > min(Room_Rate) and Room_Rate < max(Room_Rate)
order by 1, 2, 3, 4, 5, 6, 7;
Quit; First two rows are deleted as they both have 'Room_Rate' $93. as well as the last row with 'Room_Rate' $144. But I do would like to keep one of the $93 row. Is there any way to handle it? Thanks!
... View more