Week 2-3

Week 2-3

University

9 Qs

quiz-placeholder

Similar activities

Parallel & Distributed Database

Parallel & Distributed Database

University

10 Qs

Internet_Intranet_Extranet

Internet_Intranet_Extranet

University

10 Qs

Topic 4-2: Multiple if-else and switch-case

Topic 4-2: Multiple if-else and switch-case

University

10 Qs

Perkakasan Multimedia

Perkakasan Multimedia

University

10 Qs

Bonding National Publication and Promotion Gathering 2021

Bonding National Publication and Promotion Gathering 2021

University

11 Qs

POP QUIZ 4 (DFC40243)

POP QUIZ 4 (DFC40243)

University

10 Qs

Implementing Mass Storage Application

Implementing Mass Storage Application

10th Grade - University

10 Qs

Lourdes Amaranta Ayala Gracia

Lourdes Amaranta Ayala Gracia

8th Grade - University

10 Qs

Week 2-3

Week 2-3

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

DBS Semester

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The following queries trying to find out average marks in 2 different ways yield the same answer in every case:

(a) sum(marks)/count(*)

(b) average(marks)

True

False

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a correct manner to convert an “NULLIF(a,b)” to an equivalent “IF(x,y,z)” expression?

IF(a == null, b, a)

Cannot convert an nullif() statement to an if() statement

IF(a=b, NULL, a)

IF(a is null, a, b)

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

Find the number of rows in the following relations for T1(ID, name) and T2(grades, name) as shown. SELECT * FROM T1 NATURAL JOIN T2;

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Find the error(s) (if any) in the following query:

SELECT * FROM table1 a NATURAL JOIN table2 b

ON a.ID=b.ID;

No errors, query is correct

Wrong aliasing

ON condition must be omitted

Should be a.ID==b.ID

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Choose what would be seen on running this query on MySQL Workbench:

select coalesce(1.0/0.0, NULL," ","DBS");

NULL

1.0/0.0

DBS

6.

FILL IN THE BLANK QUESTION

3 mins • 2 pts

Find the average length of movies belonging to each rental_rate category. Output the rental_rate and the corresponding average length. Write an SQL query for the same. (table name: film)

PS: No need to alias tables/columns. Retain the underscores. All lowercase

7.

DRAG AND DROP QUESTION

1 min • 1 pt

How will you output the top 3 students according to marks?

select * from students

order by marks

​ (a)   ​ (b)   ;

desc
limit 3
inc
limit
dec
3
asc

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?