context
stringlengths 11
9.12k
| question
stringlengths 0
1.06k
| SQL
stringlengths 2
4.44k
| source
stringclasses 28
values |
|---|---|---|---|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many schools which have suburban metro are there in Bethlehem?
|
SELECT COUNT(schoolid) FROM projects WHERE school_city = 'Bethlehem' AND school_metro = 'suburban'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the number of the year round school in Los Angeles?
|
SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
State the number of public magnet schools in New York Manhattan.
|
SELECT COUNT(schoolid) FROM projects WHERE school_county = 'New York (Manhattan)' AND school_magnet = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many teachers in Twin Falls have Math & Science as their primary focus area?
|
SELECT COUNT(teacher_acctid) FROM projects WHERE school_county = 'Twin Falls' AND primary_focus_area = 'Math & Science'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many teachers that have Literature & Writing as their primary focus subject use 'Mr' as their teacher prefix?
|
SELECT COUNT(teacher_acctid) FROM projects WHERE teacher_prefix = 'Mr.' AND primary_focus_subject = 'Literature & Writing'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the total number of projects that was created by the teachers that teach 3-5 grades in Boston Public School District?
|
SELECT COUNT(projectid) FROM projects WHERE school_district = 'Boston Public School District' AND grade_level = 'Grades 3-5'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
For the teacher who wrote the project 'ABC Read', which city was he/she in?
|
SELECT T2.school_city FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'ABC Read'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the teacher prefix for the teacher who wrote the project 'Creating Memories and Inspiring Dreams'?
|
SELECT T2.teacher_prefix FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Creating Memories and Inspiring Dreams%'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Is the donor of the project 'Calculate, Financial Security For Tomorrow Starts Today! ' a teacher?
|
SELECT T2.is_teacher_acct FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Calculate, Financial Security For Tomorrow Starts Today! '
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the title for the project that got the donation message as "Donation on behalf of Matt Carpenter because I'm a strong believer in education".
|
SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_message LIKE 'Donation on behalf of Matt Carpenter because I''m a strong believer in education.'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many number of donations did the project 'A Rug For Reaching Readers' get?
|
SELECT SUM(T2.donation_total) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'A Rug For Reaching Readers'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the total donation amount for the project 'Engaging Young Readers with a Leveled Classroom Library'?
|
SELECT SUM(T2.donation_to_project) + SUM(T2.donation_optional_support) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Engaging Young Readers with a Leveled Classroom Library '
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What was the donation optional support amount for the project 'Armenian Genocide'?
|
SELECT T2.donation_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Armenian Genocide'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
State the short description for the project which got the donation at 14:44:29 on 2012/9/6.
|
SELECT T1.short_description FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_timestamp LIKE '2012-09-06 14:44:29'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation?
|
SELECT T2.donation_included_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'I Can''t See It...Can You Help Me???'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the teacher's account ID for the project that got the donation at 11:38:43 on 2008/7/29 ?
|
SELECT T1.teacher_acctid FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_timestamp LIKE '2008-07-29 11:38:43.361'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Show the school id for the project 'Virtual Aquarium Needs Help!'.
|
SELECT T2.schoolid FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Virtual Aquarium Needs Help!'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What was the title for the project which got the biggest donation?
|
SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_total = ( SELECT MAX(donation_total) FROM donations )
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
For the donation of the project 'Awesome Audiobooks Make Avid Readers', what was the percentage of the tip in the total amount?
|
SELECT CAST(SUM(T2.donation_optional_support) AS REAL) * 100 / SUM(T2.donation_total) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Awesome Audiobooks Make Avid Readers'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
For the all donations to the project 'Bringing Drama to Life', what is the percentage of the donation is paid by credit card?
|
SELECT CAST(SUM(CASE WHEN T2.payment_method LIKE 'creditcard' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donationid) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Bringing Drama to Life'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the short description for the title Future Einsteins Of America?
|
SELECT short_description FROM essays WHERE title = 'Future Einsteins Of America'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Write down the need statement of Family History Project.
|
SELECT need_statement FROM essays WHERE title = 'Family History Project'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many suburban metros are there in Livingston Parish School District?
|
SELECT COUNT(projectid) FROM projects WHERE school_district = 'Livingston Parish School Dist' AND school_metro = 'suburban'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Name the vendors that sell the item Classroom Keepers Management Center.
|
SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List the resource types available at Sax Arts & Crafts.
|
SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Sax Arts & Crafts'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which school county in the state of New York has a high number of low poverty levels?
|
SELECT school_county FROM projects WHERE poverty_level = 'low poverty' AND school_state = 'NY' GROUP BY school_state ORDER BY COUNT(poverty_level) DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which school district was Future Einsteins Of America project located at?
|
SELECT T1.school_district FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Future Einsteins Of America'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What payment method was used for Needed Resource Materials For My Students?
|
SELECT T3.payment_method FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Needed Resource Materials For My Students'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many donations were paid via credit card to Memphis City School District?
|
SELECT COUNT(T1.projectid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.payment_method = 'creditcard' AND T2.school_district = 'Memphis City School District'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List the school districts that have bought resources from Barnes and Noble.
|
SELECT T2.school_district FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Barnes and Noble'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Give the coordinates of the buyer of R & A Plant Genetics from Benchmark Education.
|
SELECT T2.school_latitude, T2.school_longitude FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.item_name = 'R & A Plant Genetics' AND T1.vendor_name = 'Benchmark Education'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which payment method is most comonly used by the schools in the state of Georgia for the payment of donations?
|
SELECT T1.payment_method FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_state = 'GA' GROUP BY T2.school_state ORDER BY COUNT(T1.payment_method) DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What are the coordinates of the school where project 'Look, Look, We Need a Nook!' Was donated to and what resource type is it?
|
SELECT T2.school_latitude, T2.school_longitude, T2.resource_type FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Look, Look, We Need a Nook!'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Write the messages of those who donated to the Newark School District in the coordinates of 40.735332, -74.196014.
|
SELECT T1.donation_message FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_latitude = 40.735332 AND T2.school_longitude = -74.196014 AND T2.school_district = 'Newark School District'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What date did the project with he 'Lets Share Ideas essay' went live?
|
SELECT T1.date_posted FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Lets Share Ideas'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Write the message of the donor of the project with the title of Lets Share Ideas who paid with a credit card.
|
SELECT T3.donation_message FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Lets Share Ideas' AND T3.payment_method = 'creditcard'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which resource type is commonly bought by the Los Angeles Unified School District?
|
SELECT T1.project_resource_type FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_district = 'Los Angeles Unif Sch Dist' GROUP BY T2.school_district ORDER BY COUNT(T1.project_resource_type) DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which cities in the Los Angeles Unified School District has bought supplies from Quill.com?
|
SELECT T2.school_city FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_district = 'Los Angeles Unif Sch Dist' AND T1.vendor_name = 'Quill.com'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the total price of items brought from ABC School Supply with a listed type of Other? Also include the list of the buyers' coordinates and school districts they belong to.
|
SELECT T2.item_unit_price * T2.item_quantity price, T1.school_latitude, T1.school_longitude FROM projects AS T1 INNER JOIN resources AS T2 ON T1.projectid = T2.projectid WHERE T2.vendor_name = 'ABC School Supply' AND T2.project_resource_type = 'Other' AND T1.school_district = 'Hillsborough Co Pub Sch Dist'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Calculate the sum of all the total amount donated to the essay project titled 'Lets Share Ideas' which were paid through paypal and indicate the city and poverty level.
|
SELECT SUM(T3.donation_total), school_city, poverty_level FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Lets Share Ideas' AND T3.payment_method = 'paypal'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many donors who donated to the city of Pocatello are not teachers?
|
SELECT COUNT(donationid) FROM donations WHERE donor_city = 'Pocatello' AND is_teacher_acct = 'f'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many schools in Suffolk County have Ph.D. teachers?
|
SELECT COUNT(schoolid) FROM projects WHERE teacher_prefix = 'Dr.' AND school_county = 'Suffolk'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the sum of the total donated amounts paid through Amazon?
|
SELECT SUM(donation_to_project) + SUM(donation_optional_support) FROM donations WHERE payment_method = 'amazon'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many donations of more than $100 were made for an honoree?
|
SELECT COUNT(donationid) FROM donations WHERE dollar_amount = '100_and_up' AND for_honoree = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many resources with a unit price less than 15 are not technology type? List them by vendor id
|
SELECT vendorid FROM resources WHERE project_resource_type = 'Technology' AND item_unit_price <= 15
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com?
|
SELECT COUNT(projectid) FROM resources WHERE vendor_name = 'Quill.com' AND item_quantity BETWEEN 5 AND 10
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List by school id projects from schools located in the Union Pub School District I-9 that have a New York teaching fellow
|
SELECT schoolid FROM projects WHERE school_district = 'Union Pub School District I-9' AND teacher_ny_teaching_fellow = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
In which cities are Los Angeles County Suburban Metro Schools located?
|
SELECT school_city FROM projects WHERE school_metro = 'suburban' AND school_county = 'Los Angeles'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What are the vendors of the book-type projects? List them with the project ID.
|
SELECT DISTINCT vendorid, projectid FROM resources WHERE project_resource_type = 'Books'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What percentage of projects that have not received a cash donation have received a portion of a donation included corporate sponsored giftcard?
|
SELECT CAST(SUM(CASE WHEN payment_included_campaign_gift_card = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donationid) FROM donations WHERE payment_method = 'no_cash_received'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What percentage of projects in the City of Santa Barbara are in suburban metro?
|
SELECT CAST(SUM(CASE WHEN school_metro = 'suburban' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(projectid) FROM projects WHERE school_city = 'Santa Barbara'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the percentage of payment methods of donations made in March 2013?
|
SELECT payment_method , CAST(COUNT(donationid) AS REAL) * 100 / 51090 FROM donations WHERE donation_timestamp LIKE '2013-03%' GROUP BY payment_method
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the average unit price of AKJ Books items?
|
SELECT SUM(item_unit_price) / SUM(item_quantity) FROM resources WHERE vendor_name = 'AKJ Books'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many schools in Brooklyn with urban metro and donations for an honoree have requested TT992 - Refill Pack for Safety Name Tags as a resource?
|
SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T2.school_city = 'Brooklyn' AND T2.school_metro = 'urban' AND T3.for_honoree = 't' AND T1.item_name = 'TT992 - Refill Pack for Safety Name Tags'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card?
|
SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_campaign_gift_card = 't' AND T1.poverty_level = 'highest poverty'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
In which city is there a greater number of schools that have received donations of less than 10 dollars?
|
SELECT T2.school_city FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.dollar_amount = 'under_10' GROUP BY T2.school_city ORDER BY COUNT(T2.schoolid) DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the project title of the school located at latitude 42003718 and longitude -87668289?
|
SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_latitude = 42003718 AND T2.school_longitude = -87668289
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Find out if the project with the title Team More Books! has a New York teaching fellow.
|
SELECT T2.teacher_ny_teaching_fellow FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Team More Books!'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the name of the vendors that serve resources to schools whose primary focus area is Literature?
|
SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area LIKE 'Literacy%' GROUP BY T1.vendor_name ORDER BY COUNT(T2.primary_focus_area) DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the name of the vendors serving material for projects for grades 9-12?
|
SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.grade_level = 'Grades 9-12'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many teachers have made some type of donation for projects in Chicago?
|
SELECT COUNT(DISTINCT T2.teacher_acctid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.is_teacher_acct = 't' AND T2.school_city = 'Chicago'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many Rock Hill City School projects have teacher donors?
|
SELECT COUNT(DISTINCT T1.teacher_acctid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Rock Hill' AND is_teacher_acct = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the total sum of the donations paid with an optional support in projects that reach more than 300 students?
|
SELECT SUM(T2.dollar_amount) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.students_reached > 300 AND t2.donation_included_optional_support = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many total items were requested for the Onslow Co School District urban metro school projects?
|
SELECT SUM(T1.item_quantity) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_metro = 'urban' AND T2.school_district = 'Onslow Co School District'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the average total donations received by Fresno County colleges?
|
SELECT SUM(T2.donation_optional_support + T2.donation_to_project) / COUNT(donationid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_county = 'Fresno'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
In what percentage of counties has the ABC Read project been launched?
|
SELECT CAST(SUM(CASE WHEN T2.title LIKE 'ABC Read' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.school_county) FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the average amount of resources from projects that have received donations per honoree?
|
SELECT AVG(T1.item_quantity) FROM resources AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.for_honoree = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
When did the project "Photojournalists Want to Exhibit Their Best Works" go live?
|
SELECT T1.date_posted FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Photojournalists Want to Exhibit Their Best Works'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Which item provided for projects with Mathematics as a primary subject is the most expensive?
|
SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject = 'Mathematics' ORDER BY T1.item_unit_price DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Where is the school that needs a "Viewscreen LCD from Texas Instruments, TI-84 Plus"? Provide the latitude and longitude of that school.
|
SELECT T2.school_city, T2.school_latitude, T2.school_longitude FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.item_name = 'Viewscreen LCD FROM Texas Instruments, TI-84 Plus'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
How many donations does the project "Look, Look, We Need a Nook!" have?
|
SELECT SUM(T3.donation_total) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Look, Look, We Need a Nook!'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List the poverty level of all the schools that received donations with the zip code "7079".
|
SELECT DISTINCT T2.poverty_level FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.donor_zip = 7079
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the name of the vendor that the project "Bloody Times" uses for their resources?
|
SELECT T3.vendor_name FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN resources AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Bloody Times'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List all the items from "Sax Arts & Crafts" and the zip code of the schools that received them.
|
SELECT T2.school_zip, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Sax Arts & Crafts'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What are the coordinates of the school with the project "Wiping Away Bad Grades"?
|
SELECT T1.school_longitude, T1.school_latitude FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Wiping Away Bad Grades'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
List the primary subject of all the donations with a corporate sponsored giftcard.
|
SELECT DISTINCT T2.primary_focus_subject FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.payment_included_campaign_gift_card = 't'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the most expensive book item? Please provide a short description of projects related to those.
|
SELECT T1.item_name, T2.short_description FROM resources AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.project_resource_type = 'Books' ORDER BY T1.item_unit_price DESC LIMIT 1
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
For what grade was the project "Too Close for Comfort" for?
|
SELECT T1.grade_level FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Too Close for Comfort'
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What is the total number of students impacted by the projects with a donation from a donor with zip code "22205"?
|
SELECT SUM(T2.students_reached) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.donor_zip = 22205
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
What percentage of donations are given via a giving or campaign page? List the primary area of those donations.
|
SELECT CAST(SUM(CASE WHEN T1.via_giving_page = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donation_total), ( SELECT T2.primary_focus_area FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.via_giving_page = 't' GROUP BY T2.primary_focus_area ORDER BY SUM(T1.donation_total) DESC LIMIT 1 ) result FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid
|
bird
|
CREATE TABLE donor (projectid text, teacher_acctid text, title text, short_description text, need_statement text, essay text, projectid text, teacher_acctid text, schoolid text, school_ncesid text, school_latitude real, school_longitude real, school_city text, school_state text, school_zip integer, school_metro text, school_district text, school_county text, school_charter text, school_magnet text, school_year_round text, school_nlns text, school_kipp text, school_charter_ready_promise text, teacher_prefix text, teacher_teach_for_america text, teacher_ny_teaching_fellow text, primary_focus_subject text, primary_focus_area text, secondary_focus_subject text, secondary_focus_area text, resource_type text, poverty_level text, grade_level text, fulfillment_labor_materials real, total_price_excluding_optional_support real, total_price_including_optional_support real, students_reached integer, eligible_double_your_impact_match text, eligible_almost_home_match text, date_posted date, donationid text, projectid text, donor_acctid text, donor_city text, donor_state text, donor_zip text, is_teacher_acct text, donation_timestamp datetime, donation_to_project real, donation_optional_support real, donation_total real, dollar_amount text, donation_included_optional_support text, payment_method text, payment_included_acct_credit text, payment_included_campaign_gift_card text, payment_included_web_purchased_gift_card text, payment_was_promo_matched text, via_giving_page text, for_honoree text, donation_message text, resourceid text, projectid text, vendorid integer, vendor_name text, project_resource_type text, item_name text, item_number text, item_unit_price real, item_quantity integer)
|
Among the technology items, what percentage of them are from Best Buy for Business? Provide the date of the project related to those items.
|
SELECT CAST(SUM(CASE WHEN T1.vendor_name = 'Best Buy for Business' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.project_resource_type = 'Technology' UNION ALL SELECT DISTINCT T1.date_posted FROM projects AS T1 INNER JOIN resources AS T2 ON T1.projectid = T2.projectid WHERE T2.vendor_name = 'Best Buy for Business' AND T2.project_resource_type = 'Technology'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?
|
SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Please list all the games that have the same game genre as 3D Lemmings.
|
SELECT T1.game_name FROM game AS T1 WHERE T1.genre_id = ( SELECT T.genre_id FROM game AS T WHERE T.game_name = '3D Lemmings' )
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
How many action games are there in total?
|
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Action'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
What is the genre of 3D Lemmings?
|
SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '3D Lemmings'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Who is the publisher of 3D Lemmings?
|
SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = '3D Lemmings'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Please list the names of all the games published by 10TACLE Studios.
|
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '10TACLE Studios'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Among the games published by 10TACLE Studios, how many of them are puzzles?
|
SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' AND T3.publisher_name = '10TACLE Studios'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Please list the names of all the games published by 10TACLE Studios and are puzzles.
|
SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = '10TACLE Studios' AND T4.genre_name = 'Puzzle'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Which publisher has published the most games?
|
SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T2.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T1.publisher_id ORDER BY COUNT(T2.id) DESC LIMIT 1 ) t
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
On which platform was Panzer Tactics released in 2007?
|
SELECT T5.platform_name FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id INNER JOIN game_platform AS T4 ON T1.id = T4.game_publisher_id INNER JOIN platform AS T5 ON T4.platform_id = T5.id WHERE T3.game_name = 'Panzer Tactics' AND T4.release_year = 2007
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
In which year was Panzer Tactics released on DS?
|
SELECT T4.release_year FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id INNER JOIN game_platform AS T4 ON T1.id = T4.game_publisher_id INNER JOIN platform AS T5 ON T4.platform_id = T5.id WHERE T3.game_name = 'Panzer Tactics' AND T5.platform_name = 'DS'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Please list the names of the publishers of all the puzzle games.
|
SELECT DISTINCT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
What is the name of the publisher that has published the most puzzle games?
|
SELECT T.publisher_name FROM ( SELECT T3.publisher_name, COUNT(DISTINCT T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T3.publisher_name ORDER BY COUNT(DISTINCT T1.id) DESC LIMIT 1 ) t
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
How many publishers have published more than 3 puzzle games?
|
SELECT COUNT(T.publisher_name) FROM ( SELECT T3.publisher_name, COUNT(DISTINCT T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T3.publisher_name HAVING COUNT(DISTINCT T1.id) > 3 ) t
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Among the games published by Nintendo, what is the percentage of those in the genre of sports?
|
SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Sports' THEN T1.id ELSE NULL END) AS REAL) * 100/ COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = 'Nintendo'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
How many games were sold on the DS platform on average in the 4 different regions?
|
SELECT SUM(T1.num_sales) * 100000 / 4 FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id INNER JOIN platform AS T3 ON T2.platform_id = T3.id WHERE T3.platform_name = 'DS'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
Tell the number of games whose publisher id is 352.
|
SELECT DISTINCT T.game_id FROM game_publisher AS T WHERE T.publisher_id = 352
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
List the genre id of the game Pro Evolution Soccer 2012.
|
SELECT T.genre_id FROM game AS T WHERE T.game_name = 'Pro Evolution Soccer 2012'
|
bird
|
CREATE TABLE video_games (id integer, genre_name text, id integer, genre_id integer, game_name text, id integer, platform_name text, id integer, publisher_name text, id integer, game_id integer, publisher_id integer, id integer, game_publisher_id integer, platform_id integer, release_year integer, id integer, region_name text, region_id integer, game_platform_id integer, num_sales real)
|
State the region id of Japan.
|
SELECT T.id FROM region AS T WHERE T.region_name = 'Japan'
|
bird
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.