702 views
0 votes
0 votes

Consider the following subquery on the relation R(A,B,C,D)

SELECT […..] FROM R GROUP BY A,B

Assuming A,B,C,D take integer values, which of the following can appear in the position marked as […..]

  1. MIN(C+D)
  2. A,B
  3. C,D
  1. 2 only
  2. 1 and 2 only
  3. 1,2,3
  4. none

1 Answer

1 votes
1 votes
B

Any attribute appearing in the select clause must be present in the GROUP BY clause or must be present as an aggregate function.

Hence A,B and MIN(C+D) are permitted.

Related questions

0 votes
0 votes
0 answers
1
joshi_nitish asked Jun 20, 2017
647 views
0 votes
0 votes
1 answer
2
vishwa ratna asked Nov 12, 2016
462 views
I feel that answer is none of the above , because in question it is given AB is key , so any partial dependency will not be accepted , so none will be in 2NF.what you say...
2 votes
2 votes
1 answer
3
tvkkk asked Sep 16, 2016
641 views
The schedule S:T1: Read(X); T2: Write(X);T2: Write(Y);T3: Write(Y);T1: Write(Y);T1: commit; T2: commit;T3: commit;is Recoverable or non-recoverable?
0 votes
0 votes
2 answers
4
Shivam_j asked Oct 16, 2022
804 views
Class B network on the internet has a subnet mask of 255.255.119.0 what is maximum possible hosts per subnet. Assuming Classfull Addressing Scheme