db_id stringclasses 69 values | question stringlengths 24 325 | evidence stringlengths 0 673 | SQL stringlengths 23 804 |
|---|---|---|---|
donor | What is the total donated amount for projects created by a teacher working in a school in Brooklyn? | school in Brooklyn refers to school_city = 'Brooklyn'; total donated amount refers to donation_total; | SELECT SUM(T2.donation_total) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn' |
donor | Please list the donation messages of the donations for the projects created by a teacher working in a public magnet school in Brooklyn. | school in Brooklyn refers to school_city = 'Brooklyn'; public magnet refers to school_magnet = 't'; | SELECT T2.donation_message FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn' AND T1.school_magnet = 't' |
donor | Among the donations with a portion using account credits redemption, how many of them are for projects created by teachers working in a public year-round school? | portion using account credits redemption refers to payment_included_acct_credit = 't'; year-round school refers to school_year_round = 't'; | SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_acct_credit = 't' AND T1.school_year_round = 't' |
donor | What is the total donation amount made for projects whose main subject area are Literacy & Language? | main subject area refers to primary_focus_area = 'Literacy & Language'; total donation amount refers to Sum(dollar_amount); | SELECT SUM(T2.dollar_amount) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.primary_focus_area = 'Literacy & Language' |
donor | Which donor has donated the most for a project whose main subject area is Literacy & Language? Please give his or her ID. | main subject area refers to primary_focus_area = 'Literacy & Language'; donated the most refers to Max(donation_total); | SELECT T2.donor_acctid FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.primary_focus_area = 'Literacy & Language' ORDER BY T2.donation_total DESC LIMIT 1 |
donor | What is the most requested item under the resource type "Supplies" for projects whose main subject area is Literacy & Language? | main subject area refers to primary_focus_area = 'Literacy & Language'; resource type supplies refers to project_resource_type = 'Supplies'; most requested item refers to Max(item_quantity); | SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area = 'Literacy & Language' AND T1.project_resource_type = 'Supplies' ORDER BY T1.item_quantity DESC LIMIT 1 |
donor | Which item provided to a project whose main subject area is Literacy & Language has the highest unit price? | main subject area refers to primary_focus_area = 'Literacy & Language'; highest unit price refers to Max(item_unit_price); | SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area = 'Literacy & Language' ORDER BY T1.item_unit_price DESC LIMIT 1 |
donor | What is the average donation amount to a project created by a teacher working in a school in Brooklyn? | school in Brooklyn refers to school_city = 'Brooklyn'; Average = AVG(donation_total); | SELECT SUM(T2.donation_total) / COUNT(donationid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn' |
donor | To which city did donor “22cbc920c9b5fa08dfb331422f5926b5” donate? | donor “22cbc920c9b5fa08dfb331422f5926b5” refers to donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'; city refers to donor_city | SELECT DISTINCT donor_city FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5' |
donor | Is donor “22cbc920c9b5fa08dfb331422f5926b5” a teacher? | donor “22cbc920c9b5fa08dfb331422f5926b5” refers to donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'; is a teacher refers to is_teacher_acct; | SELECT DISTINCT is_teacher_acct FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5' |
donor | Have the teacher "42d43fa6f37314365d08692e08680973" acquired P.h.D or doctor degree? | teacher "42d43fa6f37314365d08692e08680973" refers to teacher_acctid = '42d43fa6f37314365d08692e08680973'; | SELECT CASE WHEN teacher_prefix = 'Dr.' THEN 'Yes' ELSE 'NO' END FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973' |
donor | Is teacher "42d43fa6f37314365d08692e08680973" a New York teacher? | teacher "42d43fa6f37314365d08692e08680973"refers to teacher_acctid = '42d43fa6f37314365d08692e08680973'; | SELECT teacher_ny_teaching_fellow end FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973' |
donor | Please list the titles of projects by which schools in Abington was donated. | Abington is school_city; | SELECT T2.title FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city LIKE 'Abington' |
donor | Please list the resource names of project that teacher "822b7b8768c17456fdce78b65abcc18e" created. | teacher "822b7b8768c17456fdce78b65abcc18e" refers to teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'; | SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e' |
donor | Among the schools' projects whose donation didn't use account credits redemption,how many schools are public magnet schools? | donation didn't use account credits redemption refers to payment_included_acct_credit = 'f'; magnet school refers to school_magnet = 't'; | SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_magnet = 't' AND T2.payment_included_acct_credit = 'f' |
donor | Please provide the type of resource that donation "b39547f29dfc25fb13c6e9e8d940dc43" contain. | donation "b39547f29dfc25fb13c6e9e8d940dc43" refers to donationid = 'b39547f29dfc25fb13c6e9e8d940dc43'; type of resource refers to project_resource_type; | SELECT DISTINCT T1.project_resource_type 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 T3.donationid LIKE 'b39547f29dfc25fb13c6e9e8d940dc43' |
donor | Among public magnet schools,what percentage of schools that receive the donated resources as books? | magnet school refers to school_magnet = 't'; donated resources as books refers to project_resource_type = 'Books'; percentage = Divide(Count(projectid) where project_resource_type = 'Books', Count(projectid))*100 | SELECT CAST(SUM(CASE WHEN T1.project_resource_type = 'Books' 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 T2.school_magnet = 't' |
donor | In the schools donated by the project of the resources provided by ABC School Supply, how many schools are public magnet schools? | ABC School Supply is vendor_name; public magnet school refers to school_magnet = 't'; | SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_magnet = 't' AND T1.vendor_name = 'ABC School Supply' |
donor | Among the schools donated by donor "000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest? | donor "000eebf28658900e63b538cf8a73afbd" refers to donor_acctid = '000eebf28658900e63b538cf8a73afbd'; highest poverty level refers to poverty_level = 'highest poverty'; | SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.poverty_level = 'highest poverty' AND T2.donor_acctid = '000eebf28658900e63b538cf8a73afbd' |
donor | What is the short description of the project that gives donation to school “301c9bf0a45d159d162b65a93fddd74e”? | school “301c9bf0a45d159d162b65a93fddd74e" refers to schoolid = '301c9bf0a45d159d162b65a93fddd74e'; | SELECT T2.short_description FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = '301c9bf0a45d159d162b65a93fddd74e' |
donor | Which city does the school that project "iMath" donated to in? | iMath is the title; city refers to school_city; | SELECT T1.school_city FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'iMath' |
donor | How to pay the donation of the project that teacher "822b7b8768c17456fdce78b65abcc18e" created? | teacher "822b7b8768c17456fdce78b65abcc18e" refers to teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'; how to pay the donation refers to payment_method; | SELECT T2.payment_method FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e' |
donor | How much did the project that teacher "822b7b8768c17456fdce78b65abcc18e" created donate? | teacher "822b7b8768c17456fdce78b65abcc18e" refers to teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'; donated refers to donation_total; | SELECT T2.donation_total FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e' |
donor | Is the donor who donated to school "d4af834b1d3fc8061e1ee1b3f1a77b85" a teacher? | school "d4af834b1d3fc8061e1ee1b3f1a77b85" refers to schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85'; donor is a teacher refers to is_teacher_acct = 't'; | SELECT T2.is_teacher_acct FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85' |
donor | Among the schools whose donators are teachers, what is the percentage of schools that are in Brooklyn? | donors are teachers refers to is_teacher_acct = 't'; Brooklyn is school_city; percentage = Divide(Count(school_city-'Brooklyn'),Count(school_city))*100 | SELECT CAST(SUM(CASE WHEN T1.school_city LIKE 'Brooklyn' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.teacher_acctid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.is_teacher_acct = 't' |
donor | Among the projects whose donators are teachers, what is the percentage of projects that affected more than 30 students? | donors are teachers refers to is_teacher_acct = 't'; affect more than 30 students refers to students_reached>30; Percentage = Divide(Count(students_reached>30), Count(students_reached))*100 | SELECT CAST(SUM(CASE WHEN T1.students_reached > 30 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.is_teacher_acct = 't' |
donor | How many schools which have suburban metro are there in Bethlehem? | Bethlehem is school_city; suburban metro refers to school_metro = 'suburban'; | SELECT COUNT(schoolid) FROM projects WHERE school_city = 'Bethlehem' AND school_metro = 'suburban' |
donor | What is the number of the year round school in Los Angeles? | Los Angeles is school_city; year-round school refers to school_year_round = 't'; | SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't' |
donor | State the number of public magnet schools in New York Manhattan. | public magnet school refers to school_magnet = 't'; in New York Manhattan refers to school_country = 'New York(Manhattan)'; | SELECT COUNT(schoolid) FROM projects WHERE school_county = 'New York (Manhattan)' AND school_magnet = 't' |
donor | How many teachers in Twin Falls have Math & Science as their primary focus area? | Twin Falls is school_country; 'Math & Science' is primary_focus_area; | SELECT COUNT(teacher_acctid) FROM projects WHERE school_county = 'Twin Falls' AND primary_focus_area = 'Math & Science' |
donor | How many teachers that have Literature & Writing as their primary focus subject use 'Mr' as their teacher prefix? | Literature & Writing' is primary_focus_subject; use 'Mr' as their teacher prefix refers to teacher_prefix = 'Mr'; | SELECT COUNT(teacher_acctid) FROM projects WHERE teacher_prefix = 'Mr.' AND primary_focus_subject = 'Literature & Writing' |
donor | What is the total number of projects that was created by the teachers that teach 3-5 grades in Boston Public School District? | teach 3-5 grades refers to grade_level = 'Grades 3-5'; 'Boston Public School District' is school_district; | SELECT COUNT(projectid) FROM projects WHERE school_district = 'Boston Public School District' AND grade_level = 'Grades 3-5' |
donor | For the teacher who wrote the project 'ABC Read', which city was he/she in? | ABC Read' is the title; city refers to school_city | SELECT T2.school_city FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'ABC Read' |
donor | What is the teacher prefix for the teacher who wrote the project 'Creating Memories and Inspiring Dreams'? | Creating Memories and Inspiring Dreams is title; | 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%' |
donor | Is the donor of the project 'Calculate, Financial Security For Tomorrow Starts Today! ' a teacher? | Calculate, Financial Security For Tomorrow Starts Today! ' is title; donor is a teacher refers to is_teacher_acct = 't' | 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! ' |
donor | 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.' | |
donor | How many number of donations did the project 'A Rug For Reaching Readers' get? | A Rug For Reaching Readers'is the title; | 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' |
donor | What is the total donation amount for the project 'Engaging Young Readers with a Leveled Classroom Library'? | Engaging Young Readers with a Leveled Classroom Library' is the title; total donation amount = Add(donation_to_project, donation_optional_support) | 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 ' |
donor | What was the donation optional support amount for the project 'Armenian Genocide'? | Armenian Genocide' is the title; | 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' |
donor | State the short description for the project which got the donation at 14:44:29 on 2012/9/6. | donation at 14:44:29 on 2012/9/6 refers to donation_timestamp = '2012/9/6 14:44:29'; | 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' |
donor | Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation? | I Can't See It...Can You Help Me???' is the title; | 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???' |
donor | What is the teacher's account ID for the project that got the donation at 11:38:43 on 2008/7/29 ? | donation at 11:38:43 on 2008/7/29 refers to donation_timestamp = '2008/7/29 11:38:43'; teacher's account ID refers to teacher_acctid; | 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' |
donor | Show the school id for the project 'Virtual Aquarium Needs Help!'. | Virtual Aquarium Needs Help!' is the title; | 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!' |
donor | What was the title for the project which got the biggest donation? | biggest donation refers to donation_total = 'max'; | 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 ) |
donor | For the donation of the project 'Awesome Audiobooks Make Avid Readers', what was the percentage of the tip in the total amount? | Awesome Audiobooks Make Avid Readers' is the title; percentage = Divie(donation_optional_support, donation_total)*100; | 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' |
donor | For the all donations to the project 'Bringing Drama to Life', what is the percentage of the donation is paid by credit card? | Bringing Drama to Life' is the title; Percentage = Divide(Count(payment_method = 'creditcard'), Count(projectid))*100; | 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' |
donor | What is the short description for the title Future Einsteins Of America? | SELECT short_description FROM essays WHERE title = 'Future Einsteins Of America' | |
donor | Write down the need statement of Family History Project. | Family History Project refer to title, need statement refer to need_statement | SELECT need_statement FROM essays WHERE title = 'Family History Project' |
donor | How many suburban metros are there in Livingston Parish School District? | suburban metros refer to metro = 'suburban'; Livingston Parish School District refer to school_district | SELECT COUNT(projectid) FROM projects WHERE school_district = 'Livingston Parish School Dist' AND school_metro = 'suburban' |
donor | Name the vendors that sell the item Classroom Keepers Management Center. | vendor refer to vendor_name; Classroom Keepers Management Center refer to item_name | SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center' |
donor | List the resource types available at Sax Arts & Crafts. | Sax Arts & Crafts refer to vendor_name; resource type available refer to project_resource_type
| SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Sax Arts & Crafts' |
donor | Which school county in the state of New York has a high number of low poverty levels? | New York refer to school_state = NY; highest number of low poverty level refer to MAX(poverty level = ’low poverty’) | 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 |
donor | Which school district was Future Einsteins Of America project located at? | Future Einsteins of America refer to title | 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' |
donor | What payment method was used for Needed Resource Materials For My Students? | Needed Resource Materials For My Students refer to title | 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' |
donor | How many donations were paid via credit card to Memphis City School District? | paid via credit card refer to payment method = creditcard; Memphis City School District refer to 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' |
donor | List the school districts that have bought resources from Barnes and Noble. | Barnes and Noble refer to vendor_name | 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' |
donor | Give the coordinates of the buyer of R & A Plant Genetics from Benchmark Education. | coordinates refer to (school_latitude, school_longitude); R & A Plant Genetics refer to item_name; Benchmark Education refer to vendor_name | 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' |
donor | Which payment method is most comonly used by the schools in the state of Georgia for the payment of donations? | Georgia refer to school_state = 'GA'
| 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 |
donor | What are the coordinates of the school where project 'Look, Look, We Need a Nook!' Was donated to and what resource type is it? | Coordinates of the school refer to school_latitude, school_longitude); Look, Look, We Need a Nook! Refer to title; | 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!' |
donor | Write the messages of those who donated to the Newark School District in the coordinates of 40.735332, -74.196014. | message refer to donation_message; Newark School District refer to school_district; 40.735332, -74.196014 refer to (school latitude, school_longitude) | 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' |
donor | What date did the project with he 'Lets Share Ideas essay' went live? | date refer to date_posted; Lets Share Ideas refer to title | 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' |
donor | Write the message of the donor of the project with the title of Lets Share Ideas who paid with a credit card. | message of the donor refer to donation_message; Lets Share Ideas refer to title; paid with a credit card refer to payment_method | 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' |
donor | Which resource type is commonly bought by the Los Angeles Unified School District? | resource type refer to project_resource_type; most commonly bought refer to COUNT(project_resource_type where school_district = ’Los Angeles Unif Sch Dist’); Los Angeles Unified School District refer to school_district = ’Los Angeles Unif Sch Dist’ | 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 |
donor | Which cities in the Los Angeles Unified School District has bought supplies from Quill.com? | cities refer to school_city; Los Angeles Unified School District refer to school_district = 'Los Angeles Unified School District'; supplies refer to project_resource_type; Quill.com refer to vendor_name | 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' |
donor | 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. | ABC School Supply refer to vendor_name; listed type as Other refer to project_resource_type = 'Other'; coordinates refer to coordinates(school_latitude, school_longitude); total price of items refer to SUM(MULTIPLY(item_unit_price, item_quantity where vendor_name = ’ABC School Supply’))
| 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' |
donor | 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. | paypal refer to payment method; Lets Share Ideas refer to title; city refer to school_city; total amount donated refer to SUM(donation_total of paypal where payment_method = ’paypal’) | 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' |
donor | How many donors who donated to the city of Pocatello are not teachers? | city of Pocatello refers to donor_city = 'Pocatello'; not teachers refers to is_teacher_acct = 'f' | SELECT COUNT(donationid) FROM donations WHERE donor_city = 'Pocatello' AND is_teacher_acct = 'f' |
donor | How many schools in Suffolk County have Ph.D. teachers? | Suffolk County refers to School_county = 'Suffolk'; Ph.D. teachers refers to Teacher_prefix = 'Dr.' | SELECT COUNT(schoolid) FROM projects WHERE teacher_prefix = 'Dr.' AND school_county = 'Suffolk' |
donor | What is the sum of the total donated amounts paid through Amazon? | paid through Amazon refers to payment_method = 'Amazon'; sum of the total donated amounts refers to SUM(donation_to_project,donation_optional_support) | SELECT SUM(donation_to_project) + SUM(donation_optional_support) FROM donations WHERE payment_method = 'amazon' |
donor | How many donations of more than $100 were made for an honoree? | an honoree refers to for_honoree = 't'; more than $100 refers to dollar_amount = '100_and_up' | SELECT COUNT(donationid) FROM donations WHERE dollar_amount = '100_and_up' AND for_honoree = 't' |
donor | How many resources with a unit price less than 15 are not technology type? List them by vendor id | unit price less than 15 refers to item_unit_price< = 15; are not technology type refers to project_resource_type = 'technology' | SELECT vendorid FROM resources WHERE project_resource_type = 'Technology' AND item_unit_price <= 15 |
donor | On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com? | ordered between 5 to 10 items refers to item_quantity between 5 and 10; are from Quill.com refers to vendor_name = 'Quill.com' | SELECT COUNT(projectid) FROM resources WHERE vendor_name = 'Quill.com' AND item_quantity BETWEEN 5 AND 10 |
donor | List by school id projects from schools located in the Union Pub School District I-9 that have a New York teaching fellow | located in the Union Pub School District I-9 refers to school_district = 'Union Pub School District I-9'; New York teaching fellow refers to teacher_ny_teaching_fellow = 't' | SELECT schoolid FROM projects WHERE school_district = 'Union Pub School District I-9' AND teacher_ny_teaching_fellow = 't' |
donor | In which cities are Los Angeles County Suburban Metro Schools located? | Los Angeles County refers to school_county = 'Los Angeles' | SELECT school_city FROM projects WHERE school_metro = 'suburban' AND school_county = 'Los Angeles' |
donor | What are the vendors of the book-type projects? List them with the project ID. | book-type projects refers to project_resource_type = 'Books' | SELECT DISTINCT vendorid, projectid FROM resources WHERE project_resource_type = 'Books' |
donor | What percentage of projects that have not received a cash donation have received a portion of a donation included corporate sponsored giftcard? | have not received a cash donation refers to payment_method = 'no_cash_received'; received a portion of a donation included corporate sponsored giftcard payment_included_campaign_gift_card = 't'; percentage refers to DIVIDE(payment_included_campaign_gift_card = 't',payment_included_campaign_gift_card)*100 | 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' |
donor | What percentage of projects in the City of Santa Barbara are in suburban metro? | City of Santa Barbara refers to school_city = 'Santa Barbara'; percentage refers to DIVIDE(school_metro = 'suburban'; school_metro)*100 | 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' |
donor | What is the percentage of payment methods of donations made in March 2013? | made in March 2013 refers to substr(donation_timestamp,1,7) = '2013-03'; percentage refers to DIVIDE(SUM(payment_method made in March 2013), SUM(payment_method))*100 | SELECT payment_method , CAST(COUNT(donationid) AS REAL) * 100 / 51090 FROM donations WHERE donation_timestamp LIKE '2013-03%' GROUP BY payment_method |
donor | What is the average unit price of AKJ Books items? | AKJ Books items refers to vendor_name = 'AKJ Books'; average unit price refers to DIVIDE(sum(item_unit_price),count(resourceid)) | SELECT SUM(item_unit_price) / SUM(item_quantity) FROM resources WHERE vendor_name = 'AKJ Books' |
donor | 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? | in Brooklyn refers to school_city = 'Brooklyn'; urban metro refers to school_metro = 'urban'; donations for an honoree refers to for_honoree = 't'; requested TT992 - Refill Pack for Safety Name Tags refers to item_name = 'TT992 - Refill Pack for Safety Name Tags' | 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' |
donor | How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card? | highest level of poverty refers to poverty_level = 'highest'; received a portion of a donation included corporate sponsored gift card refers to payment_included_campaign_gift_card = 't' | 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' |
donor | In which city is there a greater number of schools that have received donations of less than 10 dollars? | received donations of less than 10 dollars refers to dollar_amount = 'under_10'; city refers to school_city
| 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 |
donor | What is the project title of the school located at latitude 42003718 and longitude -87668289? | latitude 42003718 refers to school_latitude = 42003718; longitude -87668289 refers to school_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 |
donor | Find out if the project with the title Team More Books! has a New York teaching fellow. | title Team More Books! Refers to title = 'Team More Books!'; as a New York teaching fellow refers to teacher_ny_teaching_fellow = 't' | 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!' |
donor | What is the name of the vendors that serve resources to schools whose primary focus area is Literature? | primary focus area is Literature refers to primary_focus_area = '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 |
donor | What is the name of the vendors serving material for projects for grades 9-12? | for grades 9-12 refers to grade_level = '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' |
donor | How many teachers have made some type of donation for projects in Chicago? | in Chicago refers to school_city = 'Chicago'; teachers refers to is_teacher_acct = 't' | 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' |
donor | How many Rock Hill City School projects have teacher donors? | Rock Hill City School refers to school_city = 'Rock Hill'; teacher donors refers to is_teacher_acct = 't' | 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' |
donor | What is the total sum of the donations paid with an optional support in projects that reach more than 300 students? | with an optional support refers to donation_included_optional_support = 't'; reach more than 300 students refers to students_reached>300 | 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' |
donor | How many total items were requested for the Onslow Co School District urban metro school projects? | Onslow Co School District refers to school_district = 'Onslow Co School District'; | 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' |
donor | What is the average total donations received by Fresno County colleges? | Fresno County colleges refers to school_county = 'Fresno'; average refers to DIVIDE(sum(donation_optional_support,donation_to_project),sum(donation_total)) | 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' |
donor | In what percentage of counties has the ABC Read project been launched? | ABC Read project been launched refers to title = 'ABC Read'; percentage refers to DIVIDE(count(case when title = 'ABC Read' then school_county else null end),count(school_county))*100 | 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 |
donor | What is the average amount of resources from projects that have received donations per honoree? | donations per honoree refers to for_honoree = 't'; average refers to DIVIDE(sum(item_quantity), count(donationid)) | SELECT AVG(T1.item_quantity) FROM resources AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.for_honoree = 't' |
donor | When did the project "Photojournalists Want to Exhibit Their Best Works" go live? | project "Photojournalists Want to Exhibit Their Best Works" refers to title = 'Photojournalists Want to Exhibit Their Best Works'; when project go live refers to datePosted | 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' |
donor | Which item provided for projects with Mathematics as a primary subject is the most expensive? | Mathematics as a primary subject refers to primary_focus_subject = 'Mathematics'; most expensive refers to max(item_unit_price) | 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 |
donor | Where is the school that needs a "Viewscreen LCD from Texas Instruments, TI-84 Plus"? Provide the latitude and longitude of that school. | needs a "Viewscreen LCD from Texas Instruments, TI-84 Plus" refers to item_name = 'Viewscreen LCD from Texas Instruments, TI-84 Plus'; where is the school refers to school_city; latitude refers to school_latitude; longtitude refers to school_longitude | 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' |
donor | How many donations does the project "Look, Look, We Need a Nook!" have? | project "Look, Look, We Need a Nook!" refers to title = 'Look, Look, We Need a Nook!' | 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!' |
donor | List the poverty level of all the schools that received donations with the zip code "7079". | zip code "7079" refers to donor_zip = '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 |
donor | What is the name of the vendor that the project "Bloody Times" uses for their resources? | project "Bloody Times" refers to title = 'Bloody Times' | 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' |
donor | List all the items from "Sax Arts & Crafts" and the zip code of the schools that received them. | from "Sax Arts & Crafts" refers to vendor_name = 'Sax Arts & Crafts'; zip code of the schools refers school_zip | 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' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.