I have this query:
SELECT s.* FROM stop s
WHERE
s.hour>
(SELECT st.hours FROM stop st
JOIN City cit ON cit.id = st.idCity
WHERE cit.name = 'LA' )
But the subquery returns more than one row, how should I proceed?
City
id | name |
---|---|
1 | LA |
2 | Ny |
3 | AZ |
Stop
id | Hour | idCity | idCityB |
---|---|---|---|
1 | 7:00 | 1 | 2 |
2 | 8.00 | 2 | 1 |
3 | 9:00 | 3 | 2 |
5 | 10:00 | 1 | 2 |
6 | 11:00 | 3 | 2 |
I want 8:00, 9:00 and 11:00