alternative
  • Home (current)
  • About
  • Tutorial
    Technologies
    C#
    Deep Learning
    Statistics for AIML
    Natural Language Processing
    Machine Learning
    SQL -Structured Query Language
    Python
    Ethical Hacking
    Placement Preparation
    Quantitative Aptitude
    View All Tutorial
  • Quiz
    C#
    SQL -Structured Query Language
    Quantitative Aptitude
    Java
    View All Quiz Course
  • Q & A
    C#
    Quantitative Aptitude
    Java
    View All Q & A course
  • Programs
  • Articles
    Identity And Access Management
    Artificial Intelligence & Machine Learning Project
    How to publish your local website on github pages with a custom domain name?
    How to download and install Xampp on Window Operating System ?
    How To Download And Install MySql Workbench
    How to install Pycharm ?
    How to install Python ?
    How to download and install Visual Studio IDE taking an example of C# (C Sharp)
    View All Post
  • Tools
    Program Compiler
    Sql Compiler
    Replace Multiple Text
    Meta Data From Multiple Url
  • Contact
  • User
    Login
    Register

SQL -Structured Query Language - Sql Select - Select - Average Quiz

# Quiz
1
Discuss
Select - Average

Aggregate functions are functions that take a ___________ as input and return a single value.

  • 1]

    Collection of values

  • 2]

    Single value

  • 3]

    Aggregate value

  • 4]

    Both Collection of values & Single value

Solution
2
Discuss
Select - Average
SELECT __________
FROM instructor
WHERE dept name= ’Comp. Sci.’;

Which of the following should be used to find the mean of the salary ?

  • 1]

    Mean(salary)

  • 2]

    Avg(salary)

  • 3]

    Sum(salary)

  • 4]

    Count(salary)

Solution
3
Discuss
Select - Average
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.

  • 1]

    Distinct

  • 2]

    Count

  • 3]

    Avg

  • 4]

    Primary key

Solution
4
Discuss
Select - Average

All aggregate functions except _____ ignore null values in their input collection.

  • 1]

    Count(attribute)

  • 2]

    Count(*)

  • 3]

    Avg

  • 4]

    Sum

Solution
5
Discuss
Select - Average

A Boolean data type that can take values true, false, and________

  • 1]

    1

  • 2]

    0

  • 3]

    Null

  • 4]

    Unknown

Solution
6
Discuss
Select - Average

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.

  • 1]

    Or, in

  • 2]

    Not in, in

  • 3]

    In, not in

  • 4]

    In, or

Solution
7
Discuss
Select - Average

Which of the following should be used to find all the courses taught in the Fall 2009 semester but not in the Spring 2010 semester.

  • 1]
    SELECT DISTINCT course id
    FROM SECTION
    WHERE semester = ’Fall’ AND YEAR= 2009 AND
    course id NOT IN (SELECT course id
    FROM SECTION
    WHERE semester = ’Spring’ AND YEAR= 2010);

     

  • 2]
    SELECT DISTINCT course_id
    FROM instructor
    WHERE name NOT IN (’Fall’, ’Spring’);

     

  • 3]
    (SELECT course id
    FROM SECTION
    WHERE semester = ’Spring’ AND YEAR= 2010)

     

  • 4]
    SELECT COUNT (DISTINCT ID)
    FROM takes
    WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR
    FROM teaches
    WHERE teaches.ID= 10101);

     

Solution
8
Discuss
Select - Average

The phrase “greater than at least one” is represented in SQL by _____

  • 1]

    < all

  • 2]

    < some

  • 3]

    > all

  • 4]

    > some

Solution
9
Discuss
Select - Average

Which of the following is used to find all courses taught in both the Fall 2009 semester and in the Spring 2010 semester .

  • 1]
    SELECT course id
    FROM SECTION AS S
    WHERE semester = ’Fall’ AND YEAR= 2009 AND
    EXISTS (SELECT *
    FROM SECTION AS T
    WHERE semester = ’Spring’ AND YEAR= 2010 AND
    S.course id= T.course id);

     

  • 2]
    SELECT name
    FROM instructor
    WHERE salary > SOME (SELECT salary
    FROM instructor
    WHERE dept name = ’Biology’);

     

  • 3]
    SELECT COUNT (DISTINCT ID)
    FROM takes
    WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR
    FROM teaches
    WHERE teaches.ID= 10101);

     

  • 4]
    (SELECT course id
    FROM SECTION
    WHERE semester = ’Spring’ AND YEAR= 2010)

     

Solution
10
Discuss
Select - Average

We can test for the nonexistence of tuples in a subquery by using the _____ construct.

  • 1]

    Not exist

  • 2]

    Not exists

  • 3]

    Exists

  • 4]

    Exist

Solution
# Quiz
SQL -Structured Query Language

SQL -Structured Query Language

  • Introduction
  • Overview
    • How To Download And Install MySql Workbench
    • SQL Syntax
  • SQL Database
    • Create Database
    • Drop Database
    • Use / Select Database
  • SQL Table
    • Create Table
    • Alter - Rename Table
    • Alter - Add Column
    • Alter - Modify Column
    • Alter - Rename Column
    • Alter - Drop Column
    • Copy Table
    • Drop Table
  • SQL Insert
    • Insert Record
  • Sql Update
    • Update Record
  • Sql Select
    • Select Record
    • Select - Count
    • Select - Average
    • Select - Sum
    • Select - Min Max
    • Select - Distinct
    • Select - Limit
    • Select - First
    • Select - Last
  • Sql Clause
    • Like Clause
    • And Operator
    • Or Operator
    • Between & Not Between Operator
    • As or Alias
    • In Clause
    • Group By Clause
    • Having Clause
  • Sql Order By
    • Ascending
    • Descending
    • Random
    • Ascending Descending Multiple Column
  • SQL Joins
    • Joins and its type
    • Inner Join
    • Left Join
    • Right Join
    • Full Join
    • Cross Join
  • SQL View
    • Create View
    • Update View
    • Delete View
  • SQL Delete
    • Delete Table
    • Truncate Table
  • Sql Key & Constraint
    • Primary Key
    • Foreign Key
    • Unique Key
    • Not Null Constraint
    • Check Constraint
    • Default Constraint
  • Normalization
    • Overview
    • 1 NF
    • 2 NF
    • 3 NF
    • Boyce Codd normal form ( BCNF )

About Fresherbell

Best learning portal that provides you great learning experience of various technologies with modern compilation tools and technique

Important Links

Don't hesitate to give us a call or send us a contact form message

Terms & Conditions
Privacy Policy
Contact Us

Social Media

© Untitled. All rights reserved. Demo Images: Unsplash. Design: HTML5 UP.