CREATE TABLE station (id VARCHAR, city VARCHAR)
CREATE TABLE trip (end_station_id VARCHAR)

Count the number of trips that did not end in San Francisco city.
SELECT COUNT(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id WHERE T2.city <> "San Francisco"
SELECT COUNT(*) FROM "trip" AS "T1" JOIN "station" AS "T2" ON "San Francisco" <> "T2"."city" AND "T1"."end_station_id" = "T2"."id"