450 views
0 votes
0 votes
I have read in theory that multiple aggregation = innermost aggregation  ,So I was expecting  result as   min(price)

BUT

when I run this program on www.w3school.com  <SQL>  ,showing result as misuse of aggregation function min() !!

2 Answers

6 votes
6 votes

select max(min(price)) from product;

This will return minimum price. Because min(price) will get executed first and returns the only one value which is the minimum, now max() will start executing, which have only one value hence it will return that minimum

Read this for more insight. 

Related questions