Home / CSE MCQs / DBMS MCQs :: Aggregate Functions

CSE MCQs :: DBMS MCQs

  1. Aggregate functions are functions that take a ___________ as input and return a single value.
  2. A.
    Collection of values
    B.
    Single value
    C.
    Aggregate value
    D.
    Both a & b

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. Select __________ from instructor where dept name= 'Comp. Sci.';
    Which of the following should be used to find the mean of the salary ?
  4. A.
    Mean(salary)
    B.
    Avg(salary)
    C.
    Sum(salary)
    D.
    Count(salary)

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. All aggregate functions except _____ ignore null values in their input collection.
  6. A.
    Count(attribute)
    B.
    Count(*)
    C.
    Avg
    D.
    Sum

    View Answer

    Workspace

    Discuss Discuss in Forum


  7. Select count (____ ID)
    from teaches
    where semester = 'Spring' and year = 2010;
    If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression.
  8. A.
    Distinct
    B.
    Count
    C.
    Avg
    D.
    Primary key

    View Answer

    Workspace

    Discuss Discuss in Forum


  9. The ____ connective tests for set membership, where the set is a collection of values produced by a select clause. The ____ connective tests for the absence of set membership.
  10. A.
    Or, in
    B.
    Not in, in
    C.
    In, not in
    D.
    In, or

    View Answer

    Workspace

    Discuss Discuss in Forum


  11. We can test for the nonexistence of tuples in a subquery by using the _____ construct.
  12. A.
    Not exist
    B.
    Not exists
    C.
    Exists
    D.
    Exist

    View Answer

    Workspace

    Discuss Discuss in Forum