InfyTQ SQL Functions, Sorting and Grouping Data Quiz 3

Question 1

Time: 00:00:00
What is the error in the following MySQL command?
SELECT stu_id, title, start_date, fname, fed_id
FROM person
ORDER BY RIGHT (fed_id, 3);

Yes

Yes

No error

No error

Depends

Depends

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
What will be the output of the following MySQL command?
WHERE TITLE= ‘seller’ AND join_date < ’2007-01-01’;

Only sellers who began working for the bank prior to 2007 will be included.

Only sellers who began working for the bank prior to 2007 will be included.

Any employee who is either not a teller or began working for the bank in 2007 later will be removed from consideration.

Any employee who is either not a teller or began working for the bank in 2007 later will be removed from consideration.

Only sellers who began working for the bank prior to 2007 will not be included.

Only sellers who began working for the bank prior to 2007 will not be included.

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 3

Time: 00:00:00
What will be the output of the following MySQL command ?
WHERE TITLE= ‘seller’ OR join_date = ’2007-01-01’;

The employee is a teller and was employed prior to 2007

The employee is a teller and was employed prior to 2007

The employee is a teller and was employed after January 1, 2007

The employee is a teller and was employed after January 1, 2007

The employee is something other than a teller but was employed prior to 2007

The employee is something other than a teller but was employed prior to 2007

All of the mentioned

All of the mentioned

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
Given MySQL query belongs to which of the following condition types?
SELECT first_name
FROM person
WHERE title=’SELLER’;

Equality condition

Equality condition

Inequality condition

Inequality condition

Range condition

Range condition

All of the mentioned

All of the mentioned

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Given the following MySQL query belongs to which of the following given condition types?
SELECT first_name
FROM person
WHERE dept_id= (SELECT dept_id FROM department WHERE names=’s’);

Equality condition

Equality condition

Inequality condition

Inequality condition

Range condition

Range condition

All of the mentioned

All of the mentioned

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Given the following MySQL query belongs to the “Inequality condition”?
SELECT prod_type.name, prod_name
FROM prod_type INNER JOIN Product
ON prod_type.dept=Prod_dept
WHERE prod_type.namecustomers_accounts’;

Yes

Yes

No

No

None of the mentioned

None of the mentioned

Depends

Depends

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
What will be the result of the following MySQL statement?
SELECT *
FROM Employee
WHERE start_date >= ’2008-01-01’ AND Start_date<=’2006-01-01’;

All employees between 2008 and 2006

All employees between 2008 and 2006

Empty set

Empty set

All employees from 2008 to 2006

All employees from 2008 to 2006

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 8

Time: 00:00:00
Which of the following operators are representing “Inequality conditions” operators?

<>

<>

! =

! =

=

=

Both < > and ! =

Both < > and ! =

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
What will be the result of the following SQL query ?
SELECT account_id, prod_id, cust_id
FROM accounts
WHERE prod_id IN (‘col’, ‘chu’, ‘kat’);

Only those values are selected whose product_id is either ‘col’, ‘chu’, ‘kat’

Only those values are selected whose product_id is either ‘col’, ‘chu’, ‘kat’

Only those values are selected whose product_id is either ‘col’’

Only those values are selected whose product_id is either ‘col’’

Only those values are selected whose product_id is either ‘col’, ‘chu’

Only those values are selected whose product_id is either ‘col’, ‘chu’

All of the mentioned

All of the mentioned

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

Please login to submit your explanation

Start

Question 10

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 query?
SELECT Prep_intern_id
FROM Prepsters
WHERE subject NOT IN (C, C++);

{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

["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/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects