InfyTQ SQL Functions, Sorting and Grouping Data Quiz 4

Question 1

Time: 00:00:00
Consider a database name “Prepsters” whose attributes are Prep_intern_id (primary key), subject, subject_value.
Prep_Intern_id = {1, 2, 3, 4, 5, 6}
Subject = {DSA, OOPS, SQL, C, C++}
Subject_value = {0, 0, 1, 1, 2, 2, 3, 3}
If these are one to one relations then what will be the output of the following MySQL_query?
SELECT Prep_intern_id
FROM Prepsters
WHERE subject IN (SELECT subject FROM prepsters WHERE subject_value = 3);

{5, 6}

{5, 6}

{1, 2, 3}

{1, 2, 3}

{3, 4}

{3, 4}

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Consider an example database named “Prepsters” whose attributes are Prep_intern_id (primary key), subject.
Prep_Intern_id = {1, 2, 3, 4, 5, 6}
Subject = {DSA, OOPS, SQL, C, C++}
If these are one to one relations then what will be the output of the following MySQL query?
SELECT intern_id
FROM Prepsters
WHERE subject NOT IN (C, C++, OOPS);

{5, 6}

{5, 6}

{1, 2, 3}

{1, 2, 3}

{3, 4}

{3, 4}

{1, 4}

{1, 4}

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Consider a database name “Prepsters” whose attributes are Prep_intern_id (primary key), subject.
Prep_Intern_id = {1, 2, 3, 4, 5, 6}
Subject = {DSA, OOPs, SQL, C, C++}
If these are one to one relations then what will be the output of the following MySQL statement?
SELECT Prep_intern_id
FROM Prepsters
WHERE subject IN (C, C++, OOPS, SQL);

{5, 6}

{5, 6}

{1, 2, 3}

{1, 2, 3}

{3, 4}

{3, 4}

Empty set

Empty set

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
What does the SUM( ) Function return ?

Some random sum of values

Some random sum of values

The total number of columns in the database

The total number of columns in the database

The total number of tables in the database

The total number of tables in the database

The total sum of the given numeric column

The total sum of the given numeric column

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%