50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.
0/50 answered0 correct
Question 1 of 50
A data analyst needs to count the number of non-unique rows in a SQL table. Which function should they use?
Correct answer: A) COUNT
Explanation: The COUNT function returns the total number of rows, including duplicates, in the specified column or table. COUNT DISTINCT would return only unique rows.
Question 2 of 50
Which SQL command can be used to delete all rows in a table without removing the table itself?
Correct answer: C) TRUNCATE
Explanation: TRUNCATE removes all rows from a table but keeps the table structure intact. DELETE removes specific rows, and DROP removes the table entirely.
Question 3 of 50
What is the primary purpose of the HAVING clause in SQL?
Correct answer: B) To filter records after grouping
Explanation: The HAVING clause is used to filter rows after a GROUP BY operation, whereas WHERE is used to filter rows before grouping.
Question 4 of 50
In Excel, which function would be used to find the smallest value in a range that meets specific criteria?
Correct answer: B) MINIFS
Explanation: The MINIFS function in Excel finds the smallest value in a range that meets one or more criteria.
Question 5 of 50
A data analyst needs to select all the rows where a value is between two specific numbers. Which SQL clause should they use?
Correct answer: B) BETWEEN
Explanation: The BETWEEN clause filters the result set to return only the rows where a value falls within a specified range.
Question 6 of 50
Which Excel function is used to calculate the number of blank cells in a range?
Correct answer: C) COUNTBLANK
Explanation: The COUNTBLANK function counts the number of empty cells in a specified range.
Question 7 of 50
In R, which function would you use to calculate the correlation between two variables?
Correct answer: A) cor()
Explanation: The cor() function computes the correlation coefficient between two numeric variables, indicating the strength of their relationship.
Question 8 of 50
Which clause in SQL is used to sort the result set in ascending or descending order?
Correct answer: A) ORDER BY
Explanation: The ORDER BY clause sorts the result set in ascending or descending order based on one or more columns.
Question 9 of 50
A data analyst needs to create a pivot table in Excel. Which of the following is an element of a pivot table?
Correct answer: D) All of the above
Explanation: Pivot tables are built using rows, columns, values, and sometimes filters to aggregate and summarize data.
Question 10 of 50
In R, which function is used to remove rows with missing values (NA) from a dataframe?
Correct answer: A) na.omit()
Explanation: The na.omit() function removes rows that contain missing values from a dataframe in R.
Question 11 of 50
Which SQL keyword is used to combine rows from two or more tables?
Correct answer: B) UNION
Explanation: UNION combines the result sets of two or more SELECT queries into one result set, excluding duplicate rows.
Question 12 of 50
In Excel, which function would you use to search for a value in the first row of a horizontal table and return a value in the same column?
Correct answer: B) HLOOKUP
Explanation: HLOOKUP searches for a value in the first row of a horizontal table and returns a value in the same column based on the row index.
Question 13 of 50
In R, which function is used to calculate the mean of values in a vector, excluding missing values?
Correct answer: A) mean()
Explanation: The mean() function calculates the average of numeric values in a vector, and the na.rm argument can be used to exclude missing values.
Question 14 of 50
Which SQL clause is used to group records with the same values into summary rows?
Correct answer: B) GROUP BY
Explanation: The GROUP BY clause groups rows with the same values into summary rows, often used with aggregate functions like COUNT or SUM.
Question 15 of 50
In Excel, which function is used to sum values that meet a specific condition?
Correct answer: A) SUMIF
Explanation: The SUMIF function adds all numbers in a range that meet a single specified condition.
Question 16 of 50
A data analyst wants to concatenate two strings in SQL. Which function should they use?
Correct answer: A) CONCAT
Explanation: The CONCAT function in SQL is used to combine two or more strings into one.
Question 17 of 50
In R, which function calculates the square root of a number?
Correct answer: A) sqrt()
Explanation: The sqrt() function in R returns the square root of a number.
Question 18 of 50
In SQL, what does the DISTINCT keyword do?
Correct answer: A) Removes duplicate rows
Explanation: The DISTINCT keyword removes duplicate rows from the result set, ensuring that only unique values are returned.
Question 19 of 50
Which Excel function counts the number of cells that meet a single condition?
Correct answer: A) COUNTIF
Explanation: The COUNTIF function counts the number of cells that meet a specified condition in a range.
Question 20 of 50
In R, which function is used to calculate the standard deviation of a dataset?
Correct answer: A) sd()
Explanation: The sd() function calculates the standard deviation, which measures the dispersion of data points from the mean.
Question 21 of 50
What is the purpose of the WHERE clause in SQL?
Correct answer: A) To filter rows based on a condition
Explanation: The WHERE clause is used to filter rows in a SQL query based on a specified condition.
Question 22 of 50
In Excel, which function would you use to return the current date and time?
Correct answer: A) NOW
Explanation: The NOW function returns the current date and time in Excel.
Question 23 of 50
In R, which function is used to convert a dataframe to a tibble?
Correct answer: A) as_tibble()
Explanation: The as_tibble() function in R is used to convert a dataframe into a tibble, a modern form of a dataframe with cleaner printing.
Question 24 of 50
Which SQL function is used to calculate the average of a column’s values?
Correct answer: A) AVG
Explanation: The AVG function returns the average of all numeric values in a specified column.
Question 25 of 50
In Excel, which function would you use to count the number of non-empty cells in a range?
Correct answer: A) COUNTA
Explanation: COUNTA counts the number of non-empty cells in a specified range, regardless of their content type.
Question 26 of 50
Which SQL command is used to remove a table from a database?
Correct answer: A) DROP TABLE
Explanation: The DROP TABLE command deletes the table structure and its data from the database permanently.
Question 27 of 50
In R, which function calculates the sum of the elements of a vector?
Correct answer: A) sum()
Explanation: The sum() function in R returns the sum of the numeric elements of a vector.
Question 28 of 50
In SQL, which keyword is used to limit the number of rows returned by a query?
Correct answer: A) LIMIT
Explanation: The LIMIT keyword specifies the maximum number of rows to return in the result set.
Question 29 of 50
In Excel, which function would you use to find the maximum value in a range of cells?
Correct answer: A) MAX
Explanation: The MAX function returns the largest value in a specified range of cells.
Question 30 of 50
A data analyst needs to filter out rows where a value is greater than a specific number in SQL. Which clause should they use?
Correct answer: A) WHERE
Explanation: The WHERE clause filters rows in a query based on a specified condition, such as a value being greater than a given number.
Question 31 of 50
In R, which function is used to rename a column in a dataframe?
Correct answer: B) colnames()
Explanation: The colnames() function is used to rename the columns of a dataframe in R.
Question 32 of 50
In SQL, which function would you use to count only the unique values in a column?
Correct answer: A) COUNT DISTINCT
Explanation: The COUNT DISTINCT function counts only the unique values in a specified column, excluding duplicates.
Question 33 of 50
In Excel, which function is used to retrieve the value from a specified position in a table or array?
Correct answer: A) INDEX
Explanation: The INDEX function returns the value of a cell at a specified row and column in a table or array.
Question 34 of 50
Which clause is used in SQL to specify a condition that rows must meet after they are grouped?
Correct answer: A) HAVING
Explanation: The HAVING clause filters the result set of a GROUP BY query based on a condition applied to the grouped rows.
Question 35 of 50
In R, which function is used to create a scatter plot?
Correct answer: A) plot()
Explanation: The plot() function is a base R function used to create scatter plots and other types of simple visualizations.
Question 36 of 50
In SQL, which function returns the remainder of a division operation?
Correct answer: A) MOD
Explanation: The MOD function returns the remainder when one number is divided by another.
Question 37 of 50
Which Excel function returns the number of characters in a text string?
Correct answer: A) LEN
Explanation: The LEN function returns the number of characters in a text string, including spaces.
Question 38 of 50
In R, which function combines two or more vectors into a single vector?
Correct answer: A) c()
Explanation: The c() function is used to combine multiple vectors into a single vector in R.
Question 39 of 50
In SQL, which clause is used to group rows that have the same values into summary rows?
Correct answer: A) GROUP BY
Explanation: The GROUP BY clause groups rows that have the same values into summary rows, often used with aggregate functions like COUNT or SUM.
Question 40 of 50
In Excel, which function is used to round a number to a specified number of digits?
Correct answer: A) ROUND
Explanation: The ROUND function rounds a number to a specified number of digits in Excel.
Question 41 of 50
In R, which function would you use to remove missing values from a vector?
Correct answer: A) na.omit()
Explanation: The na.omit() function removes rows with missing values from a vector or dataframe in R.
Question 42 of 50
Which SQL function would you use to calculate the total sum of a numeric column?
Correct answer: A) SUM
Explanation: The SUM function calculates the total sum of a numeric column in SQL.
Question 43 of 50
In Excel, which function is used to return the average of a set of values?
Correct answer: A) AVERAGE
Explanation: The AVERAGE function calculates the arithmetic mean of a set of numbers in Excel.
Question 44 of 50
In R, which function would you use to calculate the median of a numeric vector?
Correct answer: A) median()
Explanation: The median() function returns the median value of a numeric vector in R.
Question 45 of 50
Which SQL keyword is used to return only distinct values in a query result?
Correct answer: A) DISTINCT
Explanation: The DISTINCT keyword ensures that only unique (non-duplicate) values are returned in the query result set.
Question 46 of 50
Which Excel function would you use to count the number of cells that contain a specific value?
Correct answer: A) COUNTIF
Explanation: The COUNTIF function counts the number of cells that meet a specific condition in a range.
Question 47 of 50
In R, which function is used to check if a value is NA (missing)?
Correct answer: A) is.na()
Explanation: The is.na() function checks if a value in R is NA (missing).
Question 48 of 50
In SQL, which function is used to calculate the number of non-null values in a column?
Correct answer: A) COUNT
Explanation: The COUNT function returns the number of non-null values in a column.
Question 49 of 50
Which Excel function would you use to add all the numbers in a range?
Correct answer: A) SUM
Explanation: The SUM function in Excel adds all the numeric values in a specified range.
Question 50 of 50
In R, which function is used to calculate the variance of a numeric vector?
Correct answer: A) var()
Explanation: The var() function calculates the variance of numeric values in a vector in R.
Set 2 complete
You scored 0%
0 correct out of 0 answered (50 questions in this set).