1,290 views
0 0 votes

what will be the output of the query ?

SELECT A, Avg(B)

FROM R 

GROUP BY A:

Table R

A B C
a1 b1 80
NULL b2 90
a3 b5 40
NULL b2 30
a1 b1 90
a3 b6 NULL

 

2 Answers

0 0 votes
Avg(B) A(group by A)
(b1+b1)/2 a1
(b5+b6)/2 a3
b2 Null
b2 Null

 

Null is non  zero and two null value may not same 
Null is a sequence of ASCII character assigned by DBMS in such way two nulls may not same  --->(Code Rule)

 

• edited by
Position:
Show:

Related questions

0 0 votes
0 0 answers
218
218 views
js__ asked Nov 24, 2025
218 views
Should we answer according to the latest version which is in real life practical or stick to the old versions in standard text books ? @Deepak Poonia @Sachin Mittal 1 Que...
0 0 votes
0 0 answers
1.8k
1.8k views
kd..... asked Apr 30, 2019
1,796 views
Here why does the 5th query select * from employees natural join works_on where PID = 'X' AND PID='Y'; is not workingThe queries are The output are
0 0 votes
1 1 answer
512
512 views
Satbir asked Dec 4, 2018
512 views
please give an example to differentiate between self join , natural join and join operation.
0 0 votes
0 0 answers
815
815 views
Satbir asked Dec 4, 2018
815 views
Given a Relation POSITION (Posting-No, Skill), then query to retrieve all distinct pairs of posting-nos requiring skill is1.Select p1.posting-No, p2.posting-No from posit...