Multiple choice technology programming languages

A realtor has two customers.One customer wants to view a list of homes selling for less than $60,000.the other customer wants to view a list of homes selling for greater than $100,000.Assuming the PRICE variable is numeric,which one of the following PRINT procedure steps will select all desired observations.

  1. proc print data=sasuser.houses; where price lt 60000;where price gt 100000;run;

  2. proc print data=sasuser.houses; where price lt 60000 or price gt 100000;run;

  3. proc print data=sasuser.houses; where price lt 60000 and price gt 100000;run;

  4. proc print data=sasuser.houses; where price lt 60000 or where price gt 100000;run;

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Use OR in WHERE clause to select observations meeting either condition: price < 60000 OR price > 100000. Option A repeats WHERE keyword (syntax error). Option C uses AND which would match nothing (price cannot be both <60000 and >100000). Option D incorrectly adds WHERE keyword before second condition.