CREATE TABLE "table1_24620684_2" (
  "vehicle" text,
  "operating_mode" text,
  "epa_rated_all_electric_range" text,
  "epa_rated_combined_fuel_economy" text,
  "clean_electric_grid_california_san_francisco" text,
  "u_s_national_average_electric_mix" text,
  "dirty_electric_grid_rocky_mountains_denver" text
);

Question: When bmw activee is the vehicle type how many clean electric grid california (san francisco) measurements are there?
SQL: SELECT COUNT("clean_electric_grid_california_san_francisco") FROM "table1_24620684_2" WHERE "vehicle"='BMW ActiveE';

Question: When 102 mpg-e (33kw-hrs/100mi) is the epa rated combined fuel economy what is the vehicle type? 
SQL: SELECT "vehicle" FROM "table1_24620684_2" WHERE "epa_rated_combined_fuel_economy"='102 mpg-e (33kW-hrs/100mi)';

Question: When 100 g/mi (62 g/km) is the clean electric grid california (san francisco) how many vehicles are there?
SQL: SELECT COUNT("vehicle") FROM "table1_24620684_2" WHERE "clean_electric_grid_california_san_francisco"='100 g/mi (62 g/km)';

Question: When 380 g/mi (236 g/km) is the dirty electric grid rocky mountains (denver) what is the u.s national average electric mix?
SQL: SELECT "u_s_national_average_electric_mix" FROM "table1_24620684_2" WHERE "dirty_electric_grid_rocky_mountains_denver"='380 g/mi (236 g/km)';

Question: When bmw activee is the vehicle type what is the u.s national average electric mix?
SQL: SELECT "u_s_national_average_electric_mix" FROM "table1_24620684_2" WHERE "vehicle"='BMW ActiveE';

Question: When  87 mpg-e (39kw-hrs/100mi) is the  epa rated combined fuel economy how many operating modes are there?
SQL: SELECT COUNT("operating_mode") FROM "table1_24620684_2" WHERE "epa_rated_combined_fuel_economy"='87 mpg-e (39kW-hrs/100mi)';