Week 6
Week 6
Only (ii)
Only (ii)
Only () and (i)
All (), () and (ii)
Yes, the answer is correct.
Score: 2
Accepted Answers:
Only (i) and (ii)
True
OFalse
Yes, the answer is correct.
Score: 0.5
Accepted Answers:
True
True
OFalse
No, the answer is incorrect.
Score: 0
Accepted Answers:
False
Accepted
False
Answers: WiFi 17
4) It is
mandatory to
in a query if use an
aggregate function 0.5 points
GROUP BY clause is used
True
False
No, the answer is
Score: 0 incorrect.
Accepted Answers:
False
5) Aggregate
BY clauses functions can be used in GROUP 0.5 points
True
OFalse
No, the answer is
Score: 0 incorrect.
Accepted Answers:
False
6) In which of the
following SQL clauses of a 2 points
main query can a sub-query be made use of ?
() FROM (ii) WHERE (iii)
HAVING
Only (ii)
Only (ii)
Only (i) and (ii)
All ().,() and (ii)
Yes, the answer is correct.
Score: 2
Accepted Answers:
All (), (i) and (ii)
SELECT courseld
FROM enrollment
WHERE grade = W
GROUP BY courseld
HAVING Count(rollNo) >= 10
SELECT courseld
FROM enrollment
WHERE grade ="W
GROUP BY COurseld, sem, year
HAVING count(rollNo) >= 10
O
SELECT courseld
FROM enrollment
WHERE grade =W AND Count(rollNo) >= 10
GROUP BY courseld
OSELECT Courseld
FROM enrollment
WHERE grade =W AND count(rollNo) >= 10
GROUP BY courseld,sem, year
Yes, the answer is correct.
Score: 2
Accepted Answers:
SELECT courseld
FROM enrollment
WHERE grade = W
GROUP BY courseld, sem, year
HAVING count(rollNo) >= 10
SELECT *
JOIN R2 ON R1.A = R2.C
RIFULL OUTER
FROM
Oo
18
O8
10
incorrect.
No, the answer is
Score: 0
Accepted Answers:
10
() SELECT cOurseld
FROM preRequisite
GROUP BY courseld
HAVING count(preCourseld) =0
Oonly ()
Only (i)
Both (i) and (ii)
Neither () nor (ii)
10:54 PM&X Vo
WiFi 17
() SELECT Courseld
FROM preRequisite
GROUP BY courseld
HAVING Count(preCourseld) =0
Only (i)
Only (i)
Both () and (i)
Neither (i) nor (ii)
Yes,the answer is correct.
Score: 2
Accepted Answers:
Neither (i) nor (ii)
SELECT empld
FROM EmpCount
WHERE Cnt = (SELECT MAX(cnt) from EmpCount)
CREATE VIEW EmpCount AS
SELECT empld, count(*) AS cnt
FROM teaching
WHERE courseld ='CS1100
SELECT empld
FROM EmpCount
WHERE Cnt = (SELECT MAX(cnt) from EmpCount)
CSELECT empld, max(count()) AS cnt
FROM teaching
WHERE courseld= 'CS1100'
GROUP BY empld
SELECT empld
FROM teaching
WHERE courseld 'CS1100
GROUP BY empld
HAVING COUNT(*) =(
SELECT max(count(*) FROM teaching WHERE
courseld='CS1100')
Yes, the answer is correct.
Score: 2
Accepted Answers:
CREATE VIEW EmpCount AS
SELECT empld, count() AS cnt
FROM teaching
WHERE courseld= 'CS1100'
rDAl iD DVamnld
ACcepted Answers:
CREATE VIEW EmpCount AS
BELECT empld, count() AS cnt
FROM teaching
WHERE Courseld = 'CS1100'
GROUP BY empld
SELECT empld
FROM EmpCount
WHERE cnt =(SELECT MAX(cnt) from EmpCount)