I think I need to complete a few to many merge. For visual purposes, I took a screenshot of the data I want to merge on two datasets, but in reality, the data is all in one Excel file, on two different tabs. Is it possible to do a proc sql procedure to merge and combine datasets on multiple variables? I need to merge the data on "siteid" AND "date" and "rater". I have 28 sites total and each site was observed 5 times (mostly by the same "rater", but sometimes a different one), with individual observations varying by day from as few as 1 to as many as 100+. I eventually want to get an average of the "sec" variables for each site observed. ("sec" is time, in seconds, spent performing observed activity). Here is some code I came up with, but I have not had a chance to run it to see if it would work : proc sql; create table <want> as select * from <have> group by siteid having date=min(date) order by siteid, date, rater; quit;
... View more