SQL Aggregation Functions and Constraints Quiz Quiz

  1. Question 1

    Which SQL function is used to calculate the average value of a numeric column?

    1. SUM()
    2. COUNT()
    3. MAX()
    4. AVG()
    5. AVERAGE()
  2. Question 2

    What does the SQL function 'COUNT()' do?

    1. Calculates the sum of values in a column
    2. Finds the maximum value in a column
    3. Computes the median value of a column
    4. Counts the number of rows in a result set
    5. Count the roll
  3. Question 3

    Which SQL function is used to find the highest value in a column?

    1. AVG()
    2. SUM()
    3. COUNT()
    4. HIGHEST()
    5. MAX()
  4. Question 4

    What does the SQL function 'SUM()' do?

    1. Computes the median value of a column
    2. Calculates the average value of a column
    3. Counts the number of rows in a result set
    4. Finds the total sum of values in a column
    5. Some it up
  5. Question 5

    Which SQL constraint is used to ensure that all values in a column are unique?

    1. PRIMARY KEY
    2. CHECK
    3. FOREIGN KEY
    4. UNIQUE
    5. Uniq
  6. Question 6

    What does the SQL constraint 'PRIMARY KEY' do?

    1. Ensures that all values in a column are unique
    2. Specifies a default value for a column
    3. Enforces a condition on the values allowed in a column
    4. Defines a column to uniquely identify each row in a table
    5. Primary
  7. Question 7

    Which SQL constraint is used to ensure that a column only contains values from a specified set?

    1. PRIMARY KEY
    2. UNIQUE
    3. FOREIGN KEY
    4. CHECK
    5. Checkmate
  8. Question 8

    What does the SQL constraint 'FOREIGN KEY' do?

    1. Ensures that all values in a column are unique
    2. Specifies a default value for a column
    3. Enforces a condition on the values allowed in a column
    4. Links a column to a primary key in another table
    5. Forin Key
  9. Question 9

    Which SQL constraint is used to enforce a condition on the values allowed in a column?

    1. PRIMARY KEY
    2. UNIQUE
    3. FOREIGN KEY
    4. CHECK
    5. Enforce
  10. Question 10

    What does the SQL constraint 'DEFAULT' do?

    1. Ensures that all values in a column are unique
    2. Defines a column to uniquely identify each row in a table
    3. Enforces a condition on the values allowed in a column
    4. Specifies a default value for a column
    5. Defolt
  11. Question 11

    Which function returns the number of different values in a column?

    1. COUNT()
    2. SUM()
    3. AVG()
    4. COUNT(DISTINCT column_name)
    5. DISTINCT()
  12. Question 12

    Which constraint prevents duplicate values in a column or combination of columns?

    1. NOT NULL
    2. CHECK
    3. UNIQUE
    4. FOREIGN KEY
    5. DEFAULT
  13. Question 13

    Which constraint ensures that a column cannot have a null value?

    1. UNIQUE
    2. PRIMARY KEY
    3. FOREIGN KEY
    4. NOT NULL
    5. CHECK
  14. Question 14

    Which function is used to calculate the total sum of a numeric column?

    1. AVG()
    2. MIN()
    3. MAX()
    4. COUNT()
    5. SUM()
  15. Question 15

    Which function returns the smallest value in a column?

    1. AVG()
    2. MAX()
    3. SUM()
    4. COUNT()
    5. MIN()