+ 1
Can we specify aggregate operators in WHERE cluase
SQL Queries aggregate operators
8 ответов
+ 1
Can you elaborate further on your goal and the idea behind the use of aggregate operator in WHERE clause?
+ 1
MIN,MAX,COUNT,AVG,SUM are aggregate operators
+ 1
Yes I know that too, I mean what are you trying to achieve by using any of those? can you tell me that please?
+ 1
SELECT name FROM sailors WHERE age = MIN(age)
Does that make sense?
+ 1
Yes you wrote in correct way
0
Find the name of youngest sailor
0
Ipang maybe it is dependent on the SQL engine, but I think "WHERE age = MIN(age)" woul not work properly. I would expect it to require a subselect:
WHERE age = (SELECT Min(age) FROM sailors)
0
In WHERE class by using other query we specify the aggregate operators