WITH trips_over_1_hr AS
(
SELECT *
FROM
`bigquery-public-data.new_york_citibike.citibike_trips`
WHERE
tripduration >= 60
)
I typed this as the teacher demonstrated and then got this error
Syntax error: Unexpected end of script at [8:2]
So I don't know what to do about it.
I tried deleting the parenthesis, moving the parentheses, rewrote the whole thing, and I don't know what else to try.
The “WITH CTE_Name AS ()” is a CTE. Using CTE requires a SELECT to follow after (). Just add a SELECT from CTE_Name.
However, usage of CTE is for preparing dataset that you will eventually join or filter down in your final select. So you use it in something like below: