A00-215試験無料問題集「SASInstitute SAS Certified Associate: Programming Fundamentals Using SAS 9.4 認定」
You have a dataset 'CUSTOMERS' with variables 'CUSTOMER ID', 'NAME', 'CITY', and 'STATE'. You want to create a new dataset 'NEW CUSTOMERS' containing only observations from the 'CUSTOMERS' dataset where the 'STATE' is either 'CA' or 'NY'. You also want to add a new variable called 'REGION' to the 'NEW CUSTOMERS dataset, assigning 'West' for CA customers and 'East' for NY customers. Which of the following DATA step code snippets will achieve this?
正解:B,E
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You have a dataset 'EMPLOYEES' with variables 'EMPLOYEE ID', 'DEPARTMENT', and 'SALARY'. You want to create a new dataset 'HIGHEST SALARY BY DEPT' that contains the highest salary for each department. However, you also need to create a variable called 'RANK' that indicates the rank of each employee's salary within their department, with the highest salary being ranked 1. Which of the following DATA step code snippets will achieve this correctly?
正解:C
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You have a SAS dataset named 'ORDERS' with the following structure: Order ID,Customer ID,Order Date,T0tal Amount You need to export this data to a CSV file named 'orders_export.csv' with the following requirements: 1. The data should be sorted by 'Order Date' in ascending order. 2. The 'Order Date' column should be formatted as 'YYYY-MM-DD'. 3. The 'Total Amount' column should be formatted as a comma-separated numeric value with 2 decimal places. Which of the following PROC EXPORT statements would achieve this correctly?
正解:C
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You have a dataset with a 'ProductStatus' variable containing values like 'Active', 'Inactive', 'Discontinued', or missing. You want to create a custom format to label missing values as 'Unknown' and combine 'Inactive' and 'Discontinued' as 'Not Active'. Which PROC FORMAT code snippet correctly defines this format?
正解:C
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You are analyzing a dataset containing sales data for different regions. You need to create a new variable 'SalesCategory' that classifies sales into three categories: 'High' if sales are above $10,000, 'Medium' if sales are between $5,000 and $10,000, and 'Low' if sales are below $5,000. Which code snippet correctly implements this logic in the DATA step?
正解:E
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You have a dataset 'Transactions' with a variable 'TransactionDate' in a DATE format. You need to create a new variable 'DaysSinceLastTransaction' that calculates the number of days since the previous transaction for each record. Which SAS code snippet would correctly achieve this?
正解:C
解答を投票する
解説: (GoShiken メンバーにのみ表示されます)