2. Nested Subqueries
Challenge: Average Ride Time for Each Subway Line
AVG(column)function returns the average value of some column.
ORDER BYclause can sort the data in descending order. To do this, we need to specify the keyword
You have to count the average ride time (create a new column, named
AVG() function) of the driving of each subway line (
line_name column). Order the result by the
average_time column in descending order.
Here's a short example of the
Everything was clear?