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 Databases + – hitendra singh 1.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
2 2 votes A B(avg) a1 b1 a3 (b5+b6)/2 null b2 null b2 in SQL every null treated as different Gurdeep Saini answered Nov 14, 2018 • edited Jan 18, 2019 by Gurdeep Saini Gurdeep Saini comment Share Follow See 1 comment 1 1 comment reply hitendra singh commented Nov 14, 2018 reply Follow flag i also think the same.... 1 1 replyShare Please log in or register to add a comment.
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) Rackson answered Nov 14, 2018 • edited Nov 14, 2018 by Rackson Rackson comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments hitendra singh commented Nov 14, 2018 reply Follow flag I have read somewhere that every null is treated as different.. 0 0 replyShare Gurdeep Saini commented Nov 14, 2018 reply Follow flag yes every null will be treated as different 0 0 replyShare hitendra singh commented Nov 14, 2018 reply Follow flag then I think there must be 4 rows in the output Isn't it? 0 0 replyShare Please log in or register to add a comment.