For the following schema: Athletes (name, country, sports, age, height, weigh)

For the following schema: Athletes (name, country, sport, age, height, weight)

Which of the following SQL queries reflects the English query statement:

“For each country, find the average height of weight lifters, qualifying only those countries that have weight lifters with minimum weight of 160 pounds”.

 

(A) SELECT country, avg(height)

FROM Athletes

WHERE sport = "Weight lifting"

GROUP BY country, height, weight HAVING min(weight) >= 160;

 

(B) SELECT country, avg(height)

FROM Athletes

GROUP BY country, sport HAVING min(weight) >= 160 AND sport = "Weight lifting";

 

(C) SELECT country, avg(height)

FROM Athletes

WHERE sport = "Weight lifting"

GROUP BY country, height HAVING min(weight) >= 160;

 

(D)SELECT country, avg(height)

FROM Athletes

WHERE sport = "Weight lifting" AND min (weight) >= 160

GROUP BY country, weight;

A
B
C
D
0Comment