Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- What does the SUM() aggregation function do in machine learning data processing?
a. Counts the number of rows
b. Finds the maximum value
c. Adds up all values in a column
d. Calculates the average value
Answer: c. Adds up all values in a columndatalemur+1 - Which aggregation function returns the average value of a numeric column?
a. SUM()
b. COUNT()
c. AVG()
d. MIN()
Answer: c. AVG()geeksforgeeks+1 - In aggregation queries, what is the purpose of the COUNT() function?
a. Returns the sum of values
b. Returns the total number of rows
c. Calculates the minimum value
d. Finds the average value
Answer: b. Returns the total number of rowstestbook - Which of the following is not an aggregate function in SQL?
a. AVG()
b. SUM()
c. LENGTH()
d. MAX()
Answer: c. LENGTH()geeksforgeeks - What does the MIN() function in an aggregation query return?
a. Lowest value in a column
b. Highest value in a column
c. Total number of records
d. Average value of a column
Answer: a. Lowest value in a columntestbook - Which SQL clause filters records after aggregation?
a. WHERE
b. HAVING
c. GROUP BY
d. ORDER BY
Answer: b. HAVINGairbyte - What is the sequence of execution for aggregation query clauses?
a. GROUP BY → WHERE → HAVING
b. HAVING → GROUP BY → WHERE
c. WHERE → GROUP BY → HAVING
d. WHERE → HAVING → GROUP BY
Answer: c. WHERE → GROUP BY → HAVINGairbyte - Which MongoDB aggregation stage filters input documents?
a. $group
b. $match
c. $sort
d. $project
Answer: b. $matchstudio3t - In MongoDB, which stage groups documents by a specified field?
a. $match
b. $sort
c. $group
d. $limit
Answer: c. $groupstudio3t - Which aggregation function does NOT ignore NULL values?
a. AVG()
b. COUNT()
c. MAX()
d. SUM()
Answer: b. COUNT()testbook - In aggregation queries, what does the MAX() function return?
a. Minimum value
b. Maximum value
c. Average value
d. Number of rows
Answer: b. Maximum valuetestbook - What does GROUP BY do in an aggregation query?
a. Filters rows before aggregation
b. Filters aggregated results
c. Collects rows into groups for aggregation
d. Sorts results after aggregation
Answer: c. Collects rows into groups for aggregationairbyte - Which aggregation function is used to calculate the total number of distinct items?
a. COUNT()
b. SUM()
c. AVG()
d. COUNT(DISTINCT)
Answer: d. COUNT(DISTINCT)testbook - What is the key advantage of materialized views in aggregation queries?
a. They reduce storage space
b. They pre-compute aggregation results for faster querying
c. They automatically update without refresh
d. They optimize indexing
Answer: b. They pre-compute aggregation results for faster queryingairbyte - Which operation is typically NOT part of an aggregation pipeline in MongoDB?
a. $match
b. $group
c. $project
d. $join
Answer: d. $joinstudio3t - Which of the following accurately describes the HAVING clause?
a. It filters rows before GROUP BY
b. It filters aggregated data after GROUP BY
c. It sorts the data
d. It is used to join tables
Answer: b. It filters aggregated data after GROUP BYairbyte - What effect does a WHERE clause have in an aggregation query?
a. Filters rows before aggregation
b. Filters aggregated data
c. Sorts the aggregated output
d. Groups the data
Answer: a. Filters rows before aggregationairbyte - Which aggregation function calculates the total sum of a numeric column?
a. MIN()
b. MAX()
c. SUM()
d. AVG()
Answer: c. SUM()testbook - In a SQL aggregation query, which keyword groups columns to prepare them for aggregation functions?
a. GROUP BY
b. ORDER BY
c. HAVING
d. WHERE
Answer: a. GROUP BYairbyte - What does the aggregation function COUNT() calculate?
a. Sum of values
b. Maximum value
c. Number of rows
d. Minimum value
Answer: c. Number of rowstestbook - In machine learning data aggregation, which function is used to find the central tendency of numerical data?
a. SUM()
b. AVG()
c. COUNT()
d. MAX()
Answer: b. AVG()testbook - Which aggregation function would you use to find the most expensive item price?
a. MIN()
b. MAX()
c. AVG()
d. COUNT()
Answer: b. MAX()testbook - What is a common use case for aggregation in machine learning datasets?
a. Filtering irrelevant data
b. Summarizing data for model analysis
c. Encrypting data fields
d. Splitting datasets for training
Answer: b. Summarizing data for model analysisgeeksforgeeks - What is the output of an aggregation function?
a. Multiple rows for every input row
b. A single summarized value per group
c. Detailed individual row data
d. A list of null values
Answer: b. A single summarized value per grouptestbook - When using aggregation functions, what does the AVG() ignore by default?
a. Negative values
b. NULL values
c. The first row
d. All zeroes
Answer: b. NULL valuestestbook - What does the CUBE function in SQL aggregation do?
a. Filters rows before aggregation
b. Generates all possible grouping combinations
c. Calculates cubic values
d. Groups only one column
Answer: b. Generates all possible grouping combinationsairbyte - How does a ROLLUP function enhance aggregation queries?
a. It summarizes data at multiple levels of aggregation
b. Filters data based on condition
c. Sorts data alphabetically
d. Joins multiple tables
Answer: a. It summarizes data at multiple levels of aggregationairbyte - What does the $sort stage do in a MongoDB aggregation pipeline?
a. Groups documents
b. Filters documents
c. Sorts the documents
d. Limits output documents
Answer: c. Sorts the documentsstudio3t - In aggregation queries, what is an important performance consideration?
a. Always use HAVING before WHERE
b. Use WHERE to filter data before grouping
c. Avoid indexes
d. Use aggregate functions without grouping
Answer: b. Use WHERE to filter data before groupingairbyte - Which clause can contain aggregate functions in SQL?
a. WHERE
b. HAVING
c. FROM
d. SELECT only
Answer: b. HAVINGairbyte - What does the term “aggregation” generally mean in machine learning data handling?
a. Splitting data into individual entries
b. Summarizing detailed data into metrics
c. Encrypting data
d. Normalizing data scale
Answer: b. Summarizing detailed data into metricsgeeksforgeeks - Which aggregation SQL function will count rows excluding NULL values?
a. COUNT(column_name)
b. COUNT(*)
c. SUM(column_name)
d. AVG(column_name)
Answer: a. COUNT(column_name)testbook - In a MongoDB aggregation pipeline, what happens if you omit the $match stage?
a. All documents are processed
b. No documents are processed
c. Only first document is processed
d. Documents are randomly filtered
Answer: a. All documents are processedstudio3t - Which SQL aggregation function returns the first value in a group?
a. FIRST()
b. MIN()
c. MAX()
d. AVG()
Answer: a. FIRST()testbook - What is the result of applying SUM() to a column with values [2, 4, NULL, 6]?
a. 12
b. NULL
c. 6
d. 0
Answer: a. 12 (NULLs ignored)testbook - In aggregation, which function provides the count of all rows including NULLs?
a. COUNT(column_name)
b. COUNT()
c. SUM()
d. AVG()
Answer: b. COUNT()testbook - Why are indexing strategies important for aggregation queries?
a. They improve query execution speed
b. They encrypt the data
c. They increase storage requirements
d. They replace aggregation functions
Answer: a. They improve query execution speedairbyte - What feature does the GROUPING SETS provide in aggregation?
a. Single-level grouping only
b. Multiple grouping combinations in one query
c. Filtering aggregated data
d. Sorting aggregation results
Answer: b. Multiple grouping combinations in one queryairbyte - Which aggregation function would you use to find the lowest score from a student table?
a. MAX()
b. MIN()
c. AVG()
d. SUM()
Answer: b. MIN()testbook - When multiple aggregation functions are used in a query, what is common?
a. They return multiple summary rows per group
b. They return one summarized value per function per group
c. They return raw data rows
d. They aggregate only distinct values
Answer: b. They return one summarized value per function per grouptestbook - What is the purpose of the $group operator in MongoDB?
a. Filter documents
b. Sort documents
c. Aggregate documents by field
d. Project fields
Answer: c. Aggregate documents by fieldstudio3t - Which aggregate operator applies a condition on aggregated results?
a. WHERE
b. GROUP BY
c. HAVING
d. ORDER BY
Answer: c. HAVINGairbyte - Which of the following is an example of a metric aggregation?
a. COUNT of users
b. Listing user names
c. Sorting records by date
d. Selecting unique IDs
Answer: a. COUNT of userselastic - Which stage in MongoDB aggregation is equivalent to SQL’s WHERE?
a. $match
b. $group
c. $sort
d. $project
Answer: a. $matchstudio3t - What type of aggregation allows multi-dimensional summarization?
a. Simple GROUP BY
b. CUBE and ROLLUP
c. WHERE clause
d. HAVING clause
Answer: b. CUBE and ROLLUPairbyte - What is the output field called in a MongoDB $group stage?
a. _id
b. $sum
c. $match
d. $group
Answer: a. _idstudio3t - Which aggregate function returns a single scalar value for a numeric column?
a. COUNT()
b. SUM()
c. AVG()
d. All of the above
Answer: d. All of the abovetestbook - What syntax defines an aggregation query field name in Hasura Postgres aggregation?
a. <field-name>aggregate
b. aggregate<field-name>
c. aggregate<field-name>
d. <field-name>_group
Answer: a. <field-name>_aggregatehasura - How does the $sort stage work in MongoDB aggregation?
a. It filters data
b. It sorts documents based on fields
c. It groups documents
d. It projects fields only
Answer: b. It sorts documents based on fieldsstudio3t - Why are aggregation functions useful in machine learning?
a. To summarize raw data into meaningful insights
b. To encrypt datasets
c. To delete irrelevant data
d. To split data for testing
Answer: a. To summarize raw data into meaningful insightsgeeksforgeeks
- https://datalemur.com/sql-tutorial/sql-aggregate-functions
- https://testbook.com/objective-questions/mcq-on-aggregate-functions–5eea6a0939140f30f369da92
- https://www.geeksforgeeks.org/quizzes/sql-aggregation-functions-constraints-quiz/
- https://www.geeksforgeeks.org/sql/aggregate-functions-in-sql/
- https://airbyte.com/data-engineering-resources/aggregation-in-sql
- https://studio3t.com/knowledge-base/articles/build-mongodb-aggregation-queries/
- https://www.geeksforgeeks.org/data-analysis/aggregation-in-data-mining/
- https://www.elastic.co/docs/explore-analyze/query-filter/aggregations
- https://hasura.io/docs/2.0/queries/postgres/aggregation-queries/
- https://www.w3resource.com/sql-exercises/sql-aggregate-functions.php
- https://www.sanfoundry.com/rdbms-questions-answers-aggregate-functions/
- https://www.scribd.com/document/707661613/Worksheet-12-Only-Qs-Aggregate-Functions-Group-BY
- https://www.sanfoundry.com/1000-machine-learning-questions-answers/
- https://www.codecademy.com/learn/dscp-sql-for-interview-prep/modules/dscp-sql-aggregate-functions/cheatsheet
- https://www.igmguru.com/blog/machine-learning-mcqs
- https://campus.datacamp.com/courses/intermediate-sql/aggregate-functions-3?ex=3
- https://www.youtube.com/watch?v=1iRydu3quZ8
- https://diptisurvase.wordpress.com/wp-content/uploads/2022/09/ml-mcqs.pdf
- https://www.w3schools.com/sql/sql_aggregate_functions.asp
- https://www.gyansetu.in/blog/machine-learning-mcq-interview-preparation/