Advanced SAS Interview Questions You'll Most Likely Be Asked
()
About this ebook
· 215 Advanced SAS Interview Questions
· 77 HR Interview Questions
Read more from Vibrant Publishers
Core Java Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 4 out of 5 stars4/5Stakeholder Engagement Essentials You Always Wanted To Know: Self Learning Management Rating: 5 out of 5 stars5/5SAP HANA Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsOperations and Supply Chain Management Essentials You Always Wanted To Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsHR Analytics Essentials You Always Wanted To Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsProject Management Essentials You Always Wanted To Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsLeadership Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsDigital SAT Reading and Writing Practice Questions: Test Prep Series Rating: 5 out of 5 stars5/5Business Strategy Essentials You Always Wanted To Know: Self Learning Management Rating: 5 out of 5 stars5/5GRE Master Wordlist: 1535 Words for Verbal Mastery: Test Prep Series Rating: 4 out of 5 stars4/5Organizational Behavior Essentials You Always Wanted To Know: Self Learning Management Rating: 5 out of 5 stars5/5Financial Management Essentials You Always Wanted to Know: 5th Edition: Self Learning Management Rating: 0 out of 5 stars0 ratingsDiversity in the Workplace Essentials You Always Wanted To Know: Self Learning Management Rating: 5 out of 5 stars5/5Advanced Java Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 1 out of 5 stars1/5Microeconomics Essentials You Always Wanted to Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsGMAT Analytical Writing: Solutions to the Real Argument Topics: Test Prep Series Rating: 4 out of 5 stars4/5Business Law Essentials You Always Wanted To Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsPython Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsAdvanced C++ Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsJava/J2EE Design Patterns Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsHuman Resource Management Essentials You Always Wanted To Know: Self Learning Management Rating: 0 out of 5 stars0 ratingsRestful Java Web Services Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsC & C++ Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsFinancial Accounting Essentials You Always Wanted to Know: 5th Edition: Self Learning Management Rating: 0 out of 5 stars0 ratingsAdvanced SAS Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsWriting Impressive College Essays: Test Prep Series Rating: 0 out of 5 stars0 ratingsSQL Server Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsSAS Programming Guidelines Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsBase SAS Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsCCNA Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratings
Related to Advanced SAS Interview Questions You'll Most Likely Be Asked
Titles in the series (33)
CORE JAVA Interview Questions You'll Most Likely Be Asked Rating: 4 out of 5 stars4/5SQL Server Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsAdvanced JAVA Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsC & C++ Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsSoftware Testing Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsHibernate, Spring & Struts Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsC# Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsData Structures & Algorithms Interview Questions You'll Most Likely Be Asked Rating: 1 out of 5 stars1/5JavaScript Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsJava / J2EE Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsHadoop BIG DATA Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsORACLE PL/SQL Interview Questions You'll Most Likely Be Asked Rating: 5 out of 5 stars5/5JSP-Servlet Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsSAP HANA Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsAdvanced C++ Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsPython Interview Questions You'll Most Likely Be Asked Rating: 2 out of 5 stars2/5UNIX Shell Programming Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsAutomated Software Testing Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsCCNA Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsBase SAS Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsOperating Systems Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsLinux System Administrator Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsAdvanced SAS Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsIBM WebSphere Application Server Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsSAS Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsSAS Programming Guidelines Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsJava/J2EE Design Patterns Interview Questions You'll Most Likely Be Asked: Second Edition Rating: 0 out of 5 stars0 ratingsRESTful Java Web Services Interview Questions You'll Most Likely Be Asked: Second Edition Rating: 0 out of 5 stars0 ratingsCloud Computing Interview Questions You'll Most Likely Be Asked: Second Edition Rating: 0 out of 5 stars0 ratings
Related ebooks
Practical and Efficient SAS Programming: The Insider's Guide Rating: 0 out of 5 stars0 ratingsSAS Statistics by Example Rating: 5 out of 5 stars5/5The SAS Programmer's PROC REPORT Handbook: Basic to Advanced Reporting Techniques Rating: 0 out of 5 stars0 ratingsPROC DOCUMENT by Example Using SAS Rating: 0 out of 5 stars0 ratingsGetting Started with SAS Programming: Using SAS Studio in the Cloud Rating: 0 out of 5 stars0 ratingsSAS Functions by Example, Second Edition Rating: 1 out of 5 stars1/5Biostatistics by Example Using SAS Studio Rating: 0 out of 5 stars0 ratingsAdvanced SAS Interview Questions You'll Most Likely Be Asked: Job Interview Questions Series Rating: 0 out of 5 stars0 ratingsSAS Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsLogistic Regression Using SAS: Theory and Application, Second Edition Rating: 4 out of 5 stars4/5Learning PostgreSQL Rating: 1 out of 5 stars1/5100+ SQL Queries T-SQL for Microsoft SQL Server Rating: 4 out of 5 stars4/5SQL Server: Tips and Tricks - 2 Rating: 4 out of 5 stars4/5Survival Analysis Using SAS: A Practical Guide, Second Edition Rating: 0 out of 5 stars0 ratingsBase SAS Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsPROC SQL: Beyond the Basics Using SAS, Third Edition Rating: 0 out of 5 stars0 ratingsSAS Macro Programming Made Easy, Third Edition Rating: 3 out of 5 stars3/5SAS Certified Specialist Prep Guide: Base Programming Using SAS 9.4 Rating: 4 out of 5 stars4/5Fundamentals of Programming in SAS: A Case Studies Approach Rating: 0 out of 5 stars0 ratingsSAS Certified Professional Prep Guide: Advanced Programming Using SAS 9.4 Rating: 1 out of 5 stars1/5Exercises and Projects for The Little SAS Book, Sixth Edition Rating: 0 out of 5 stars0 ratingsSAS Programming Guidelines Interview Questions You'll Most Likely Be Asked Rating: 0 out of 5 stars0 ratingsThe Little SAS Book: A Primer, Sixth Edition Rating: 5 out of 5 stars5/5End-to-End Data Science with SAS: A Hands-On Programming Guide Rating: 0 out of 5 stars0 ratingsSAS Viya: The R Perspective Rating: 0 out of 5 stars0 ratingsThe SAS Programmer's PROC REPORT Handbook: ODS Companion Rating: 0 out of 5 stars0 ratingsLearning SAS by Example: A Programmer's Guide, Second Edition Rating: 3 out of 5 stars3/5Cody's Data Cleaning Techniques Using SAS, Third Edition Rating: 5 out of 5 stars5/5
Applications & Software For You
Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Logic Pro X For Dummies Rating: 0 out of 5 stars0 ratingsSound Design for Filmmakers: Film School Sound Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5GarageBand For Dummies Rating: 5 out of 5 stars5/5Synthesizer Cookbook: How to Use Filters: Sound Design for Beginners, #2 Rating: 3 out of 5 stars3/5Hilarious Jokes for Minecrafters: Mobs, Creepers, Skeletons, and More Rating: 1 out of 5 stars1/5How to Create Cpn Numbers the Right way: A Step by Step Guide to Creating cpn Numbers Legally Rating: 4 out of 5 stars4/5The Unofficial Guide to Open Broadcaster Software: OBS: The World's Most Popular Free Live-Streaming Application Rating: 0 out of 5 stars0 ratingsAdobe Photoshop: A Complete Course and Compendium of Features Rating: 5 out of 5 stars5/5The Little SAS Book: A Primer, Sixth Edition Rating: 5 out of 5 stars5/5iPhone Photography For Dummies Rating: 0 out of 5 stars0 ratingsAdobe Illustrator: A Complete Course and Compendium of Features Rating: 0 out of 5 stars0 ratingsBlender 3D Basics Beginner's Guide Second Edition Rating: 5 out of 5 stars5/5Mastering QuickBooks 2020: The ultimate guide to bookkeeping and QuickBooks Online Rating: 0 out of 5 stars0 ratingsStart Your Own Podcast Business: Your Step-By-Step Guide to Success Rating: 5 out of 5 stars5/5Experts' Guide to OneNote Rating: 5 out of 5 stars5/5GarageBand Basics: The Complete Guide to GarageBand: Music Rating: 0 out of 5 stars0 ratingsData Science and Big Data Analytics: Discovering, Analyzing, Visualizing and Presenting Data Rating: 0 out of 5 stars0 ratingsVocal Rescue: Rediscover the Beauty, Power and Freedom in Your Singing Rating: 4 out of 5 stars4/5Affinity Photo How To Rating: 0 out of 5 stars0 ratingsHow Do I Do That In InDesign? Rating: 5 out of 5 stars5/5Mastering ChatGPT Rating: 0 out of 5 stars0 ratingsSix Figure Blogging In 3 Months Rating: 4 out of 5 stars4/5Adobe InDesign CC: A Complete Course and Compendium of Features Rating: 0 out of 5 stars0 ratingsiPhone X Hacks, Tips and Tricks: Discover 101 Awesome Tips and Tricks for iPhone XS, XS Max and iPhone X Rating: 3 out of 5 stars3/5FL Studio Cookbook Rating: 4 out of 5 stars4/5
Reviews for Advanced SAS Interview Questions You'll Most Likely Be Asked
0 ratings0 reviews
Book preview
Advanced SAS Interview Questions You'll Most Likely Be Asked - Vibrant Publishers
Advanced SAS
Interview Questions
You'll Most Likely Be Asked
Job Interview Questions Series
www.vibrantpublishers.com
*****
Advanced SAS Interview Questions You'll Most Likely Be Asked
Published by Vibrant Publishers at Smashwords
Copyright 2021 Vibrant Publishers, USA.
Smashwords Edition, License Notes
This ebook is licensed for your personal use only. This ebook may not be re-sold or given away to other people. If you would like to share this book with another person, please purchase an additional copy for each recipient. If you’re reading this book and did not purchase it, or it was not purchased for your use only, then please return to Smashwords.com and purchase your own copy. Thank you for respecting the hard work of this author.
This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. The author has made every effort in the preparation of this book to ensure the accuracy of the information. However, information in this book is sold without warranty either expressed or implied. The Author or the Publisher will not be liable for any damages caused or alleged to be caused either directly or indirectly by this book.
Vibrant Publishers books are available at special quantity discount for sales promotions, or for use in corporate training programs. For more information please write to bulkorders@vibrantpublishers.com
Please email feedback / corrections (technical, grammatical or spelling) to spellerrors@vibrantpublishers.com
To access the complete catalogue of Vibrant Publishers, visit www.vibrantpublishers.com
*****
Table of Contents
1. PROC SQL
2. Horizontal Joins
3. Vertical Joins
4. Creating and Managing Tables
5. Creating and Managing Indexes
6. Creating and Managing Views
7. Processing using PROC SQL
8. Macro Variables
9. Macro Programs
HR Interview Questions
INDEX
*****
Advanced SAS
Interview Questions
Review these typical interview questions and think about how you would answer them. Read the answers listed; you will find best possible answers along with strategies and suggestions.
*****
PROC SQL
1: When PROC SQL is recommended over SAS DATA steps?
Answer:
For bulk operations, PROC SQL Joins are considered better performing than the DATA step Merge. This is because the joins do not require the data to be sorted based on the keys whereas the merge requires it to be sorted. But a data step merge is better when you need to access the observations one by one. PROC SQL lets you filter, modify and apply formats to the variables easily. You can create macro-variables and subset the data using PROC SQL.
2: Can you subset using both WHERE and IF statements based on a newly derived variable?
Answer:
No. For subsetting based on a newly derived variable only IF statement can be used. If you use WHERE, it will give an error. But you can use a newly created variable to subset along with WHERE.
3: How would you compare two tables with PROC SQL?
Answer:
The set operator EXCEPT is used to compare two tables in PROC SQL. When you use it with two different tables, it returns all rows from the first table which are not there in the second table. Example,
Proc SQL;
Select * from Empfile;
EXCEPT
Select * from Mgrfile;
quit;
This will return all records from Empfile that are not in the Mgrfile.
4: How does %LOCAL and %GLOBAL differ?
Answer:
%LOCAL is used to create a local macro variable which will be accessible to the current macro till it completes execution. Such variables will not be available outside the macro. %GLOBAL is used to create a global macro variable which will be accessible throughout a session across the macros. It will not be accessible once the session ends.
5: How PROC SQL differs from other PROC statements in SAS?
Answer:
Proc SQL is totally different from the usual SAS Procedures in the following ways:
a) SAS procedures require a RUN statement while PROC SQL does not require it. All PROC SQL statements are RUN automatically.
b) PROC SQL will RUN even after a step is submitted. So, you need to exclusively submit the data step or proc step or issue a quit statement to stop the procedure. This is not required in data step.
c) PROC SQL consists of many statements that allows clauses whereas the SAS procedures do not have this option.
Example.: Here’s an example for PROC SQL which contains 3 statements, PROC SQL, SELECT and QUIT. The SELECT statement contains select, FROM, WHERE and ORDER BY clauses.
proc sql;
select AuthType, SlNum, AuthorName
from mylib.table1
where SlNum < 25000
order by AuthType;
quit;
6: Suppose you are generating a report from the data set exam.questionset1 using PROC SQL. You wish to display the name of the column author
as writer
in the report. How do you write the query to modify the report?
Answer:
The following program generates a report from exam.questionset1 using PROC SQL. The column named author is assigned an alias writer in the report using the keyword AS. Column alias will appear as column heading in the output.
proc sql;
select type, slno, author as writer
from exam.questionset1;
quit;
7: While generating a report using PROC SQL, how do you sort the rows in descending order of any particular column?
Answer:
The ORDER BY clause is used in the SELECT statement of PROC SQL to sort the rows in the output according to the values of a particular column. By default, ORDER BY clause sorts the rows in the ascending order. The rows can be sorted in the descending order of any column by specifying the keyword, desc, after the column name.
Example.: The following program selects type, slno and author for all the rows having slno less than 30000. In the output, the rows are sorted according to the descending values of slno.
proc sql;
select type, slno, author
from exam.questionset1
where slno <30000
order by slno desc;
quit;
8: What is referred to as qualifying a column name
?
Answer:
Qualifying a column name
refers to the process of prefixing the SAS data set name to a column name. This is done mostly in those situations where you need to select the data from two data sets and the two data sets have the same named columns. If you want to include one of the same named columns, then you will have to prefix the name of the data set from which you wish to take the column to the column name in the query.
Example: The following PROC SQL query joins two data sets exam.set1 and exam.set2. Both the data sets contain the same column slno. So, to indicate the data set from which the value of slno is to be read, the name of the data set is prefixed to the column name in the SELECT clause. This is referred to as qualifying the column name
.
proc sql;
select type, set1.slno,author
from exam.set1, exam.set2
where set1.slno=set2.slno
order by slno;
quit;
9: Is there any way to display all the column names from a data set without mentioning the names of the columns?
Answer:
Yes, an asterisk(*) can be used in the SELECT clause to display all the columns in a data set.
Example: The following program selects all the columns from the data set exam.questionset1.
proc sql;
select *
from exam.questionset1
quit;
10: What is the significance of FEEDBACK option?
Answer:
The FEEDBACK option is a debugging tool which helps us to see what is being submitted to the processor. When asterisk (*) is used with SELECT clause, FEEDBACK option is used in the PROC SQL statement, which in turn writes the list of column names to SAS log.
Example: In the following program FEEDBACK option is used in the PROC SQL statement. This causes a detailed list of column names (type, slno and author) to be written to SAS log.
proc sql feedback;
select *
from exam.questionset1
quit;
11: While using PROC SQL, how do you limit the number of rows which is displayed in the output?
Answer:
The OUTOBS= option can be used in the PROC SQL statement to limit the number of rows displayed. OUTOBS= option is similar to OBS= data set option.
Example: The following program selects type, slno and author for all the rows having slno less than 30000. In the output, the rows are sorted according to the descending values of slno. Only 10 rows are displayed in the output as OUTOBS=10 is added to the PROC SQL statement.
proc sql outobs=10;
select type, slno, author
from exam.questionset1
where slno<30000
order by slno desc;
quit;
12: Which keyword is used to eliminate the rows containing duplicate values while using PROC SQL?
Answer:
The DISTINCT keyword can be used in the SELECT statement to remove the rows that contain duplicate values. The DISTINCT keyword applies to all the columns mentioned in the SELECT statement.
Example: The following program selects type, slno and author from the data set exam.questionset1. Use of DISTINCT keyword removes the rows containing duplicate values.
proc sql ;
select distinct type, slno, author
from exam.questionset1
order by slno;
quit;
13: Explain BETWEEN-AND operator with example.
Answer:
The BETWEEN-AND operator is used to select rows based on a range of numeric or character values.
Example: The following program displays all the rows whose slno is between 3000 and 4000.
proc sql ;
select *
from exam.questionset1
where slno between 3000 and 4000;
quit;
14: Explain the significance of CONTAINS operator.
Answer:
The CONTAINS operator is used to select the rows in which a character column includes a particular string.
Example: The following program displays all the rows in which type column contains the string ‘tech’.
proc sql ;
select *
from exam.questionset1
where type contains ‘tech’;
quit;
15: How does IN operator function when used with PROC SQL?
Answer:
The IN operator is used to select those rows which match with one value among a fixed list of values. The fixed list can contain either numeric or character values. The list of values is enclosed in parenthesis.
Example: The following program displays all the rows for which type column contains the string ‘technical’ or ‘fiction’ or ‘literature’. Also, the character values in the list are enclosed in quotation marks.
proc sql ;
select *
from exam.questionset1
where type in (‘technical’, ‘fiction’, ‘literature’);
quit;
16: Which operator is used with PROC SQL to retrieve those rows for which a particular column