Hi @manran411,
I would agree that the answer is A. The BY statement requires that the input dataset is sorted or grouped by the group identifier(s) or indexed appropriately, though.
B: There is no (documented) GROUPBY statement or option in PROC MEANS.
C: The CLASS statement has additional memory requirements (see section "Computational Resources" in Concepts: MEANS Procedure). These are the price for being able to deal with unsorted, non-indexed data.
😧 Multiple WHERE statements within the same PROC MEANS step do not make sense (as only the last WHERE statement would take effect). Multiple PROC MEANS steps with different WHERE statements, apart from being obviously inefficient, would first require memory to determine the WHERE conditions.