problem
stringlengths
121
422
db_id
stringclasses
69 values
solution
stringlengths
23
804
Write SQL query to solve given problem: For project titled 'Toot Your Flute!', what is the main subject of the project materials intended for? Name the other projects with the similar focus.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.primary_focus_subject FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Toot Your Flute!'
Write SQL query to solve given problem: Name the project titles created by teacher who acquired a doctor degree.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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.'
Write SQL query to solve given problem: What is the project in which 320 students will be impacted if the project is funded? Name the project and state the project cost.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title, T2.total_price_excluding_optional_support FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.students_reached = 320
Write SQL query to solve given problem: For all donors from Texas City, list their donation message and name of the project they donated to.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.donation_message, T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donor_city = 'Texas City'
Write SQL query to solve given problem: Name the vendors who provide resources for project 'Lights, Camera, Action!'. List all the item names and unit price for each.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.vendor_name, T1.item_name, T1.item_unit_price FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN essays AS T3 ON T2.projectid = T3.projectid WHERE T3.title = 'Lights, Camera, Action!'
Write SQL query to solve given problem: How much donations have been collected for project 'Whistle While We Work!'?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT SUM(T2.donation_to_project) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Whistle While We Work!'
Write SQL query to solve given problem: Name and describe all projects created by New York teachers.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title, T1.short_description FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_ny_teaching_fellow = 't'
Write SQL query to solve given problem: If funded, which are the projects that could impact at least 600 students for a school with moderate level of poverty? Name the projects and state the project cost.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT T2.title, T1.total_price_excluding_optional_support FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.students_reached >= 600 AND T1.poverty_level LIKE 'moderate poverty'
Write SQL query to solve given problem: From the total amount of donation to projects, what is the percentage of the amount is for school projects located in the rural area?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT CAST(SUM(CASE WHEN T2.school_metro = 'rural' THEN T1.donation_to_project ELSE 0 END) AS REAL) * 100 / SUM(donation_to_project) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid
Write SQL query to solve given problem: Name the project that costs the most. How much has been collected from donation and what is the percentage amount still lacking?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title, SUM(T3.donation_to_project), CAST((T2.total_price_excluding_optional_support - SUM(T3.donation_to_project)) AS REAL) * 100 / SUM(T3.donation_to_project) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T2.total_price_excluding_optional_support DESC LIMIT 1
Write SQL query to solve given problem: How many schools in the West New York School District have the highest poverty level?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(poverty_level) FROM projects WHERE school_district = 'West New York School District' AND poverty_level = 'highest poverty'
Write SQL query to solve given problem: How many donations from teachers were done in the state of Colorado?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(donationid) FROM donations WHERE is_teacher_acct = 't' AND donor_state = 'CO'
Write SQL query to solve given problem: Which project have the highest total price including optional support? Indicate the project id.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT projectid FROM projects ORDER BY total_price_including_optional_support DESC LIMIT 1
Write SQL query to solve given problem: Which state have the highest number of PayPal donations for an honoree whose portion of a donation included corporate sponsored giftcard?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT donor_state FROM donations WHERE for_honoree = 't' AND payment_included_campaign_gift_card = 't' AND payment_method = 'paypal' AND donor_state = ( SELECT donor_state FROM donations GROUP BY donor_state ORDER BY SUM(donation_total) DESC LIMIT 1 )
Write SQL query to solve given problem: Who is the largest donor by amount? Give the donation id and the total amount of the donation.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT donationid, donation_total FROM donations ORDER BY donation_total DESC LIMIT 1
Write SQL query to solve given problem: What is the id of the project that has the highest optional tip? Indicate the names of the resources that were requested.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.projectid, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T2.total_price_including_optional_support - T2.total_price_excluding_optional_support DESC LIMIT 1
Write SQL query to solve given problem: What were the resources that were requested by the teacher for project "d6ef27c07c30c81f0c16c32b6acfa2ff"? Indicate the quantities as well and whether or not the teacher acquired P.h.D or doctor degree.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT T1.item_name, T1.item_quantity, T2.teacher_prefix FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.projectid = 'd6ef27c07c30c81f0c16c32b6acfa2ff'
Write SQL query to solve given problem: What is the total price including optional support received by the teacher who posted the essay titled "Recording Rockin' Readers"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT SUM(T1.total_price_including_optional_support) FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title = 'Recording Rockin'' Readers'
Write SQL query to solve given problem: What is the latitude and longitude of the school where the teacher who wrote "Smile for the Camera!!!" teaches?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.school_latitude, T1.school_longitude FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title = 'Smile for the Camera!!!'
Write SQL query to solve given problem: What is the total amount of all the donations made by the donor who made the highest donation in a single amount? Indicate the essay title to where he/she made his/her biggest donation.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.donation_total, 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 )
Write SQL query to solve given problem: What are the favorite project types of each of the top 10 donors?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT project_resource_type FROM ( SELECT T1.donor_acctid, T3.project_resource_type FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN resources AS T3 ON T2.projectid = T3.projectid ORDER BY T1.donation_total DESC LIMIT 10 ) GROUP BY project_resource_type ORDER BY COUNT(project_resource_type) DESC LIMIT 1
Write SQL query to solve given problem: When was the first ever project went live on the site and what were the names of the resources being requested? If there are multiple projects that have the same date, indicate each of them and their items.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.date_posted, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.date_posted = ( SELECT date_posted FROM projects ORDER BY date_posted ASC LIMIT 1 )
Write SQL query to solve given problem: What is the name of the vendor that supplies resources to the project "iMath"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN essays AS T3 ON T1.projectid = T3.projectid WHERE T3.title = 'iMath'
Write SQL query to solve given problem: When was the project with the highest quantity went live on the site? Indicate the grade level for which the project materials are intended.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.date_posted, T2.grade_level FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T1.item_quantity DESC LIMIT 1
Write SQL query to solve given problem: What is the average amount of donations by people who donated in the project "Recording Rockin' Readers". Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT AVG(T3.donation_to_project) 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 = 'Recording Rockin'' Readers'
Write SQL query to solve given problem: What is the essay title of the project that have the highest total price excluding optional support and who is the biggest donor? Identify the donor and calculate how many percent did he/she donated in the project.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title, T3.donor_acctid, CAST(T3.donation_to_project AS REAL) / T2.total_price_excluding_optional_support FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T3.donation_to_project DESC LIMIT 1
Write SQL query to solve given problem: From which state do the 5 biggest donor, who gave the highest cost of optional support, come from? List their donor_acctid and calculate for their average cost of optional support for every donations they make and identtify the project's type of resource to which they gave the hightest optional support.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.school_state, T2.donor_acctid, AVG(T2.donation_optional_support), T1.resource_type FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid ORDER BY T2.donation_optional_support DESC LIMIT 5
Write SQL query to solve given problem: Which project in Brooklyn that have the highest request of resources? State the the project ID including all of the name of item requested.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.projectid, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_city LIKE 'Brooklyn' GROUP BY T1.item_name ORDER BY COUNT(T1.item_name) DESC LIMIT 1
Write SQL query to solve given problem: How many schools in urban area requested for books resources?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.resource_type = 'Books' AND T2.school_metro = 'urban'
Write SQL query to solve given problem: Which school requested the highest amount of resources from Amazon? State the school's ID.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.schoolid FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name LIKE 'Amazon' GROUP BY T2.schoolid ORDER BY COUNT(T1.vendor_name) DESC LIMIT 1
Write SQL query to solve given problem: How many donors in Los Angeles donated to school in another city?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(T2.schoolid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.donor_city = 'Los Angeles' AND T2.school_city NOT LIKE 'Los Angeles'
Write SQL query to solve given problem: What is the prefix for the teacher who handled the 'Reading About Other Cultures' project?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.teacher_prefix FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Reading About Other Cultures'
Write SQL query to solve given problem: How many students will be impacted for the Fit Firsties! Project?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.students_reached FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Fit Firsties!'
Write SQL query to solve given problem: List the title of all projects located in Chicago along with the ID of the donor.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title, T3.donor_acctid 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 T2.school_city LIKE 'Chicago'
Write SQL query to solve given problem: Which projects created by teachers with Doctor Degree where the project have more than 300 students involved. List down the title of the project.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_prefix LIKE 'Dr.' AND T2.students_reached > 300
Write SQL query to solve given problem: State the name of vendor that supplies book resources to all school with literacy subject as their primary focus.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject LIKE 'Literacy'
Write SQL query to solve given problem: What is the title of project that have the most expensive funds?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.projectid = ( SELECT projectid FROM resources ORDER BY item_unit_price * item_quantity DESC LIMIT 1 )
Write SQL query to solve given problem: Among all the donors from New York, how many of them are teachers?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(donationid) FROM donations WHERE is_teacher_acct = 't' AND donor_city = 'New York'
Write SQL query to solve given problem: How many donors from New Jersey have made a donation for an honoree?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(donationid) FROM donations WHERE for_honoree = 't' AND donor_state = 'NJ'
Write SQL query to solve given problem: What is the donation message for donation ID a84dace1ff716f6f0c7af8ef9090a5d5?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT donation_message FROM donations WHERE donationid = 'a84dace1ff716f6f0c7af8ef9090a5d5'
Write SQL query to solve given problem: Please list the types of resources that the vendor Lakeshore Learning Materials has provided for the projects.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Lakeshore Learning Materials'
Write SQL query to solve given problem: What is the name of the item that is provided in the biggest amount by the vendor Lakeshore Learning Materials?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT item_name FROM resources WHERE vendor_name = 'Lakeshore Learning Materials' ORDER BY item_quantity DESC LIMIT 1
Write SQL query to solve given problem: Among the projects created by a teacher from New York, how many of them have a donor from the same city?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_ny_teaching_fellow = 't' AND T2.donor_city = 'New York'
Write SQL query to solve given problem: How many projects have their resources provided by the vendor Lakeshore Learning Materials and are created by a teacher with a doctor degree?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(T1.projectid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Lakeshore Learning Materials' AND T2.teacher_prefix = 'Dr.'
Write SQL query to solve given problem: Please list the vendor providing resources for the projects of a school with the highest poverty level.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level = 'highest poverty'
Write SQL query to solve given problem: Of the projects whose resources are provided by the vendor Lakeshore Learning Materials, the school of which project has the highest cost of labor fulfillment? Please give its school ID.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.schoolid FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Lakeshore Learning Materials' ORDER BY T2.fulfillment_labor_materials DESC LIMIT 1
Write SQL query to solve given problem: Who is the vendor of the resources needed by the project that had the highest cost of optional tip?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T2.total_price_including_optional_support - T2.total_price_including_optional_support DESC LIMIT 1
Write SQL query to solve given problem: What is the total donated amount for projects created by a teacher working in a school in Brooklyn?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT SUM(T2.donation_total) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn'
Write SQL query to solve given problem: Please list the donation messages of the donations for the projects created by a teacher working in a public magnet school in Brooklyn.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: What is the total donation amount made for projects whose main subject area are Literacy & Language?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Which donor has donated the most for a project whose main subject area is Literacy & Language? Please give his or her ID.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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
Write SQL query to solve given problem: What is the most requested item under the resource type "Supplies" for projects whose main subject area is Literacy & Language?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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
Write SQL query to solve given problem: Which item provided to a project whose main subject area is Literacy & Language has the highest unit price?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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
Write SQL query to solve given problem: What is the average donation amount to a project created by a teacher working in a school in Brooklyn?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: To which city did donor β€œ22cbc920c9b5fa08dfb331422f5926b5” donate?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT donor_city FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'
Write SQL query to solve given problem: Is donor β€œ22cbc920c9b5fa08dfb331422f5926b5” a teacher?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT is_teacher_acct FROM donations WHERE donor_acctid = '22cbc920c9b5fa08dfb331422f5926b5'
Write SQL query to solve given problem: Have the teacher "42d43fa6f37314365d08692e08680973" acquired P.h.D or doctor degree?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT CASE WHEN teacher_prefix = 'Dr.' THEN 'Yes' ELSE 'NO' END FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973'
Write SQL query to solve given problem: Is teacher "42d43fa6f37314365d08692e08680973" a New York teacher?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT teacher_ny_teaching_fellow end FROM projects WHERE teacher_acctid = '42d43fa6f37314365d08692e08680973'
Write SQL query to solve given problem: Please list the titles of projects by which schools in Abington was donated.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.title FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city LIKE 'Abington'
Write SQL query to solve given problem: Please list the resource names of project that teacher "822b7b8768c17456fdce78b65abcc18e" created.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'
Write SQL query to solve given problem: Among the schools' projects whose donation didn't use account credits redemption,how many schools are public magnet schools?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Please provide the type of resource that donation "b39547f29dfc25fb13c6e9e8d940dc43" contain.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Among public magnet schools,what percentage of schools that receive the donated resources as books?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: In the schools donated by the project of the resources provided by ABC School Supply, how many schools are public magnet schools?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Among the schools donated by donor "000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: What is the short description of the project that gives donation to school β€œ301c9bf0a45d159d162b65a93fddd74e”?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.short_description FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = '301c9bf0a45d159d162b65a93fddd74e'
Write SQL query to solve given problem: Which city does the school that project "iMath" donated to in?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T1.school_city FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'iMath'
Write SQL query to solve given problem: How to pay the donation of the project that teacher "822b7b8768c17456fdce78b65abcc18e" created?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.payment_method FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'
Write SQL query to solve given problem: How much did the project that teacher "822b7b8768c17456fdce78b65abcc18e" created donate?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.donation_total FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_acctid = '822b7b8768c17456fdce78b65abcc18e'
Write SQL query to solve given problem: Is the donor who donated to school "d4af834b1d3fc8061e1ee1b3f1a77b85" a teacher?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.is_teacher_acct FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85'
Write SQL query to solve given problem: Among the schools whose donators are teachers, what is the percentage of schools that are in Brooklyn?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Among the projects whose donators are teachers, what is the percentage of projects that affected more than 30 students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: How many schools which have suburban metro are there in Bethlehem?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(schoolid) FROM projects WHERE school_city = 'Bethlehem' AND school_metro = 'suburban'
Write SQL query to solve given problem: What is the number of the year round school in Los Angeles?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(school_year_round) FROM projects WHERE school_city = 'Los Angeles' AND school_year_round = 't'
Write SQL query to solve given problem: State the number of public magnet schools in New York Manhattan.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(schoolid) FROM projects WHERE school_county = 'New York (Manhattan)' AND school_magnet = 't'
Write SQL query to solve given problem: How many teachers in Twin Falls have Math & Science as their primary focus area?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(teacher_acctid) FROM projects WHERE school_county = 'Twin Falls' AND primary_focus_area = 'Math & Science'
Write SQL query to solve given problem: How many teachers that have Literature & Writing as their primary focus subject use 'Mr' as their teacher prefix?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(teacher_acctid) FROM projects WHERE teacher_prefix = 'Mr.' AND primary_focus_subject = 'Literature & Writing'
Write SQL query to solve given problem: What is the total number of projects that was created by the teachers that teach 3-5 grades in Boston Public School District?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(projectid) FROM projects WHERE school_district = 'Boston Public School District' AND grade_level = 'Grades 3-5'
Write SQL query to solve given problem: For the teacher who wrote the project 'ABC Read', which city was he/she in?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT T2.school_city FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'ABC Read'
Write SQL query to solve given problem: What is the teacher prefix for the teacher who wrote the project 'Creating Memories and Inspiring Dreams'?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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%'
Write SQL query to solve given problem: Is the donor of the project 'Calculate, Financial Security For Tomorrow Starts Today! ' a teacher?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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! '
Write SQL query to solve given problem: 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".. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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.'
Write SQL query to solve given problem: How many number of donations did the project 'A Rug For Reaching Readers' get?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: What is the total donation amount for the project 'Engaging Young Readers with a Leveled Classroom Library'?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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 '
Write SQL query to solve given problem: What was the donation optional support amount for the project 'Armenian Genocide'?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: State the short description for the project which got the donation at 14:44:29 on 2012/9/6.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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???'
Write SQL query to solve given problem: What is the teacher's account ID for the project that got the donation at 11:38:43 on 2008/7/29 ?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: Show the school id for the project 'Virtual Aquarium Needs Help!'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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!'
Write SQL query to solve given problem: What was the title for the project which got the biggest donation?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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 )
Write SQL query to solve given problem: For the donation of the project 'Awesome Audiobooks Make Avid Readers', what was the percentage of the tip in the total amount?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: For the all donations to the project 'Bringing Drama to Life', what is the percentage of the donation is paid by credit card?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'
Write SQL query to solve given problem: What is the short description for the title Future Einsteins Of America?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT short_description FROM essays WHERE title = 'Future Einsteins Of America'
Write SQL query to solve given problem: Write down the need statement of Family History Project.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT need_statement FROM essays WHERE title = 'Family History Project'
Write SQL query to solve given problem: How many suburban metros are there in Livingston Parish School District?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT COUNT(projectid) FROM projects WHERE school_district = 'Livingston Parish School Dist' AND school_metro = 'suburban'
Write SQL query to solve given problem: Name the vendors that sell the item Classroom Keepers Management Center.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center'
Write SQL query to solve given problem: List the resource types available at Sax Arts & Crafts.. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Sax Arts & Crafts'
Write SQL query to solve given problem: Which school county in the state of New York has a high number of low poverty levels?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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
Write SQL query to solve given problem: Which school district was Future Einsteins Of America project located at?. Keep the solution inside sql tag ```sql [SQL-Query] ```
donor
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'