Below is the list of some Advanced SAS Interview Questions. It helps to test the knowledge on advanced SAS topics.
PROC SQL Clauses and Syntax
1) Name the incorrect clause of the below program.
proc sql; select gender, mean(height) as avgheight from class.students class.health where students.id = health.id group by gender;
A) GROUP BY
B) WHERE
C) FROM
D) SELECT
Ans. C
Click Here for the Answer
Ans. C
2) Select the clause that specifies the tables of Fruits and Vegetables to be queried. libref Quantity is the library assigned for these tables.
A) where quantity.fruits, quantity.vegetables
B) from quantity.fruits, quantity.vegetables
C) from quantity.fruits quantity.vegetables
D) select quantity.fruits quantity.vegetables
Click Here for the Answer
Ans. B

3) The program below contains ——— statements.
proc sql; select pens, pencils, pens + pencils as sumsales from sales.manufacture order by sumsales;quit;
A) Two
B) Four
C) Six
D) Eight
Click Here for the Answer
Ans. A
4) List the incorrect clause from the below program.
proc sql; select style, sqyard, classrooms from choice.schools where sqyard ge 700;quit;
A) WHERE
B) SELECT
C) FROM
D) Both A & B
Click Here for the Answer
Ans. B
5. Which clause sorts rows by column values?
A) Sort cost books
B) Sort by cost books
C) Order by cost, books
D) Order cost, books
Click Here for the Answer
Ans. C
Missing Values, Subqueries, and Remerging Questions for SAS Interview
6. In PROC SQL, if a summary function is missing along with the GROUP BY clause, then the following happens
A) Grouping or sorting of data will not occur, though the step executes
B) The clause will convert from GROUP BY to ORDER BY
C) There will be default summing of the first numeric column
D) The step will not execute
Click Here for the Answer
Ans. B
7. Which WHERE clause selects rows that have no value in the Class column?
A) WHERE class is null
B) WHERE class is missing
C) WHERE class not exist
D) both A & B
Click Here for the Answer
Ans. D
8) Identify the false statement from the below PROC SQL query.
proc sql; validate select name label = 'Company', rate label = 'Turnover Rate' from companies.turnover where 'manufacturer' = (select manufacturers from companies.manufacturers where turnover.name = manufacturers.company) order by 2;
A) Invalid Syntax
B) Cannot Execute
C) Subquery requires values before returning values
D) After submitting the query, the log will determine whether the syntax is valid
Click Here for the Answer
Ans. A
9) Identify the correct statement about the data remerging in proc SQL.
A) Remerging of data is possible only by using the subquery
B) During remerging of data, the SAS log displays the related message
C) Use of data remerging helps in avoiding creating two passes by the data
D) During data remerging, data from two different tables is combined
Click Here for the Answer
Ans. B
10) A noncorrelated subquery, a nested query,
A) necessitates the outer query to pass a single value
B) Executes independently without the need for an outer query
C) Holds a minimum of a single summary function
D) Returns one single value to the outer query
Click Here for the Answer
Ans. B
To get training details, visit the page, Clinical SAS Training Online.
The training includes the following,
1) BASE & ADVANCED SAS TRAINING (Technical Part) – 2Months
2) CLINICAL SAS TRAINING (Domain Part) – 2Months
Schedule: Three days per week or weekend classes.
To listen to the explanation of solving SAS interview questions, click on the below link for a sample video.