Reputation: 1
In my case below, the figures under 'weekdays' 2-6 indicate Mondays to Fridays. In the third week the figure 2 which is Monday of the week is missing. I want to delete the rest data of this week to ensure any week will have complete trading days. Can you please give me some helps? Thank you very much in advance!
Date Weekdays Volume
2000/01/03 2 1014411712
2000/01/04 3 1088000256
2000/01/05 4 1281538944
2000/01/06 5 1197224320
2000/01/07 6 1303269504
2000/01/10 2 1118983936
2000/01/11 3 1128259456
2000/01/12 4 1096179072
2000/01/13 5 1033687488
2000/01/14 6 1174890624
2000/01/18 3 1075011840
2000/01/19 4 1096254464
2000/01/20 5 1121080064
2000/01/21 6 1223604992
Upvotes: 0
Views: 60
Reputation: 6378
Perhaps:
proc sql;
create table want as
select *
from have
group by week(date)
having count(*)=5
order by date
;
quit;
Assuming you don't have dups, or other such problems.
HTH, --Q.
Upvotes: 1