I have the data set have. How can I delete the rows where same ID has same Test_Name and same Test_Result within next 7 days of previous Test_Result date (example, ID=001).
data have; input id $ Test_name $ Test_Result $ date :mmddyy10.; format date mmddyy10.; cards; 001 AB Pos 1/5/2021 002 CD Neg 1/6/2021 003 CD Pos 1/7/2021 004 AB Neg 1/12/2021 005 CD Pos 1/21/2021 006 CD Neg 1/23/2021 007 CD Neg 1/5/2021 001 AB Pos 1/9/2021 008 AB Pos 1/6/2021 009 AB Neg 1/7/2021 010 CD Pos 1/12/2021 011 CD Neg 1/21/2021 012 CD Neg 1/23/2021 013 AB Pos 2/5/2021 014 CD Neg 2/6/2021 003 CD Pos 2/7/2021 015 AB Neg 2/12/2021 016 CD Pos 2/21/2021 006 CD Neg 2/23/2021 017 CD Neg 2/5/2021 018 AB Pos 2/9/2021 008 AB Pos 2/6/2021 019 AB Neg 2/7/2021 020 CD Pos 2/14/2021 021 CD Neg 2/25/2021 022 CD Neg 2/27/2021 ; run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.