304 views
1 votes
1 votes
Consider two queries

Q1- SELECT DISTINCT a from R WHERE b>0 ;

Q2- SELECT a from R WHERE b>0 GROUP BY a;

a)Both produce same answer

b)The answer of Q1 is always contained in the answer to Q2

c)The answer of Q2 is always contained in the answer to Q1

d)Both produce different answer

1 Answer

Related questions

7 votes
7 votes
0 answers
1
junaid ahmad asked Jul 20, 2017
286 views
Q.consider following relation;supplier(sid,sname,rating)/sid is the p.kparts(pid,pname,color)/pid is the p.kcatalog(sid,pid,cost)/sid,pid is the p.kWrite SQL command for ...
0 votes
0 votes
0 answers
2
Asutosh asked Jul 7, 2018
221 views
For the relations:A(pid, cid)B(pid, pname, powner)C(cid, cname, cdesciption)How will the query be executed :SELECT pname, cname FROM A, B, CWHERE B.powner = $somevalueAND...
0 votes
0 votes
0 answers
3
iarnav asked Dec 5, 2017
197 views
Kindly explain Check Constraint in SQL with a small example!
1 votes
1 votes
1 answer
4
Rishi yadav asked Oct 6, 2017
409 views
Plzz explain