2025年最新の実際に出ると確認された 無料SASInstitute A00-215試験問題 [Q208-Q230]

Share

2025年最新の実際に出ると確認された 無料SASInstitute A00-215試験問題

A00-215リアル試験問題解答は無料


Sasinstitute A00-215は、SASプログラミング言語で強固な基盤を確立したい個人向けに設計された認定試験です。 SAS認定アソシエイト:SAS 9.4試験を使用したプログラミングの基礎は、SASソフトウェアを使用した基本的なプログラミングの概念とデータ操作技術に関する候補者の知識を測定するエントリーレベルの試験です。


SASINSTITUTE A00-215認定は、SASプログラミングの基礎における候補者の能力を示しているため、業界で非常に評価されています。この認定は、政府機関、学術機関、民間企業など、多くの組織によって認識されています。この認定を取得することにより、候補者はキャリアの機会を強化し、データ分析とプログラミングの分野で収益の可能性を高めることができます。


SASINSTITUTE A00-215試験に合格するには、候補者はSASプログラミングの基礎を確実に理解する必要があります。 SASプログラミングの構文、データ構造、データ管理手法に精通している必要があります。候補者はまた、SASソフトウェアを操作した経験があり、SASツールを使用してデータ分析を実行できる必要があります。

 

質問 # 208
Consider the followin SAS code:

What will the output dataset 'SORTED PRODUCTS' contain?

  • A. The output dataset will have only one row per unique 'PRODUCT ID', sorted by 'PRODUCT ID' and the earliest 'DATE MANUFACTURED' for each 'PRODUCT ID'
  • B. only the distinct records from 'PRODUCTS', sorted by 'DATE MANUFACTURED' ascending and then by 'PRODUCT ID' ascending.
  • C. All records from 'PRODUCTS, sorted by 'DATE_MANUFACTURED' ascending and then by 'PRODUCT_ID' ascending, with no duplicate rows.
  • D. only the distinct records from 'PRODUCTS, sorted by 'PRODUCT_ID' ascending and then by 'DATE_MANUFACTURED' ascending.
  • E. All records from 'PRODUCTS, sorted by 'PRODUCT_ID' ascending and then by 'DATE_MANUFACTURED' ascending, with no duplicate rows.

正解:D

解説:
The NODUPKEY option in PROC SORT eliminates duplicate rows based on the variables specified in the BY statement. In this case, it will keep only one row for each unique combination of 'PRODUCT_ID' and 'DATE_MANUFACTURED'. The dataset will be sorted by 'PRODUCT_ID' ascending and then by 'DATE_MANUFACTURED' ascending. Therefore, the output dataset will contain only the distinct records from 'PRODUCTS', sorted accordingly.


質問 # 209
You have a dataset with variables 'ID', 'Date', and 'Amount'. You want to create a new variable 'RunningTotal' that accumulates the 'Amount' for each unique 'ID' based on the 'Date' order. Which code snippet would you use in the DATA step?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:D

解説:
The correct answer is option D. The SUM statement in SAS can only be used to calculate the sum of values within a single observation, not across observations. To accumulate 'Amount' based on 'Date' order for each unique 'ID', you need to use the 'first-ID' condition to initialize 'RunningTotal' for each new ID and then add the current 'Amount' value to the accumulating 'RunningTotal' variable. Option A is incorrect because the 'first. ID' condition is not sufficient to ensure that the 'RunningTotal' variable is properly initialized for each new ID Option B is incorrect because the 'sum(Amount) by ID' expression would only calculate the sum of 'Amount' for each unique IDI not the running total across dates. Option C is incorrect because the 'sum(Amount) by Date' expression would calculate the sum of 'Amount' for each unique Date, not the running total across dates. Option E is incorrect because the 'first.Date' condition would initialize 'RunningTotal' for each new date, not for each new ID.


質問 # 210
You are analyzing a SAS dataset with a variable 'CITY' of type character. You want to replace all missing values in 'CITY' with the value 'UNKNOWN' using a data step. Which code snippet correctly achieves this?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:C

解説:
The correct answer is E. SAS uses a blank string (") to represent missing values for character variables. The code snippet checks for missing values by first trimming the string using 'trim()' function and then comparing the length of the trimmed string with 0. If the length is 0, it indicates a missing value, which is then replaced with 'UNKNOWN' Option A is incorrect because it compares the character variable 'CITY with a single period C. which is used for numeric missing values. Option B is incorrect because 'missing()' function only checks for numeric missing values. Option C is incorrect because it compares the 'CITY' with an empty string which is not always true for missing character values. Option D is incorrect because 'missing(city)' function only checks for numeric missing values and doesn't consider missing character values. This scenario demonstrates the importance of understanding how SAS handles missing values for character variables and how to properly identify and replace them.


質問 # 211
Which LIBNAME statement has the correct syntax for accessing SAS data sets?

  • A. libname mydata='c:\sas\data';
  • B. libname 'c:\sas\data' mydata;
  • C. libname 'c:\sas\data'=mydata;
  • D. libname mydata 'c:\sas\data';

正解:D

解説:
The correct syntax for the LIBNAME statement in SAS, which assigns a libref to a library stored at a specific path, requires the libref to come first, followed by the path enclosed in quotes. The format is libname libref ' path';. Thus, the correct syntax among the options provided is Option B: libname mydata 'c:\sas\data';. This statement assigns the libref 'mydata' to the directory 'c:\sas\data'. The other options either invert the order of the libref and path or improperly use the equals sign, which is not standard syntax for the LIBNAME statement.
References:SAS documentation on the LIBNAME statement, SAS Institute.


質問 # 212
Given the SAS data set WORK PRODUCTS:

The following SAS program is submitted:

How many variables does the WORK REVENUE data set contains?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

正解:B


質問 # 213
You're working with a dataset that contains employee salary information. You need to adjust the salary based on the following criteria: - If the employee is in the 'Management' department and their salary is less than $50,000, increase their salary by 10%. - If the employee is in the 'Sales' department and their salary is between $40,000 and $60,000, increase their salary by 5%. - Otherwise, leave the salary unchanged. Which of the following code snippets accurately implements this logic using the IF-THEN/ELSE structure?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:B

解説:
The correct code snippet is option A Here's why: 1. ' 'Department and Salary Conditions: '' Option A correctly uses 'and' to combine the department condition with the salary condition within each 'if statement This ensures that the salary adjustment is applied only when both conditions are met. 2. ''ELSE Statement'' The 'else statement at the end of the code handles the case where neither the management nor sales condition is true, ensuring that the salary remains unchanged for these employees. Options B, C, and D use 'do' blocks unnecessarily The code would be less efficient and potentially more complex with the unnecessary 'do' blocks. Option E is missing the 'else' statement, meaning that salaries for employees outside the specific conditions would not be adjusted. Remember to include the 'else' to ensure that salaries are updated for all employees.


質問 # 214
You have a SAS dataset called 'CUSTOMERS' with variables 'CustomerlD', 'Name', 'Address', 'City', 'State', 'Zip', 'Phone', and 'Email'. You need to create a new dataset called 'Customer Subset' containing only 'CustomerlD', 'Name', and 'Email' for customers residing in the state 'CA' and having a zip code starting with '902'. Which code snippet will achieve this correctly?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:A、E

解説:
Both options B and E achieve the desired outcome. Option B uses the 'substr' function within a data step to extract the first three characters from the 'Zip' variable and compare it to '902'. The 'keep' statement ensures that only the specified variables are included in the output dataset Option E uses a SQL query to select the specified variables from the 'CUSTOMERS' dataset, applying conditions based on 'State' and the first three characters of 'Zip' using the 'substr' function. Option A uses an incorrect comparison for the 'Zip' variable. Option C uses 'drop' statement to remove unwanted variables but is not ideal as it might unintentionally drop other important variables if the dataset structure changes. Option D is incorrect because it uses 'keep' statement, which is redundant since the 'drop' statement already specifies the variables to be removed.


質問 # 215
Consider the following DATA step code:

During the compilation and execution of this DATA step, which of the following statements accurately describes the state of the Program Data Vector (PDV) when the IF-THEN-DO block is evaluated for a specific observation with age = 70 and income = 120000?

  • A. The PDV contains the updated values of age and income (70 and 120000 respectively), and both age_group is assigned 'Senior' and income_group is assigned 'High'
  • B. The PDV contains only the updated values of age and income (70 and 120000 respectively) as the IF-THEN-DO block is evaluated before the SET statement.
  • C. The PDV contains the original values of age and income from work.old_dataset, and the variables age_group and income_group are not yet defined.
  • D. The PDV contains the updated values of age and income (70 and 120000 respectively), and age_group is assigned 'Senior' while income_group is still undefined.
  • E. The PDV contains the original values of age and income from work.old_dataset, and only the variable age_group is defined and assigned 'Senior'.

正解:A

解説:
Here's why: 1. SET Statement: The SET statement reads the observation from work.old_dataset into the PDV The variables age and income are assigned their values from the observation. 2. IF- THEN-DO Block: The IF statement evaluates the condition 'age > 65'. Since age is 70, the condition is true, and the DO block is executed. 3. Variable Assignment: Inside the DO block, 'age_group' is assigned the value 'Senior' based on the age being greater than 65. The second IF statement checks if income is greater than 100000. This condition is also true, so is assigned 'High'. 4. PDV State: The PDV now contains the original values of age and income, along with the newly assigned values for age_group and income_group. Options A, B, D, and E are incorrect because they either miss the assignment of income_group, misinterpret the order of execution of the statements, or incorrectly assume the PDV does not contain the updated values after the assignment statements are executed.


質問 # 216
Consider a dataset 'Sales' with variables 'Region', 'Product', and 'Sales_Amount'. You need to create a new dataset 'Summary' that reports the total sales for each region and product combination, but only for regions where the total sales exceed $10,000. Which SAS code would you use to achieve this?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:E

解説:
The correct answer is E. The code uses the BY statement to group the sales data by Region and Product. The function calculates the total sales for each group. The OUTPUT statement is then executed only if the sum is greater than 10,000, effectively filtering out regions with total sales below this threshold. Options A and B are incorrect because they do not use the correct function to calculate the total sales for each region-product combination. Option C is incorrect because it only checks for the last record in each region. Option D is incorrect because it only checks for the first record in each region. This scenario demonstrates how to use the OUTPUT statement in conjunction with BY group processing and aggregate functions to create a summary dataset based on specific conditions. It requires understanding the correct function and the use of group processing for data aggregation.


質問 # 217
You have a SAS dataset named 'CustomerData' with variables 'CustomerlD', 'OrderDate', and 'Order Total'. You want to create a report that shows the total order amount for each customer who placed an order in the year 2022. The dataset is sorted by 'CustomerlD' and then by 'OrderDate'. Which of the following code snippets would correctly generate the report using PROC SQL?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:B、D、E

解説:
Options A, B, and C all correctly filter the dataset to include only orders from the year 2022 and calculate the total order amount for each customer Option A uses the YEAR function to extract the year from the OrderDate variable and then compares it to 2022 Option B uses date literals and the AND operator to select orders within the specified date range. Option C uses the BETWEEN operator to achieve the same result as Option B. Option D uses the LIKE operator to compare the OrderDate with the string '%2022', which would not correctly filter for the entire year 2022. Option E sorts the output by OrderDate, which is not specified in the requirement Therefore, the correct options are A, B, and C.


質問 # 218
Given the PROC PRINT report of the INVEST data set shown below:

How many observations are in the FORCAST data set after this program executes?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

正解:D


質問 # 219
Consider a dataset 'SURVEY' with a variable 'SATISFACTION' that captures customer satisfaction levels. You are tasked with generating a frequency report for 'SATISFACTION' but need to suppress both cumulative frequencies and percentages. Additionally, you want to calculate the percentage of customers in each satisfaction level category relative to the total number of responses. Which PROC FREQ statement achieves this requirement?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:A

解説:
The correct answer is A. The 'NOCIJM' and 'NOPERCENT options in the 'TABLES statement suppress the display of cumulative frequencies and percentages, respectively The 'OUTPCT option calculates the percentage of observations in each category relative to the total number of observations, which is what you need to show the percentage of customers in each satisfaction level category The other options would not provide the desired output.


質問 # 220
Given the input data sets EMPLOYEES and DONATIONS, and the output data set NODONATIONS below:

  • A. data nodonations;
    merge employees (in-inE) donations (in=inD);
    by employee_id;
    if inE=1 and inD-0;
    run;
  • B. data nodonations;
    merge employees (in-inE) donations (in=inD);
    by employee_id;
    run;
  • C. data nodonations;
    merge employees (in-inE) donations (in=inD);
    by employee_id;
    if inE=0 and inD-0;
    run;
  • D. data nodonations;
    merge employees (in-inE) donations (in=inD);
    by employee_id;
    if inE=1 and inD-1;
    run;

正解:A

解説:
The correct answer is C. To create the NODONATIONS dataset, which includes only the employees who did not make any donations, a merge operation is used with a conditional statement to filter out those records. The syntax if inE=1 and inD=0; ensures that the merged dataset includes only the observations from the EMPLOYEES dataset that do not have a corresponding observation in the DONATIONS dataset. This is achieved using data step processing with the in= option to create temporary variables that indicate whether the data is coming from the input dataset.
In the other options:
* A is incorrect because inE=0 and inD=0 will never be true after a merge since at least one of the datasets must contribute to the merged observation.
* B lacks the necessary conditional logic to filter out employees with donations.
* D is incorrect because if inE=1 and inD=1; would actually select employees who made donations, the opposite of what we want.
References:
* SAS documentation on merging data sets using the DATA step.


質問 # 221
Given the SAS data set WORK PRODUCTS:

How many variables does the WORK REVENUE data set contains?

  • A. 0
  • B. 1
  • C. 2
  • D. 3

正解:B

解説:
The resulting WORK.REVENUE data set contains 3 variables. In the provided SAS program, the set statement uses a (keep=) option to keep only 3 variables from WORK.PRODUCTS, which are ProdId, Price, and Sales. The drop= data set option in the data statement specifies to drop the Sales and Returns variables from the output data set. However, Returns was not included in the keep= option, so it won't be part of WORK.REVENUE to begin with. Finally, a new variable Revenue is calculated and included in the data set. Therefore, the final data set contains the variables ProdId, Price, and Revenue.
References:
* SAS documentation on keep= and drop= data set options.


質問 # 222
You have a dataset with customer purchase records, including their customer ID, purchase date, and purchase amount. You want to calculate the average purchase amount for each customer but only for the purchases made in the last three months. Using the DATA step, how would you modify the code to achieve this, taking advantage of BY group processing with FIRST. and LAST. variables?

  • A. data customer_avg; set purchases; by customer_id; retain avg_amount 0 count 0; if first.customer_id then if intck('month' , purchase_date,
  • B. count-0; end; if then do; avg_amount+purchase_amount; count+l; end; output; run; data customer_avg; set purchases; by customer_id; retain avg_amount 0 count 0; if first.customer_id then do; avg_amount=0;
  • C. data customer_avg; set purchases; by customer_id; retain avg_amount 0; count=0; if first.customer_id then count+l; if then avg_amount+purchase_amount; output; run; data customer_avg; set purchases; by customer_id; retain avg_amount 0 count 0; if first.customer_id then do; avg_amount=0;
  • D. count-0; end; if intck('month',purchase_date,today())<=3 then do; avg_amount=purchase_amount; count+l; end; output; run;
  • E. =3 then do; avg_amount+purchase_amount; count+l; end; output; run; data customer_avg; set purchases; by customer_id; retain avg_amount 0; if first.customer_id then if intck('month' , purchase_date, today())< =3 then avg_amount+purchase_amount; output; run;

正解:A

解説:
Option D is the correct answer because it correctly initializes the 'avg_amount' variable to zero for each customer's first record, it only considers purchases within the last three months, and it calculates the average by dividing the accumulated purchase amount by the count of transactions within the three-month window. Options A, B, C, and E either incorrectly initialize the variables or do not correctly compute the average within the specific time frame.


質問 # 223
You have a dataset named 'SALES' with variables 'REGION', 'PRODUCT', 'SALES AMOUNT', and 'SALES DATE'. You want to generate a report that only displays the 'REGION' and 'SALES AMOUNT' variables for sales transactions in the 'South' region and within the last 3 months. Which PROC PRINT statement would achieve this?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:A

解説:
Option A is the correct statement. It uses the WHERE clause to filter records based on both the 'REGION and 'SALES_DATE' variables. The INTNX function is used to calculate the date 3 months ago from today's date. The VAR statement specifies the variables 'REGION' and 'SALES_AMOUNT' to be displayed in the report. Options B, C, D, and E are incorrect because they either do not filter based on the sales date or include an incorrect date calculation.


質問 # 224
You have a SAS dataset called 'EMPLOYEES' with variables 'EMPLOYEE ID', 'FIRST NAME', 'LAST NAME', 'DEPARTMENT', 'SALARY, 'HIRE DATE'. You need to create a new dataset called 'EMPLOYEES HIGH SALARY' containing only employees with salaries greater than $100,000, and you want to rename the 'SALARY' variable to 'HIGH SALARY'. Which code snippet correctly achieves this?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:B

解説:
Option D correctly combines the RENAME: option to change the variable name, the WHERE clause to filter based on salary, and the DROP= option to remove the 'HIRE_DATE' variable. The RENAME= option is used inside the SET statement to rename the 'SALARY' variable to 'HIGH_SALARY'. The WHERE clause filters the data by checking if the 'SALARY' variable is greater than 100000. Option A is incorrect because the RENAME= option should be placed inside the SET statement. Option B is incorrect because the HIGH_SALARY variable does not exist at the time of filtering. Option C is incorrect because it attempts to rename the variable inside an IF statement, which is not the right syntax Option E is incorrect as it does not drop the 'HIRE DATE' variable as requested in the scenario.


質問 # 225
You are working with a SAS dataset named 'SALES containing information about sales transactions. The dataset has a variable 'PRODUCT ID' and 'QUANTITY SOLD'. You want to create a new dataset 'SALES SUMMARY' that summarizes the total quantity sold for each product. Which code snippet would you use to achieve this?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:D

解説:
It uses the 'by' statement to group observations by 'PRODUCT_ID', initializes 'sum_quantity' to 0 for the first observation of each product, and accumulates the total quantity sold using 'sum_quantity + QUANTITY SOLD. The 'output' statement writes the summarized data to the new dataset 'SALES_SUMMARY. Option B incorrectly uses for the summation. Options C and E use , which calculates the sum for the entire dataset instead of grouping by product. Option D omits initialization of 'sum_quantity' and uses 'sum_quantity + QUANTITY_SOLD incorrectly without a clear accumulation logic.


質問 # 226
Which PROC SORT statement specifies the sort variable?

  • A. ORDERBY
  • B. SORTVAR
  • C. CLASS
  • D. BY

正解:D

解説:
The PROC SORT statement that specifies the sort variable is: BY
The BY statement in PROC SORT is used to specify the variable(s) by which the data should be sorted.


質問 # 227
You are developing a report that requires a title containing a macro variable representing a specific department name. The department name is stored in a data set named 'dept_info'. How can you correctly incorporate the department name into the report title using the TITLE statement and a macro variable?

  • A.
  • B.
  • C.
  • D.
  • E.

正解:B、D

解説:
Options B and E correctly demonstrate how to incorporate the department name from the 'dept_info' data set into the report title. Option B uses the CALL SYMPIJT function to create a macro variable 'dept' with the value of 'dept_name' from the data set. Option E uses PROC SQL to retrieve the 'dept_name' value into a macro variable ':dept Both approaches effectively create a macro variable containing the department name, which can then be used in the TITLE statement. Option A attempts to directly assign the 'dept_name' value to the macro variable but doesn't correctly access it from the data set. Option C tries to create a macro but doesnt correctly pass the 'dept_name' value as an argument. Option D attempts to create a macro variable 'dept' but doesn't correctly assign the value from the data set.


質問 # 228
You have two SAS datasets: 'CUSTOMERS' (CUSTOMER ID, NAME) and 'ORDERS' (ORDER D, CUSTOMER ID, ORDER DATE). You want to create a new dataset 'CUSTOMER ORDERS' that includes customer information and their most recent order date. Which code snippets would achieve this correctly? (Select all that apply)

  • A.
  • B.
  • C.
  • D.
  • E.

正解:C、D

解説:
Both options A and D are correct. They use the BY statement and the LAST-CUSTOMER_ID system variable to identify the last record for each customer. Option A uses OUTPUT to write the last record for each customer to the output dataset. Option D accomplishes the same result by implicitly outputting the last record for each customer. Option B is incorrect because it simply merges the datasets without filtering for the most recent order. Option C is incorrect because it uses _N_ = 1, which is only true for the first record of each customer and not the last. Option E is incorrect because it tries to assign ORDER DATE to itself, which is redundant and does not guarantee that the last order date is captured.


質問 # 229
Given the partial shown below:

Which step will produce this report?

  • A. proc freq data=sashelp. shoes
    data=sashelp.shoes; region product / list
    run;
  • B. proc freq data=sashelp.shoes order=freq;
    tables region*product / list;
    run;
  • C. proc freq data=sashelp.shoes;
    tables region*producc / cross run;
  • D. proc freq data= sashelp, shoes order=freq;
    table region product / crosalist
    run;

正解:D


質問 # 230
......

試験問題集でA00-215練習無料最新のSASInstitute練習テスト:https://jp.fast2test.com/A00-215-premium-file.html


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어