ABDULLAH IQBAL
ABDULLAH IQBAL

Reputation: 1

Expected SELECT statement

WITH 1_hour_trips as (
    SELECT *
    from bigquery-public-data.new_york.citibike_trips
    where tripduration = 60
)

Upvotes: 0

Views: 131

Answers (1)

Dario Petrillo
Dario Petrillo

Reputation: 1113

WITH creates a temporary view, and it then expects you to use a select to actually get the result you want. Something like this:

WITH 1_hour_trips as (
    SELECT * from bigquery-public-data.new_york.citibike_trips
    where tripduration = 60
)
SELECT * from 1_hour_trips;

Upvotes: 1

Related Questions