Question
Topic: SQL / Database Management Given the following schema, rank tree species from widest to thinnest based on average girth at age 10. Tree( id
Topic: SQL / Database Management
Given the following schema, rank tree species from widest to thinnest based on average girth at age 10.
Tree(id: string, species: string, height: float, girth: float, age: int)
Group of answer choices
1. SELECT species, AVG(girth) FROM Tree WHERE age = 10 GROUP BY species ORDER BY AVG(girth) DESC
2. SELECT species, AVG(girth) FROM Tree WHERE age = 10 GROUP BY species ORDER BY girth DESC
3. SELECT species, AVG(girth) FROM Tree WHERE age = 10 ORDER BY species, AVG(girth) DESC
4. SELECT species, AVG(girth) FROM Tree WHERE age = 10 GROUP BY species ORDER BY AVG(girth)
5. SELECT species, age = 10, AVG(girth) FROM Tree GROUP BY species ORDER BY girth DESC
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started