What is the average duration of bike trips in the city of Palo Alto?
DIVIDE(SUM(duration where city = 'Palo Alto'), COUNT(start_station_id));
SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Palo Alto'
CREATE TABLE IF NOT EXISTS "station"
(
    id                INTEGER not null
        primary key,
    name              TEXT,
    lat               REAL,
    long              REAL,
    dock_count        INTEGER,
    city              TEXT,
    installation_date TEXT
);
CREATE TABLE IF NOT EXISTS "status"
(
    station_id      INTEGER,
    bikes_available INTEGER,
    docks_available INTEGER,
    time            TEXT
);
CREATE TABLE IF NOT EXISTS "trip"
(
    id                 INTEGER not null
        primary key,
    duration           INTEGER,
    start_date         TEXT,
    start_station_name TEXT,
    start_station_id   INTEGER,
    end_date           TEXT,
    end_station_name   TEXT,
    end_station_id     INTEGER,
    bike_id            INTEGER,
    subscription_type  TEXT,
    zip_code           INTEGER
);
CREATE TABLE IF NOT EXISTS "weather"
(
    date                           TEXT,
    max_temperature_f              INTEGER,
    mean_temperature_f             INTEGER,
    min_temperature_f              INTEGER,
    max_dew_point_f                INTEGER,
    mean_dew_point_f               INTEGER,
    min_dew_point_f                INTEGER,
    max_humidity                   INTEGER,
    mean_humidity                  INTEGER,
    min_humidity                   INTEGER,
    max_sea_level_pressure_inches  REAL,
    mean_sea_level_pressure_inches REAL,
    min_sea_level_pressure_inches  REAL,
    max_visibility_miles           INTEGER,
    mean_visibility_miles          INTEGER,
    min_visibility_miles           INTEGER,
    max_wind_Speed_mph             INTEGER,
    mean_wind_speed_mph            INTEGER,
    max_gust_speed_mph             INTEGER,
    precipitation_inches           TEXT,
    cloud_cover                    INTEGER,
    events                         TEXT,
    wind_dir_degrees               INTEGER,
    zip_code                       TEXT
);
