542 views
1 1 vote
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

Position:
Show:

Related questions

5 5 votes
0 0 answers
442
442 views
junaid ahmad asked Jul 20, 2017
442 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 0 votes
0 0 answers
426
426 views
Asutosh asked Jul 7, 2018
426 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 0 votes
0 0 answers
389
389 views
iarnav asked Dec 5, 2017
389 views
Kindly explain Check Constraint in SQL with a small example!
1 1 vote
1 answers 1 answer
627
627 views
Rishi yadav asked Oct 6, 2017
627 views
Plzz explain