1sf/bird-sql-train-with-schema huggingface dataset:
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What is the price of a Chevrolet Bel Air?
Evidence: Chevrolet Bel Air refers to car_name = 'chevrolet bel air'
SQL: SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet bel air'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What is the average price per car produced in Japan?
Evidence: produced in Japan refers to country = 'Japan'; average price per car = avg(price) where country = 'Japan'
SQL: SELECT AVG(T1.price) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'Japan'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which country produced the car with the lowest price?
Evidence: the lowest price refers to min(price)
SQL: SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.price ASC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Among the cars produced in 1975, provide IDs, names, and producing countries of the cars with the maximum number of cylinders.
Evidence: produced in 1975 refers to model_year = 1975; names refers to car_name; producing countries refers to country; the maximum number of cylinders refers to max(cylinders)
SQL: SELECT T1.ID, T1.car_name, T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year = 1975 ORDER BY T1.cylinders DESC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which car is the cheapest? Provide its acceleration, number of cylinders, and producing year.
Evidence: the cheapest refers to min(price); number of cylinders refers to cylinders; producing year refers to model_year
SQL: SELECT T1.acceleration, T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID ORDER BY T3.price ASC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: List the names and prices of the cars with model 82 and mileage per gallon of greater than 30.
Evidence: car's name refers to car_name; model 82 refers to model = 82; mileage per gallon of greater than 30 refers to mpg > 30
SQL: SELECT T2.car_name, T1.price FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.model = 82 AND T2.mpg > 30
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: How many models of Ford Maverick were produced?
Evidence: Ford Maverick refers to car_name = 'ford maverick'
SQL: SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Calculate the percentage of cars that belong to the USA.
Evidence: belong to the USA refers to country = 'USA'; percentage = divide(count(ID where country = 'USA'), count(ID)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Calculate the average production rate per year from 1971 to 1980. Among them, name the cars with a weight of fewer than 1800 lbs.
Evidence: from 1971 to 1980 refers to model_year between 1971 and 1980; average production rate per year = divide(count(ID where model_year between 1971 and 1980), 9); car's name refers to car_name; a weight of fewer than 1800 lbs refers to weight < 1800
SQL: SELECT CAST(COUNT(T1.ID) AS REAL) / 9 FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 UNION ALL SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 AND T2.weight < 1800
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What is the average price of model 70 cars?
Evidence: model 70 refers to model = 70; average price = avg(price) where model = 70
SQL: SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.model = 70
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What is the price of Chevrolet Vega 2300?
Evidence: Chevrolet Vega 2300 refers to car_name = 'chevrolet vega 2300'
SQL: SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet vega 2300'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which country does Chevy C20 come from?
Evidence: Chevy C20 refers to car_name = 'chevy c20'
SQL: SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'chevy c20'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: List the price of Ford cars from model 1970 to 1980.
Evidence: Ford cars refers to car_name LIKE 'ford%'; from model 1970 to 1980 refers to model_year BETWEEN 1970 AND 1980
SQL: SELECT DISTINCT T3.price FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID WHERE T1.car_name LIKE 'ford%' AND T2.model_year BETWEEN 1970 AND 1980
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which is the most fuel efficient car in 1975?
Evidence: car's name refers to car_name; the most fuel efficient refers to max(mpg); in 1975 refers to model_year = 1975
SQL: SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = '1975' ORDER BY T1.mpg DESC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which car consumes fuel the most and has the highest price?
Evidence: consumes fuel the most refers to min(mpg); has the highest price refers to max(price)
SQL: SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.mpg DESC, T2.price DESC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: How many American cars have an acceleration time of less than 12 seconds?
Evidence: American car refers to country = 'USA'; an acceleration time of less than 12 seconds refers to acceleration < 12
SQL: SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'USA' AND T1.acceleration < 12
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: How many Japanese cars weigh more than 2000 lbs?
Evidence: Japanese car refers to country = 'Japan'; weigh more than 2000 lbs refers to weight > 2000
SQL: SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'Japan' AND T1.weight > 2000
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: List the name of the most expensive car.
Evidence: car's name refers to car_name; the most expensive refers to max(price)
SQL: SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What years did the Buick Skylark 320 get in production?
Evidence: year refers to model_year; Buick Skylark 320 refers to car_name = 'buick skylark 320'
SQL: SELECT T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'buick skylark 320'
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Which country produced the most expensive car in 1970?
Evidence: the most expensive refers to max(price); in 1970 refers to model_year = 1970
SQL: SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN price AS T4 ON T4.ID = T1.ID WHERE T2.model_year = 1970 ORDER BY T4.price DESC LIMIT 1
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: How many cars with horsepower greater than 200 were produced in 1975?
Evidence: horsepower greater than 200 refers to horsepower > 200; in 1975 refers to model_year = 1975
SQL: SELECT COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower > 200 AND T2.model_year = 1975
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: Calculate the percentage of American cars among all cars.
Evidence: American car refers to country = 'USA'; percentage = divide(count(ID where country = 'USA'), count(ID)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T3.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country
Database: cars
Tables: country, price, data, production
Columns (table index, column name): -1, *, 0, origin, 0, country, 1, ID, 1, price, 2, ID, 2, mpg, 2, cylinders, 2, displacement, 2, horsepower, 2, weight, 2, acceleration, 2, model, 2, car_name, 3, ID, 3, model_year, 3, country
Question: What is the average weight of Japanese cars with 4 cylinders that were produced from 1975 to 1980?
Evidence: Japanese car refers to country = 'Japan'; with 4 cylinders refers to cylinders = 4; produced from 1975 to 1980 refers to model_year BETWEEN 1975 AND 1980; average weight = avg(weight)
SQL: SELECT AVG(T1.weight) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year BETWEEN 1975 AND 1980 AND T1.cylinders = 4 AND T3.country = 'Japan'
Database: donor
Tables: essays, projects, donations, resources
Columns (table index, column name): -1, *, 0, projectid, 0, teacher_acctid, 0, title, 0, short_description, 0, need_statement, 0, essay, 1, projectid, 1, teacher_acctid, 1, schoolid, 1, school_ncesid, 1, school_latitude, 1, school_longitude, 1, school_city, 1, school_state, 1, school_zip, 1, school_metro, 1, school_district, 1, school_county, 1, school_charter, 1, school_magnet, 1, school_year_round, 1, school_nlns, 1, school_kipp, 1, school_charter_ready_promise, 1, teacher_prefix, 1, teacher_teach_for_america, 1, teacher_ny_teaching_fellow, 1, primary_focus_subject, 1, primary_focus_area, 1, secondary_focus_subject, 1, secondary_focus_area, 1, resource_type, 1, poverty_level, 1, grade_level, 1, fulfillment_labor_materials, 1, total_price_excluding_optional_support, 1, total_price_including_optional_support, 1, students_reached, 1, eligible_double_your_impact_match, 1, eligible_almost_home_match, 1, date_posted, 2, donationid, 2, projectid, 2, donor_acctid, 2, donor_city, 2, donor_state, 2, donor_zip, 2, is_teacher_acct, 2, donation_timestamp, 2, donation_to_project, 2, donation_optional_support, 2, donation_total, 2, dollar_amount, 2, donation_included_optional_support, 2, payment_method, 2, payment_included_acct_credit, 2, payment_included_campaign_gift_card, 2, payment_included_web_purchased_gift_card, 2, payment_was_promo_matched, 2, via_giving_page, 2, for_honoree, 2, donation_message, 3, resourceid, 3, projectid, 3, vendorid, 3, vendor_name, 3, project_resource_type, 3, item_name, 3, item_number, 3, item_unit_price, 3, item_quantity
Question: What is the total amount of donations in 2012.
Evidence: total amount of donations refers to sum(donation_total); 2012 refers to donation_timestamp LIKE'2012%'
SQL: SELECT SUM(donation_total) FROM donations WHERE donation_timestamp LIKE '2012%'
Database: donor
Tables: essays, projects, donations, resources
Columns (table index, column name): -1, *, 0, projectid, 0, teacher_acctid, 0, title, 0, short_description, 0, need_statement, 0, essay, 1, projectid, 1, teacher_acctid, 1, schoolid, 1, school_ncesid, 1, school_latitude, 1, school_longitude, 1, school_city, 1, school_state, 1, school_zip, 1, school_metro, 1, school_district, 1, school_county, 1, school_charter, 1, school_magnet, 1, school_year_round, 1, school_nlns, 1, school_kipp, 1, school_charter_ready_promise, 1, teacher_prefix, 1, teacher_teach_for_america, 1, teacher_ny_teaching_fellow, 1, primary_focus_subject, 1, primary_focus_area, 1, secondary_focus_subject, 1, secondary_focus_area, 1, resource_type, 1, poverty_level, 1, grade_level, 1, fulfillment_labor_materials, 1, total_price_excluding_optional_support, 1, total_price_including_optional_support, 1, students_reached, 1, eligible_double_your_impact_match, 1, eligible_almost_home_match, 1, date_posted, 2, donationid, 2, projectid, 2, donor_acctid, 2, donor_city, 2, donor_state, 2, donor_zip, 2, is_teacher_acct, 2, donation_timestamp, 2, donation_to_project, 2, donation_optional_support, 2, donation_total, 2, dollar_amount, 2, donation_included_optional_support, 2, payment_method, 2, payment_included_acct_credit, 2, payment_included_campaign_gift_card, 2, payment_included_web_purchased_gift_card, 2, payment_was_promo_matched, 2, via_giving_page, 2, for_honoree, 2, donation_message, 3, resourceid, 3, projectid, 3, vendorid, 3, vendor_name, 3, project_resource_type, 3, item_name, 3, item_number, 3, item_unit_price, 3, item_quantity
Question: When was the highest amount of donated? How much was the amount?
Evidence: when refers donation_timestamp; the highest amount refers to max(donation_total)
SQL: SELECT donation_timestamp, donation_total FROM donations WHERE donation_total = ( SELECT donation_total FROM donations ORDER BY donation_total DESC LIMIT 1 )
Database: donor
Tables: essays, projects, donations, resources
Columns (table index, column name): -1, *, 0, projectid, 0, teacher_acctid, 0, title, 0, short_description, 0, need_statement, 0, essay, 1, projectid, 1, teacher_acctid, 1, schoolid, 1, school_ncesid, 1, school_latitude, 1, school_longitude, 1, school_city, 1, school_state, 1, school_zip, 1, school_metro, 1, school_district, 1, school_county, 1, school_charter, 1, school_magnet, 1, school_year_round, 1, school_nlns, 1, school_kipp, 1, school_charter_ready_promise, 1, teacher_prefix, 1, teacher_teach_for_america, 1, teacher_ny_teaching_fellow, 1, primary_focus_subject, 1, primary_focus_area, 1, secondary_focus_subject, 1, secondary_focus_area, 1, resource_type, 1, poverty_level, 1, grade_level, 1, fulfillment_labor_materials, 1, total_price_excluding_optional_support, 1, total_price_including_optional_support, 1, students_reached, 1, eligible_double_your_impact_match, 1, eligible_almost_home_match, 1, date_posted, 2, donationid, 2, projectid, 2, donor_acctid, 2, donor_city, 2, donor_state, 2, donor_zip, 2, is_teacher_acct, 2, donation_timestamp, 2, donation_to_project, 2, donation_optional_support, 2, donation_total, 2, dollar_amount, 2, donation_included_optional_support, 2, payment_method, 2, payment_included_acct_credit, 2, payment_included_campaign_gift_card, 2, payment_included_web_purchased_gift_card, 2, payment_was_promo_matched, 2, via_giving_page, 2, for_honoree, 2, donation_message, 3, resourceid, 3, projectid, 3, vendorid, 3, vendor_name, 3, project_resource_type, 3, item_name, 3, item_number, 3, item_unit_price, 3, item_quantity
Question: Calculate the total amount of donations made in 2011 for an honoree with payment via campaign page.
Evidence: total amount refers to sum(donation_total); 2011 refers to donation_timestamp LIKE'2011%'; honoree refers to for_honoree = 't'; via campaign page refers to via_giving_page = 't'
SQL: SELECT SUM(donation_total) FROM donations WHERE donation_timestamp LIKE '2011%' AND via_giving_page = 't' AND for_honoree = 't'
Database: donor
Tables: essays, projects, donations, resources
Columns (table index, column name): -1, *, 0, projectid, 0, teacher_acctid, 0, title, 0, short_description, 0, need_statement, 0, essay, 1, projectid, 1, teacher_acctid, 1, schoolid, 1, school_ncesid, 1, school_latitude, 1, school_longitude, 1, school_city, 1, school_state, 1, school_zip, 1, school_metro, 1, school_district, 1, school_county, 1, school_charter, 1, school_magnet, 1, school_year_round, 1, school_nlns, 1, school_kipp, 1, school_charter_ready_promise, 1, teacher_prefix, 1, teacher_teach_for_america, 1, teacher_ny_teaching_fellow, 1, primary_focus_subject, 1, primary_focus_area, 1, secondary_focus_subject, 1, secondary_focus_area, 1, resource_type, 1, poverty_level, 1, grade_level, 1, fulfillment_labor_materials, 1, total_price_excluding_optional_support, 1, total_price_including_optional_support, 1, students_reached, 1, eligible_double_your_impact_match, 1, eligible_almost_home_match, 1, date_posted, 2, donationid, 2, projectid, 2, donor_acctid, 2, donor_city, 2, donor_state, 2, donor_zip, 2, is_teacher_acct, 2, donation_timestamp, 2, donation_to_project, 2, donation_optional_support, 2, donation_total, 2, dollar_amount, 2, donation_included_optional_support, 2, payment_method, 2, payment_included_acct_credit, 2, payment_included_campaign_gift_card, 2, payment_included_web_purchased_gift_card, 2, payment_was_promo_matched, 2, via_giving_page, 2, for_honoree, 2, donation_message, 3, resourceid, 3, projectid, 3, vendorid, 3, vendor_name, 3, project_resource_type, 3, item_name, 3, item_number, 3, item_unit_price, 3, item_quantity
Question: What is the total donated amount for projects created by a teacher working in a school in Brooklyn?
Evidence: school in Brooklyn refers to school_city = 'Brooklyn'; total donated amount refers to donation_total;
SQL: SELECT SUM(T2.donation_total) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn'