db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
cars | select t1.model_year from production as t1 inner join country as t2 on t1.country = t2.origin where t2.country = 'europe' group by t1.model_year order by count(t1.model_year) desc limit 1 | Question: which year did europe produce the most cars? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data... | which year did europe produce the most cars? |
cars | select t2.price from data as t1 inner join price as t2 on t1.id = t2.id where t1.car_name = 'peugeot 505s turbo diesel' | Question: how much is the peugeot 505s turbo diesel? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.I... | how much is the peugeot 505s turbo diesel? |
cars | select t4.acceleration from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join data as t4 on t4.id = t1.id where t3.country = 'usa' order by t1.price asc limit 1 | Question: what is the miles per square hour of the cheapest car produced by the usa? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = ... | what is the miles per square hour of the cheapest car produced by the usa? |
cars | select t2.country, cast(count(t1.id) as real) / count(distinct t1.model_year) from production as t1 inner join country as t2 on t1.country = t2.origin group by t2.country order by count(t2.country) desc limit 1 | Question: which country produced the highest number of cars? calculate the annual average number of cars that the said country produced from the very start to the present. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_nam... | which country produced the highest number of cars? calculate the annual average number of cars that the said country produced from the very start to the present. |
cars | select cast(sum(case when t3.country = 'japan' then 1 else 0 end) as real) * 100 / count(*) from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t1.displacement / t1.cylinders > 30 | Question: what is the percentage of cars that was produced by japan among those that have a sweep volume of no less than 30? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joi... | what is the percentage of cars that was produced by japan among those that have a sweep volume of no less than 30? |
cars | select t1.car_name from data as t1 inner join production as t2 on t1.id = t2.id where t2.model_year = 1975 | Question: list the name of the cars with model year 1975. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = d... | list the name of the cars with model year 1975. |
cars | select avg(t1.price) from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t3.country = 'europe' | Question: calculate the average price of cars from europe. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = ... | calculate the average price of cars from europe. |
cars | select t2.price from data as t1 inner join price as t2 on t1.id = t2.id where t1.id = 15 | Question: what is the price of the car id 15? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID, prod... | what is the price of the car id 15? |
cars | select count(*) from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join data as t4 on t4.id = t1.id where t3.country = 'japan' and t4.weight < 3000 | Question: how many of the cars from japan weighed less than 3000? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, productio... | how many of the cars from japan weighed less than 3000? |
cars | select count(*) from data as t1 inner join production as t2 on t1.id = t2.id where t2.model_year = 1973 and t1.horsepower < 100 | Question: among the cars produced in year 1973, how many of the cars have horsepower less than 100? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, p... | among the cars produced in year 1973, how many of the cars have horsepower less than 100? |
cars | select t4.id from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join data as t4 on t4.id = t1.id where t3.country = 'japan' and t1.price > 3500 and t4.acceleration = 14 | Question: provide the id of cars from japan worth greater than 35000 and have an acceleration of 14. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, ... | provide the id of cars from japan worth greater than 35000 and have an acceleration of 14. |
cars | select t2.model_year from data as t1 inner join production as t2 on t1.id = t2.id order by t1.weight desc limit 1 | Question: give the model year of the heaviest car. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID,... | give the model year of the heaviest car. |
cars | select t1.horsepower, t2.model_year from data as t1 inner join production as t2 on t1.id = t2.id where t1.car_name = 'subaru dl' | Question: what is the horsepower and model year of the car named subaru dl? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID,... | what is the horsepower and model year of the car named subaru dl? |
cars | select t4.car_name from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join data as t4 on t4.id = t1.id where t3.country = 'japan' order by t1.price desc limit 1 | Question: among the cars originated from japan, what is the name of the car with the highest price? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, p... | among the cars originated from japan, what is the name of the car with the highest price? |
cars | select t1.car_name from data as t1 inner join price as t2 on t1.id = t2.id where t2.price = 20000 | Question: what are the names of the cars worth 20000? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.... | what are the names of the cars worth 20000? |
cars | select count(*) from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t3.country = 'usa' and t1.price > 40000 | Question: how many cars worth greater than 40000 were from the usa? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, product... | how many cars worth greater than 40000 were from the usa? |
cars | select distinct t1.price, t3.country from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join data as t4 on t4.id = t1.id where t4.car_name = 'ford maverick' | Question: provide the price and country origin of the car named ford maverick. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.... | provide the price and country origin of the car named ford maverick. |
cars | select t1.car_name from data as t1 inner join price as t2 on t1.id = t2.id where t2.price * 100 > ( select avg(price) * 85 from price ) | Question: list the car's name with a price worth greater than 85% of the average price of all cars. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, p... | list the car's name with a price worth greater than 85% of the average price of all cars. |
cars | select sum(case when t2.model_year = 1970 then 1 else 0 end) - sum(case when t2.model_year = 1976 then 1 else 0 end) from data as t1 inner join production as t2 on t1.id = t2.id where t1.horsepower = 130 | Question: calculate the difference between the number of cars that has a horsepower of 130 with the model year 1970 and model year 1976 | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, cou... | calculate the difference between the number of cars that has a horsepower of 130 with the model year 1970 and model year 1976 |
cars | select t1.id from production as t1 inner join country as t2 on t1.country = t2.origin where t2.country = 'japan' and t1.model_year = 1979 | Question: among the cars from asia, list the ids of cars that were introduced in 1979. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID ... | among the cars from asia, list the ids of cars that were introduced in 1979. |
cars | select t3.country from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country order by t1.mpg asc limit 1 | Question: which country produced the car with the lowest mileage per gallon? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID... | which country produced the car with the lowest mileage per gallon? |
cars | select t1.car_name, t1.model, t1.displacement / t1.cylinders, t2.model_year from data as t1 inner join production as t2 on t1.id = t2.id order by t1.weight desc limit 1 | Question: provide the name, model, sweep volume, and introduced year of the car with the best crash protection. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID =... | provide the name, model, sweep volume, and introduced year of the car with the best crash protection. |
cars | select t1.car_name, t1.horsepower from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t2.model_year = 1977 and t3.country = 'europe' | Question: among the cars introduced in 1977, provide the names and the horse powers of cars from europe. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.... | among the cars introduced in 1977, provide the names and the horse powers of cars from europe. |
cars | select t1.car_name, t1.model from data as t1 inner join price as t2 on t1.id = t2.id order by t2.price desc limit 1 | Question: provide the name and model of the car with the highest price. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, pro... | provide the name and model of the car with the highest price. |
cars | select t2.price from data as t1 inner join price as t2 on t1.id = t2.id where t1.car_name = 'chevrolet bel air' | Question: what is the price of a chevrolet bel air? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID... | what is the price of a chevrolet bel air? |
cars | select avg(t1.price) from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t3.country = 'japan' | Question: what is the average price per car produced in japan? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.I... | what is the average price per car produced in japan? |
cars | select t3.country from price as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country order by t1.price asc limit 1 | Question: which country produced the car with the lowest price? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.... | which country produced the car with the lowest price? |
cars | select t1.id, t1.car_name, t3.country from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t2.model_year = 1975 order by t1.cylinders desc limit 1 | Question: among the cars produced in 1975, provide ids, names, and producing countries of the cars with the maximum number of cylinders. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, co... | among the cars produced in 1975, provide ids, names, and producing countries of the cars with the maximum number of cylinders. |
cars | select t1.acceleration, t1.cylinders, t2.model_year from data as t1 inner join production as t2 on t1.id = t2.id inner join price as t3 on t3.id = t2.id order by t3.price asc limit 1 | Question: which car is the cheapest? provide its acceleration, number of cylinders, and producing year. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.I... | which car is the cheapest? provide its acceleration, number of cylinders, and producing year. |
cars | select t2.car_name, t1.price from price as t1 inner join data as t2 on t1.id = t2.id where t2.model = 82 and t2.mpg > 30 | Question: list the names and prices of the cars with model 82 and mileage per gallon of greater than 30. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.... | list the names and prices of the cars with model 82 and mileage per gallon of greater than 30. |
cars | select count(distinct t2.model_year) from data as t1 inner join production as t2 on t1.id = t2.id where t1.car_name = 'ford maverick' | Question: how many models of ford maverick were produced? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = d... | how many models of ford maverick were produced? |
cars | select cast(sum(case when t2.country = 'usa' then 1 else 0 end) as real) * 100 / count(*) from production as t1 inner join country as t2 on t1.country = t2.origin | Question: calculate the percentage of cars that belong to the usa. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, producti... | calculate the percentage of cars that belong to the usa. |
cars | select cast(count(t1.id) as real) / 9 from production as t1 inner join data as t2 on t2.id = t1.id where t1.model_year between 1971 and 1980 union all select distinct t2.car_name from production as t1 inner join data as t2 on t2.id = t1.id where t1.model_year between 1971 and 1980 and t2.weight < 1800 | Question: calculate the average production rate per year from 1971 to 1980. among them, name the cars with a weight of fewer than 1800 lbs. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year,... | calculate the average production rate per year from 1971 to 1980. among them, name the cars with a weight of fewer than 1800 lbs. |
cars | select avg(t2.price) from data as t1 inner join price as t2 on t1.id = t2.id where t1.model = 70 | Question: what is the average price of model 70 cars? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.... | what is the average price of model 70 cars? |
cars | select t2.price from data as t1 inner join price as t2 on t1.id = t2.id where t1.car_name = 'chevrolet vega 2300' | Question: what is the price of chevrolet vega 2300? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID... | what is the price of chevrolet vega 2300? |
cars | select t3.country from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t1.car_name = 'chevy c20' | Question: which country does chevy c20 come from? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID, ... | which country does chevy c20 come from? |
cars | select distinct t3.price from data as t1 inner join production as t2 on t1.id = t2.id inner join price as t3 on t3.id = t2.id where t1.car_name like 'ford%' and t2.model_year between 1970 and 1980 | Question: list the price of ford cars from model 1970 to 1980. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.I... | list the price of ford cars from model 1970 to 1980. |
cars | select t1.car_name from data as t1 inner join production as t2 on t1.id = t2.id where t2.model_year = '1975' order by t1.mpg desc limit 1 | Question: which is the most fuel efficient car in 1975? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = dat... | which is the most fuel efficient car in 1975? |
cars | select t1.car_name from data as t1 inner join price as t2 on t1.id = t2.id order by t1.mpg desc, t2.price desc limit 1 | Question: which car consumes fuel the most and has the highest price? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, produ... | which car consumes fuel the most and has the highest price? |
cars | select count(*) from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t3.country = 'usa' and t1.acceleration < 12 | Question: how many american cars have an acceleration time of less than 12 seconds? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = p... | how many american cars have an acceleration time of less than 12 seconds? |
cars | select count(*) from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t3.country = 'japan' and t1.weight > 2000 | Question: how many japanese cars weigh more than 2000 lbs? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = ... | how many japanese cars weigh more than 2000 lbs? |
cars | select t1.car_name from data as t1 inner join price as t2 on t1.id = t2.id order by t2.price desc limit 1 | Question: list the name of the most expensive car. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production.ID = data.ID,... | list the name of the most expensive car. |
cars | select t2.model_year from data as t1 inner join production as t2 on t1.id = t2.id where t1.car_name = 'buick skylark 320' | Question: what years did the buick skylark 320 get in production? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, productio... | what years did the buick skylark 320 get in production? |
cars | select t3.country from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country inner join price as t4 on t4.id = t1.id where t2.model_year = 1970 order by t4.price desc limit 1 | Question: which country produced the most expensive car in 1970? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, production... | which country produced the most expensive car in 1970? |
cars | select count(t2.model_year) from data as t1 inner join production as t2 on t1.id = t2.id where t1.horsepower > 200 and t2.model_year = 1975 | Question: how many cars with horsepower greater than 200 were produced in 1975? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price... | how many cars with horsepower greater than 200 were produced in 1975? |
cars | select cast(sum(case when t3.country = 'usa' then 1 else 0 end) as real) * 100 / count(*) from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country | Question: calculate the percentage of american cars among all cars. | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = price.ID, production.ID = price.ID, product... | calculate the percentage of american cars among all cars. |
cars | select avg(t1.weight) from data as t1 inner join production as t2 on t1.id = t2.id inner join country as t3 on t3.origin = t2.country where t2.model_year between 1975 and 1980 and t1.cylinders = 4 and t3.country = 'japan' | Question: what is the average weight of japanese cars with 4 cylinders that were produced from 1975 to 1980? | Tables: country -> origin, country. price -> ID, price. data -> ID, mpg, cylinders, displacement, horsepower, weight, acceleration, model, car_name. production -> ID, model_year, country. | Joins: data.ID = pr... | what is the average weight of japanese cars with 4 cylinders that were produced from 1975 to 1980? |
donor | select sum(donation_total) from donations where donation_timestamp like '2012%' | Question: what is the total amount of donations in 2012. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_metro, school_district... | what is the total amount of donations in 2012. |
donor | select donation_timestamp, donation_total from donations where donation_total = ( select donation_total from donations order by donation_total desc limit 1 ) | Question: when was the highest amount of donated? how much was the amount? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_metr... | when was the highest amount of donated? how much was the amount? |
donor | select sum(donation_total) from donations where donation_timestamp like '2011%' and via_giving_page = 't' and for_honoree = 't' | Question: calculate the total amount of donations made in 2011 for an honoree with payment via campaign page. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, sc... | calculate the total amount of donations made in 2011 for an honoree with payment via campaign page. |
donor | select donor_acctid, donation_optional_support / donation_total from donations where is_teacher_acct = 'f' | Question: for each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude,... | for each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support. |
donor | select t1.title from essays as t1 inner join projects as t2 on t1.projectid = t2.projectid where t2.primary_focus_subject = 'literacy' | Question: name all the project titles whereby project materials are intended mainly for literary. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, ... | name all the project titles whereby project materials are intended mainly for literary. |
donor | select t1.title from essays as t1 inner join projects as t2 on t1.projectid = t2.projectid where t2.poverty_level like 'highest%' | Question: name the project titles meant for school whereby 65% of the students are on reduced lunch. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_stat... | name the project titles meant for school whereby 65% of the students are on reduced lunch. |
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!' | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid,... | 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. |
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.' | Question: name the project titles created by teacher who acquired a doctor degree. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, sch... | name the project titles created by teacher who acquired a doctor degree. |
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 | Question: what is the project in which 320 students will be impacted if the project is funded? name the project and state the project cost. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, sch... | what is the project in which 320 students will be impacted if the project is funded? name the project and state the project cost. |
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' | Question: for all donors from texas city, list their donation message and name of the project they donated to. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, s... | for all donors from texas city, list their donation message and name of the project they donated to. |
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!' | Question: name the vendors who provide resources for project 'lights, camera, action!'. list all the item names and unit price for each. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school... | name the vendors who provide resources for project 'lights, camera, action!'. list all the item names and unit price for each. |
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!' | Question: how much donations have been collected for project 'whistle while we work!'? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip,... | how much donations have been collected for project 'whistle while we work!'? |
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' | Question: name and describe all projects created by new york teachers. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_metro, s... | name and describe all projects created by new york teachers. |
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' | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, ... | 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. |
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 | Question: from the total amount of donation to projects, what is the percentage of the amount is for school projects located in the rural area? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude,... | from the total amount of donation to projects, what is the percentage of the amount is for school projects located in the rural area? |
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... | Question: name the project that costs the most. how much has been collected from donation and what is the percentage amount still lacking? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, scho... | name the project that costs the most. how much has been collected from donation and what is the percentage amount still lacking? |
donor | select count(poverty_level) from projects where school_district = 'west new york school district' and poverty_level = 'highest poverty' | Question: how many schools in the west new york school district have the highest poverty level? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, sc... | how many schools in the west new york school district have the highest poverty level? |
donor | select count(donationid) from donations where is_teacher_acct = 't' and donor_state = 'co' | Question: how many donations from teachers were done in the state of colorado? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_... | how many donations from teachers were done in the state of colorado? |
donor | select projectid from projects order by total_price_including_optional_support desc limit 1 | Question: which project have the highest total price including optional support? indicate the project id. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school... | which project have the highest total price including optional support? indicate the project id. |
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 ) | Question: which state have the highest number of paypal donations for an honoree whose portion of a donation included corporate sponsored giftcard? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latit... | which state have the highest number of paypal donations for an honoree whose portion of a donation included corporate sponsored giftcard? |
donor | select donationid, donation_total from donations order by donation_total desc limit 1 | Question: who is the largest donor by amount? give the donation id and the total amount of the donation. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_... | who is the largest donor by amount? give the donation id and the total amount of the donation. |
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 | Question: what is the id of the project that has the highest optional tip? indicate the names of the resources that were requested. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_long... | what is the id of the project that has the highest optional tip? indicate the names of the resources that were requested. |
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' | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects ->... | 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. |
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' | Question: what is the total price including optional support received by the teacher who posted the essay titled 'recording rockin' readers'? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, s... | what is the total price including optional support received by the teacher who posted the essay titled 'recording rockin' readers'? |
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!!!' | Question: what is the latitude and longitude of the school where the teacher who wrote 'smile for the camera!!!' teaches? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, sch... | what is the latitude and longitude of the school where the teacher who wrote 'smile for the camera!!!' teaches? |
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 ) | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teach... | 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. |
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_re... | Question: what are the favorite project types of each of the top 10 donors? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_met... | what are the favorite project types of each of the top 10 donors? |
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 ) | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. project... | 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. |
donor | select distinct t1.vendor_name from resources as t1 inner join essays as t3 on t1.projectid = t3.projectid where t3.title = 'imath' | Question: what is the name of the vendor that supplies resources to the project 'imath'? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zi... | what is the name of the vendor that supplies resources to the project 'imath'? |
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 | Question: when was the project with the highest quantity went live on the site? indicate the grade level for which the project materials are intended. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_la... | when was the project with the highest quantity went live on the site? indicate the grade level for which the project materials are intended. |
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' | Question: what is the average amount of donations by people who donated in the project 'recording rockin' readers' | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_cit... | what is the average amount of donations by people who donated in the project 'recording rockin' readers' |
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 | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay.... | 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. |
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 | Question: 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. | Tab... | 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. |
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 | Question: which project in brooklyn that have the highest request of resources? state the the project id including all of the name of item requested. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_lat... | which project in brooklyn that have the highest request of resources? state the the project id including all of the name of item requested. |
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' | Question: how many schools in urban area requested for books resources? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_metro, ... | how many schools in urban area requested for books resources? |
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 | Question: which school requested the highest amount of resources from amazon? state the school's id. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_stat... | which school requested the highest amount of resources from amazon? state the school's id. |
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' | Question: how many donors in los angeles donated to school in another city? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_met... | how many donors in los angeles donated to school in another city? |
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' | Question: what is the prefix for the teacher who handled the 'reading about other cultures' project? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_stat... | what is the prefix for the teacher who handled the 'reading about other cultures' project? |
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!' | Question: how many students will be impacted for the fit firsties! project? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_met... | how many students will be impacted for the fit firsties! project? |
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' | Question: list the title of all projects located in chicago along with the id of the donor. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school... | list the title of all projects located in chicago along with the id of the donor. |
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 | Question: which projects created by teachers with doctor degree where the project have more than 300 students involved. list down the title of the project. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, scho... | which projects created by teachers with doctor degree where the project have more than 300 students involved. list down the title of the project. |
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' | Question: state the name of vendor that supplies book resources to all school with literacy subject as their primary focus. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, s... | state the name of vendor that supplies book resources to all school with literacy subject as their primary focus. |
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 ) | Question: what is the title of project that have the most expensive funds? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_metr... | what is the title of project that have the most expensive funds? |
donor | select count(donationid) from donations where is_teacher_acct = 't' and donor_city = 'new york' | Question: among all the donors from new york, how many of them are teachers? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_me... | among all the donors from new york, how many of them are teachers? |
donor | select count(donationid) from donations where for_honoree = 't' and donor_state = 'nj' | Question: how many donors from new jersey have made a donation for an honoree? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zip, school_... | how many donors from new jersey have made a donation for an honoree? |
donor | select donation_message from donations where donationid = 'a84dace1ff716f6f0c7af8ef9090a5d5' | Question: what is the donation message for donation id a84dace1ff716f6f0c7af8ef9090a5d5? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, school_state, school_zi... | what is the donation message for donation id a84dace1ff716f6f0c7af8ef9090a5d5? |
donor | select distinct project_resource_type from resources where vendor_name = 'lakeshore learning materials' | Question: please list the types of resources that the vendor lakeshore learning materials has provided for the projects. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, scho... | please list the types of resources that the vendor lakeshore learning materials has provided for the projects. |
donor | select item_name from resources where vendor_name = 'lakeshore learning materials' order by item_quantity desc limit 1 | Question: what is the name of the item that is provided in the biggest amount by the vendor lakeshore learning materials? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, sch... | what is the name of the item that is provided in the biggest amount by the vendor lakeshore learning materials? |
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' | Question: among the projects created by a teacher from new york, how many of them have a donor from the same city? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_cit... | among the projects created by a teacher from new york, how many of them have a donor from the same city? |
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.' | Question: how many projects have their resources provided by the vendor lakeshore learning materials and are created by a teacher with a doctor degree? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_l... | how many projects have their resources provided by the vendor lakeshore learning materials and are created by a teacher with a doctor degree? |
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' | Question: please list the vendor providing resources for the projects of a school with the highest poverty level. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city... | please list the vendor providing resources for the projects of a school with the highest poverty level. |
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 | Question: 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. | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teac... | 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. |
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 | Question: who is the vendor of the resources needed by the project that had the highest cost of optional tip? | Tables: essays -> projectid, teacher_acctid, title, short_description, need_statement, essay. projects -> projectid, teacher_acctid, schoolid, school_ncesid, school_latitude, school_longitude, school_city, sc... | who is the vendor of the resources needed by the project that had the highest cost of optional tip? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.