Quiz Space

DBMS Quiz 1: 26 February 2023 (January 2023 term)

Question 1

+4 marksOne correct option

Consider the table instructor shown in Table 1.

idnamesalary
6001Oliver45000
6002Jack30000
6003Oliver45000
6004Jack30000
6005Jacob70000
6006Tommy60000
6007Joseph65000
6008Jacob70000

Table 1: instructor

What will be the output of the following query ?

sql
SELECT name
FROM instructor AS a
WHERE( SELECT COUNT(*)
FROM instructor b
WHERE b.salary>a.salary)>2
EXCEPT ALL
SELECT DISTINCT(name)
FROM instructor
  1. A
  2. B
  3. C
  4. D

Question 2

+4 marksOne correct option

Consider the table instructor given below.

idnamedept_namesalary
10101SrinivasanComp. Sci.65000
12121WuFinance90000
15151MozartMusic40000
22222EinsteinPhysics95000
32343El SaidHistory60000
33456GoldPhysics87000
45565KatzComp. Sci.75000
58583CalifieriHistory62000
76543SinghFinance80000
76766CrickBiology72000
83821BrandtComp. Sci.92000
98345KimElec. Eng.80000

Table 2: instructor

What will be the output of the following query?

sql
with dept_total (dept_name, value) as
(select dept_name, sum(salary)
from instructor
group by dept_name),
dept_total_avg(value) as
(select avg(value)
from dept_total)
select dept_name
from dept_total, dept_total_avg
where dept_total.value > dept_total_avg.value
  1. A
  2. B
  3. C
  4. D

Question 3

+2 marksOne correct option
  1. A
  2. B
  3. C
  4. D

14 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the DBMS Quiz 1 26 Feb 2023 paper

The IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 26 Feb 2023, in the January 2023 term: 17 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureDBMS Quiz 1 26 Feb 2023 at a glance
TermJanuary 2023 term
SubjectDatabase Management Systems
Course codeBSCS2001
Questions17
Marks50
Duration120 min
MCQ12
Numerical3
MSQ2
Official paperIIT M DIPLOMA AN2 EXAM QPD2 26 Feb 2023
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More DBMS