Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 0 - The statement below is erroneous because select dept name, dept _ id , avg ( salary ) from instructor group by dept

20- The statement below is erroneous because select dept name, dept_id, avg(salary) from instructor group by dept_name;
a) avg(salary) is invalid
b) group by clause is not valid in this query
c) misplaced group by clause
d) dept name should not be selected
e) dept id should not be selected
21- Which of the following creates a temporary relation for the query on which it is defined?
a) where
b) from
c) with
d) select
e) none of them
22- In the query below which one of the following is a temporary relation?
with max_budget (value) as (select max(budget) from department)
select budget from department, max_budget where department.budget = max_budget.value:
a) budget
b) department
c) value
d) select
e) max_budget
23- Which of the following is not an aggregate function?
a) avg
b) sum
c) with
d) min
e) max
24- The command "delete from r where P;"
a) deletes tuple(s)
b) deletes relation
c) deletes attribute
d) all of them
e) none of them
25- Which one of the following deletes all the entries but keeps the structure of the relation?
a) delete from r where P;
b) delete from instructor where dept name= 'Finance';
c) delete from instructor where salary between 13000 and 15000 ;
d) delete from instructor;
e) none of them
26-Find the keyword to update the instructor relation by "update instructor salary = salary *1.05;
a) where
b) set
c) in
d) select
e) write
27- The problem of ordering the update in multiple updates is avoided using
a) set
b) where
c) case
d) when
e) with
28-The condition allows a general predicate over the relations being joined.
a) with
b) using
c) set
d) on
e) where
29- The query below is equivalent to
select * from student join takes using(ID);
a) select from student inner join takes using(ID);
b) select from student outer join takes using(ID);
c) select from student left outer join takes using(ID);
d) select from student right outer join takes using(ID);
e) none of the above
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions