Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Number of Stations Challenge
course content

Course Content

Intermediate SQL

Number of Stations ChallengeNumber of Stations Challenge

Note

COUNT(column) is the function that counts the number of rows.

Task

Using the relation table, find the number of stations (create a new column, named number_of_stations using station_name and COUNT() function) for each of the lines (line_name).

Here's a short example of the relation table:

relation_idline_namestation_nametime_to_next_station
1GreenAngrignon10
2GreenMonk16
3GreenVerdun9
............
21YellowLongueuil10

Everything was clear?

Section 1. Chapter 2
toggle bottom row
some-alt