2 2 votes Consider the following tables.The following SQL query is executed:SELECT AVG(TotalSales) AS AverageSales FROM Product LEFT OUTER JOIN ProductSales ON Product.ProductCode = ProductSales.ProductCode WHERE Rank = 'A';What is the value of $\mathrm{AverageSales}$?$100$ $150$ $225$ $275$ Databases goclasses goclasses-da-dpp goclasses-da-dpp-day-288 goclasses-cs-dpp goclasses-cs-dpp-day-386 databases goclasses-databases-practice-questions database-sql sql + – GO Classes 130 views answer comment Share Follow Print See 1 comment 1 1 comment reply ghosharkoprabho commented Oct 2 reply Follow flag dekh bhai ans b hai cauz tujhe 50 , aur 250 ayega but tujhe usko / 2 cauz null values neglect karte hai voh 0 0 replyShare Please log in or register to add a comment.
0 0 votes The crucial rule is:$\mathrm{AVG(attribute)}$ ignores $\mathrm{NULL}$ values.Therefore the average is calculated using only $50$ and $250$.It is not $\frac{50+0+250}{3}$ because $\mathrm{NULL}$ does not become zero.So,Answer : $\boxed{\mathrm{B}}$ GO Classes answered Oct 1 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.