index
int32 0
1.03k
| db_id
stringclasses 20
values | question
stringlengths 18
174
| db_info
stringlengths 1
1.79k
| ground_truth
stringlengths 20
474
|
---|---|---|---|---|
200 |
flight_2
|
Return the name of the airport with code 'AKO'.
|
| airports: airportcode, airportname |
|
select airportname from airports where airportcode = 'AKO'
|
201 |
flight_2
|
What are airport names at City 'Aberdeen'?
|
| airports: city, airportname, airportcode, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights: destairport, sourceairport, airline, flightno |
|
select airportname from airports where city = 'Aberdeen'
|
202 |
flight_2
|
What are the names of airports in Aberdeen?
|
| airports: city, airportname | airlines: uid, airline, abbreviation, country | flights: airline, flightno, sourceairport, destairport | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airportname from airports where city = 'Aberdeen'
|
203 |
flight_2
|
How many flights depart from 'APG'?
|
| flights: sourceairport, flightno | airports: airportcode | airlines: uid | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights where sourceairport = 'APG'
|
204 |
flight_2
|
Count the number of flights departing from 'APG'.
|
| flights: sourceairport, flightno, airline | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights where sourceairport = 'APG'
|
205 |
flight_2
|
How many flights have destination ATO?
|
| flights: destairport, airline, flightno, sourceairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select count ( * ) from flights where destairport = 'ATO'
|
206 |
flight_2
|
Count the number of flights into ATO.
|
| flights: destairport, airline, flightno | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select count ( * ) from flights where destairport = 'ATO'
|
207 |
flight_2
|
How many flights depart from City Aberdeen?
|
| airports: city, airportcode, airportname, country, countryabbrev | flights: sourceairport, destairport, flightno, airline | airlines: uid, airline, abbreviation, country | flights.sourceairport = airports.airportcode | flights.destairport = airports.airportcode |
|
select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'
|
208 |
flight_2
|
Return the number of flights departing from Aberdeen.
|
| flights: sourceairport, flightno, airline, destairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select count ( * ) from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'
|
209 |
flight_2
|
How many flights arriving in Aberdeen city?
|
| airports: city, airportcode, airportname, country, countryabbrev | flights: destairport, flightno, airline, sourceairport | airlines: uid, airline, abbreviation, country |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'
|
210 |
flight_2
|
Return the number of flights arriving in Aberdeen.
|
| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'
|
211 |
flight_2
|
How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
|
| airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: sourceairport, destairport, flightno, airline | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'
|
212 |
flight_2
|
How many flights fly from Aberdeen to Ashley?
|
| flights: sourceairport, destairport, flightno | airports: city, airportcode | airlines: uid, airline, abbreviation, country |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airports on flights.sourceairport = airports.airportcode where airports.city = 'Ashley' and airports.city = 'Aberdeen'
|
213 |
flight_2
|
How many flights does airline 'JetBlue Airways' have?
|
| airlines: airline, uid, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'
|
214 |
flight_2
|
Give the number of Jetblue Airways flights.
|
| airlines: airline | flights: airline, flightno | airports: |
|
select count ( * ) from flights join airlines on flights.airline = airlines.uid where airlines.airline = 'JetBlue Airways'
|
215 |
flight_2
|
How many 'United Airlines' flights go to Airport 'ASY'?
|
| airlines: airline, uid | airports: airportcode, city | flights: airline, destairport | flights.sourceairport = airports.airportcode | flights.destairport = airports.airportcode |
|
select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'
|
216 |
flight_2
|
Count the number of United Airlines flights arriving in ASY Airport.
|
| flights: destairport, airline, flightno, sourceairport | airlines: uid, abbreviation, airline, country | airports: airportcode, city, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.destairport = 'ASY'
|
217 |
flight_2
|
How many 'United Airlines' flights depart from Airport 'AHD'?
|
| flights: airline, sourceairport, flightno, destairport | airlines: airline, uid, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'
|
218 |
flight_2
|
Return the number of United Airlines flights leaving from AHD Airport.
|
| flights: sourceairport, airline, destairport, flightno | airlines: airline, uid, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev |
|
select count ( * ) from airlines join flights on flights.airline = airlines.uid where airlines.airline = 'United Airlines' and flights.sourceairport = 'AHD'
|
219 |
flight_2
|
How many United Airlines flights go to City 'Aberdeen'?
|
| flights: airline, destairport, flightno, sourceairport | airlines: airline, uid, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'
|
220 |
flight_2
|
Count the number of United Airlines flights that arrive in Aberdeen.
|
| flights: destairport, airline, flightno, sourceairport | airlines: airline, uid, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode join airlines on airlines.uid = flights.airline where airports.city = 'Aberdeen' and airlines.airline = 'United Airlines'
|
221 |
flight_2
|
Which city has most number of arriving flights?
|
| flights: destairport, flightno | airports: airportcode, city | airlines: | flights.destairport = airports.airportcode |
|
select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1
|
222 |
flight_2
|
Which city has the most frequent destination airport?
|
| flights: destairport, airline, flightno | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airports.city from airports join flights on airports.airportcode = flights.destairport group by airports.city order by count ( * ) desc limit 1
|
223 |
flight_2
|
Which city has most number of departing flights?
|
| flights: sourceairport, airline, flightno, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1
|
224 |
flight_2
|
Which city is the most frequent source airport?
|
| flights: sourceairport, destairport, airline | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.sourceairport = airports.airportcode |
|
select airports.city from airports join flights on airports.airportcode = flights.sourceairport group by airports.city order by count ( * ) desc limit 1
|
225 |
flight_2
|
What is the code of airport that has the highest number of flights?
|
| airports: airportcode, city, airportname, country, countryabbrev | flights: destairport, sourceairport, flightno, airline | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1
|
226 |
flight_2
|
What is the airport code of the airport with the most flights?
|
| flights: destairport, sourceairport | airports: airportcode | airlines: uid | flights.destairport=airports.airportcode | flights.sourceairport=airports.airportcode |
|
select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) desc limit 1
|
227 |
flight_2
|
What is the code of airport that has fewest number of flights?
|
| flights: destairport, sourceairport, flightno, airline | airports: airportcode, airportname, city, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1
|
228 |
flight_2
|
Give the code of the airport with the least flights.
|
| flights: destairport, sourceairport, flightno | airports: airportcode |
|
select airports.airportcode from airports join flights on airports.airportcode = flights.destairport or airports.airportcode = flights.sourceairport group by airports.airportcode order by count ( * ) asc limit 1
|
229 |
flight_2
|
Which airline has most number of flights?
|
| flights: airline, flightno | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1
|
230 |
flight_2
|
What airline serves the most flights?
|
| airlines: airline, uid, country, abbreviation | airports: airportcode, city, airportname, country, countryabbrev | flights: airline, flightno, sourceairport, destairport | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) desc limit 1
|
231 |
flight_2
|
Find the abbreviation and country of the airline that has fewest number of flights?
|
| airlines: airline, abbreviation, country, uid | flights: airline, flightno, sourceairport, destairport | airports: airportcode, country, countryabbrev, city, airportname |
|
select airlines.abbreviation , airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1
|
232 |
flight_2
|
What is the abbreviation of the airilne has the fewest flights and what country is it in?
|
| airlines: abbreviation, country, airline, uid | flights: airline, flightno, sourceairport, destairport | airports: airportcode, country, city, airportname, countryabbrev |
|
select airlines.abbreviation , airlines.country from airlines join flights on airlines.uid = flights.airline group by airlines.airline order by count ( * ) asc limit 1
|
233 |
flight_2
|
What are airlines that have some flight departing from airport 'AHD'?
|
| flights: sourceairport, airline, flightno, destairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: airline, uid, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'
|
234 |
flight_2
|
Which airlines have a flight with source airport AHD?
|
| flights: sourceairport, airline, flightno, destairport | airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, city, country, countryabbrev | flights.sourceairport = airports.airportcode | airlines.airline = flights.airline |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'AHD'
|
235 |
flight_2
|
What are airlines that have flights arriving at airport 'AHD'?
|
| airlines: airline, uid, abbreviation, country | airports: airportcode, airportname, city, country, countryabbrev | flights: destairport, airline, flightno, sourceairport | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'
|
236 |
flight_2
|
Which airlines have a flight with destination airport AHD?
|
| flights: destairport, airline, flightno, sourceairport | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode | flights.airline=airlines.uid |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.destairport = 'AHD'
|
237 |
flight_2
|
Find all airlines that have flights from both airports 'APG' and 'CVO'.
|
| airlines: uid, airline, abbreviation, country | flights: sourceairport, destairport, airline | airports: airportcode, city, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'
|
238 |
flight_2
|
Which airlines have departing flights from both APG and CVO airports?
|
| airlines: airline, uid, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev | flights: airline, sourceairport, flightno, destairport | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG' intersect select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO'
|
239 |
flight_2
|
Find all airlines that have flights from airport 'CVO' but not from 'APG'.
|
| flights: sourceairport, airline, destairport, flightno | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'
|
240 |
flight_2
|
Which airlines have departures from CVO but not from APG airports?
|
| airlines: uid, airline | airports: airportcode, airportname, city | flights: sourceairport, destairport, airline |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'CVO' except select airlines.airline from airlines join flights on airlines.uid = flights.airline where flights.sourceairport = 'APG'
|
241 |
flight_2
|
Find all airlines that have at least 10 flights.
|
| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10
|
242 |
flight_2
|
Which airlines have at least 10 flights?
|
| airlines: airline, uid | flights: airline, flightno, sourceairport, destairport | airports: airportcode, airportname, city, country, countryabbrev | flights.sourceairport = airports.airportcode | flights.destairport = airports.airportcode |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) > 10
|
243 |
flight_2
|
Find all airlines that have fewer than 200 flights.
|
| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200
|
244 |
flight_2
|
Which airlines have less than 200 flights?
|
| flights: airline, flightno | airlines: uid, airline |
|
select airlines.airline from airlines join flights on airlines.uid = flights.airline group by airlines.airline having count ( * ) < 200
|
245 |
flight_2
|
What are flight numbers of Airline "United Airlines"?
|
| flights: airline, flightno, sourceairport, destairport | airlines: uid, airline, abbreviation, country | airports: airportcode, city, airportname, country, countryabbrev | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'
|
246 |
flight_2
|
Which flight numbers correspond to United Airlines flights?
|
| flights: airline, flightno | airlines: uid, airline | airports: city, airportcode, airportname, country, countryabbrev | flights.airline = airlines.uid |
|
select flights.flightno from flights join airlines on airlines.uid = flights.airline where airlines.airline = 'United Airlines'
|
247 |
flight_2
|
What are flight numbers of flights departing from Airport "APG"?
|
| flights: sourceairport, flightno, airline, destairport | airports: airportcode, airportname, city, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select flightno from flights where sourceairport = 'APG'
|
248 |
flight_2
|
Give the flight numbers of flights leaving from APG.
|
| flights: sourceairport, flightno, airline | airports: airportcode, city, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select flightno from flights where sourceairport = 'APG'
|
249 |
flight_2
|
What are flight numbers of flights arriving at Airport "APG"?
|
| airlines: uid, airline, abbreviation, country | airports: airportcode, airportname, city, country, countryabbrev | flights: destairport, flightno, airline, sourceairport | flights.destairport = airports.airportcode | flights.airline = airlines.uid |
|
select flightno from flights where destairport = 'APG'
|
250 |
flight_2
|
Give the flight numbers of flights landing at APG.
|
| flights: destairport, flightno | airports: airportcode | airlines: uid |
|
select flightno from flights where destairport = 'APG'
|
251 |
flight_2
|
What are flight numbers of flights departing from City "Aberdeen "?
|
| flights: sourceairport, flightno, airline, destairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select flights.flightno from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'
|
252 |
flight_2
|
Give the flight numbers of flights leaving from Aberdeen.
|
| flights: sourceairport, flightno, destairport, airline | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country | flights.sourceairport = airports.airportcode | flights.destairport = airports.airportcode |
|
select flights.flightno from flights join airports on flights.sourceairport = airports.airportcode where airports.city = 'Aberdeen'
|
253 |
flight_2
|
What are flight numbers of flights arriving at City "Aberdeen"?
|
| airlines: airline, uid, abbreviation, country | airports: city, airportcode, airportname, country, countryabbrev | flights: flightno, destairport, sourceairport, airline |
|
select flights.flightno from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'
|
254 |
flight_2
|
Give the flight numbers of flights arriving in Aberdeen.
|
| flights: destairport, flightno, airline, sourceairport | airports: city, airportcode, airportname, country, countryabbrev | airlines: uid, airline, abbreviation, country |
|
select flights.flightno from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen'
|
255 |
flight_2
|
Find the number of flights landing in the city of Aberdeen or Abilene.
|
| airports: city, airportcode | flights: destairport |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'
|
256 |
flight_2
|
How many flights land in Aberdeen or Abilene?
|
| airports: city, airportcode, airportname, country, countryabbrev | flights: destairport, airline, flightno, sourceairport | airlines: uid, airline, abbreviation, country | flights.destairport = airports.airportcode | flights.sourceairport = airports.airportcode |
|
select count ( * ) from flights join airports on flights.destairport = airports.airportcode where airports.city = 'Aberdeen' or airports.city = 'Abilene'
|
257 |
flight_2
|
Find the name of airports which do not have any flight in and out.
|
| airports: airportname, airportcode | flights: destairport, sourceairport | airlines: uid, airline, abbreviation, country | airports: city, country, countryabbrev | flights: airline, flightno |
|
select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )
|
258 |
flight_2
|
Which airports do not have departing or arriving flights?
|
| airports: airportcode, airportname, city, country, countryabbrev | flights: destairport, sourceairport, airline, flightno | airlines: uid, airline, abbreviation, country |
|
select airportname from airports where airportcode not in ( select sourceairport from flights union select destairport from flights )
|
259 |
employee_hire_evaluation
|
How many employees are there?
|
| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select count ( * ) from employee
|
260 |
employee_hire_evaluation
|
Count the number of employees
|
| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: employee_id, shop_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select count ( * ) from employee
|
261 |
employee_hire_evaluation
|
Sort employee names by their age in ascending order.
|
| employee: age, name, employee_id | shop: | hiring: | evaluation: | employee.employee_id = hiring.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name from employee order by age asc
|
262 |
employee_hire_evaluation
|
List the names of employees and sort in ascending order of age.
|
| employee: name, age, employee_id, city | hiring: employee_id | shop: shop_id | evaluation: employee_id | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name from employee order by age asc
|
263 |
employee_hire_evaluation
|
What is the number of employees from each city?
|
| employee: city, employee_id, name, age | hiring: employee_id, shop_id, start_from, is_full_time | shop: shop_id, name, location, district, number_products, manager_name | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select count ( * ) , city from employee group by city
|
264 |
employee_hire_evaluation
|
Count the number of employees for each city.
|
| employee: employee_id, city | hiring: employee_id | evaluation: employee_id | shop: shop_id |
|
select count ( * ) , city from employee group by city
|
265 |
employee_hire_evaluation
|
Which cities do more than one employee under age 30 come from?
|
| employee: age, city, employee_id, name | hiring: employee_id | shop: shop_id | evaluation: employee_id | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select city from employee where age < 30 group by city having count ( * ) > 1
|
266 |
employee_hire_evaluation
|
Find the cities that have more than one employee under age 30.
|
| employee: city, age, employee_id, name | shop: shop_id, location, district, number_products, manager_name, name | hiring: employee_id, shop_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select city from employee where age < 30 group by city having count ( * ) > 1
|
267 |
employee_hire_evaluation
|
Find the number of shops in each location.
|
| shop: location, shop_id, name, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |
|
select count ( * ) , location from shop group by location
|
268 |
employee_hire_evaluation
|
How many shops are there in each location?
|
| shop : location, shop_id |
|
select count ( * ) , location from shop group by location
|
269 |
employee_hire_evaluation
|
Find the manager name and district of the shop whose number of products is the largest.
|
| shop: number_products, manager_name, district, shop_id | employee: name, employee_id | hiring: shop_id, employee_id |
|
select manager_name , district from shop order by number_products desc limit 1
|
270 |
employee_hire_evaluation
|
What are the manager name and district of the shop that sells the largest number of products?
|
| shop: number_products, manager_name, district, shop_id, name, location | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select manager_name , district from shop order by number_products desc limit 1
|
271 |
employee_hire_evaluation
|
find the minimum and maximum number of products of all stores.
|
| shop: number_products, shop_id, name, location, district, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |
|
select min ( number_products ) , max ( number_products ) from shop
|
272 |
employee_hire_evaluation
|
What are the minimum and maximum number of products across all the shops?
|
| shop: number_products, shop_id, name, location, district, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | employee: employee_id, name, age, city | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select min ( number_products ) , max ( number_products ) from shop
|
273 |
employee_hire_evaluation
|
Return the name, location and district of all shops in descending order of number of products.
|
| shop: name, location, district, number_products, shop_id, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name , location , district from shop order by number_products desc
|
274 |
employee_hire_evaluation
|
Sort all the shops by number products in descending order, and return the name, location and district of each shop.
|
| shop: number_products, name, location, district, shop_id, manager_name | employee: employee_id , name , age , city | hiring: shop_id , employee_id , start_from , is_full_time | evaluation: employee_id , year_awarded , bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name , location , district from shop order by number_products desc
|
275 |
employee_hire_evaluation
|
Find the names of stores whose number products is more than the average number of products.
|
| shop: number_products, name, shop_id, location, district, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus |
|
select name from shop where number_products > ( select avg ( number_products ) from shop )
|
276 |
employee_hire_evaluation
|
Which shops' number products is above the average? Give me the shop names.
|
| shop : number_products, name, shop_id, location, district, manager_name | hiring : shop_id, employee_id, start_from, is_full_time | employee : employee_id, name, age, city | evaluation : employee_id, year_awarded, bonus | hiring.shop_id = shop.shop_id | hiring.employee_id = employee.employee_id | evaluation.employee_id = employee.employee_id |
|
select name from shop where number_products > ( select avg ( number_products ) from shop )
|
277 |
employee_hire_evaluation
|
find the name of employee who was awarded the most times in the evaluation.
|
| evaluation: employee_id, year_awarded, bonus | employee: name, employee_id, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1
|
278 |
employee_hire_evaluation
|
Which employee received the most awards in evaluations? Give me the employee name.
|
| employee: employee_id, name | evaluation: employee_id, bonus | hiring: employee_id, shop_id, start_from, is_full_time | shop: shop_id, name, location, district, number_products, manager_name | hiring.employee_id=employee.employee_id | hiring.shop_id=shop.shop_id | evaluation.employee_id=employee.employee_id |
|
select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id group by evaluation.employee_id order by count ( * ) desc limit 1
|
279 |
employee_hire_evaluation
|
Find the name of the employee who got the highest one time bonus.
|
| evaluation: bonus, employee_id, year_awarded | employee: name, employee_id, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id order by evaluation.bonus desc limit 1
|
280 |
employee_hire_evaluation
|
Which employee received the biggest bonus? Give me the employee name.
|
| evaluation: bonus, employee_id, year_awarded | employee: name, employee_id, age, city | hiring: employee_id, shop_id, start_from, is_full_time | shop: shop_id, name, location, district, number_products, manager_name | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select employee.name from employee join evaluation on employee.employee_id = evaluation.employee_id order by evaluation.bonus desc limit 1
|
281 |
employee_hire_evaluation
|
Find the names of employees who never won any award in the evaluation.
|
| employee: employee_id, name | evaluation: employee_id | hiring: employee_id | shop: shop_id |
|
select name from employee where employee_id not in ( select employee_id from evaluation )
|
282 |
employee_hire_evaluation
|
What are the names of the employees who never received any evaluation?
|
| employee: employee_id, name, age, city | hiring: employee_id, shop_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | shop: shop_id, name, location, district, number_products, manager_name | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name from employee where employee_id not in ( select employee_id from evaluation )
|
283 |
employee_hire_evaluation
|
What is the name of the shop that is hiring the largest number of employees?
|
| shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | employee: employee_id, name, age, city | evaluation: employee_id, year_awarded, bonus | hiring.employee_id=employee.employee_id | hiring.shop_id=shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by hiring.shop_id order by count ( * ) desc limit 1
|
284 |
employee_hire_evaluation
|
Which shop has the most employees? Give me the shop name.
|
| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by hiring.shop_id order by count ( * ) desc limit 1
|
285 |
employee_hire_evaluation
|
Find the name of the shops that do not hire any employee.
|
| shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | employee: employee_id, name, age, city | evaluation: employee_id, year_awarded, bonus |
|
select name from shop where shop_id not in ( select shop_id from hiring )
|
286 |
employee_hire_evaluation
|
Which shops run with no employees? Find the shop names
|
| shop: name, shop_id, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | employee: employee_id, name, age, city | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select name from shop where shop_id not in ( select shop_id from hiring )
|
287 |
employee_hire_evaluation
|
Find the number of employees hired in each shop; show the shop name as well.
|
| employee: employee_id | shop: shop_id, name | hiring: shop_id, employee_id | evaluation: employee_id |
|
select count ( * ) , shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name
|
288 |
employee_hire_evaluation
|
For each shop, return the number of employees working there and the name of the shop.
|
| employee: employee_id | shop: name, shop_id | hiring: employee_id, shop_id | evaluation: |
|
select count ( * ) , shop.name from hiring join shop on hiring.shop_id = shop.shop_id group by shop.name
|
289 |
employee_hire_evaluation
|
What is total bonus given in all evaluations?
|
| evaluation: bonus, employee_id, year_awarded | employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select sum ( bonus ) from evaluation
|
290 |
employee_hire_evaluation
|
Find the total amount of bonus given in all the evaluations.
|
| evaluation: bonus, employee_id | employee: employee_id | hiring: employee_id, shop_id | shop: shop_id |
|
select sum ( bonus ) from evaluation
|
291 |
employee_hire_evaluation
|
Give me all the information about hiring.
|
| employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select * from hiring
|
292 |
employee_hire_evaluation
|
What is all the information about hiring?
|
| hiring: employee_id, shop_id, start_from, is_full_time | employee: employee_id, name, age, city | shop: shop_id, name, location, district, number_products, manager_name | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select * from hiring
|
293 |
employee_hire_evaluation
|
Which district has both stores with less than 3000 products and stores with more than 10000 products?
|
| shop: district, number_products, shop_id, name, location, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000
|
294 |
employee_hire_evaluation
|
Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
|
| shop: district, number_products, shop_id, name, location, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id=employee.employee_id | hiring.shop_id=shop.shop_id | evaluation.employee_id=employee.employee_id |
|
select district from shop where number_products < 3000 intersect select district from shop where number_products > 10000
|
295 |
employee_hire_evaluation
|
How many different store locations are there?
|
| shop: location, shop_id, name, district, number_products, manager_name | employee: employee_id, name, age, city | hiring: shop_id, employee_id, start_from, is_full_time | evaluation: employee_id, year_awarded, bonus | hiring.employee_id = employee.employee_id | hiring.shop_id = shop.shop_id | evaluation.employee_id = employee.employee_id |
|
select count ( distinct location ) from shop
|
296 |
employee_hire_evaluation
|
Count the number of distinct store locations.
|
| shop: location |
|
select count ( distinct location ) from shop
|
297 |
cre_Doc_Template_Mgt
|
How many documents do we have?
|
| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id |
|
select count ( * ) from documents
|
298 |
cre_Doc_Template_Mgt
|
Count the number of documents.
|
| documents: document_id, template_id, document_name, document_description, other_details | templates: template_id, template_type_code, version_number, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: document_id, paragraph_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id |
|
select count ( * ) from documents
|
299 |
cre_Doc_Template_Mgt
|
List document IDs, document names, and document descriptions for all documents.
|
| documents: document_id, document_name, document_description, template_id, other_details | templates: template_id, version_number, template_type_code, date_effective_from, date_effective_to, template_details | ref_template_types: template_type_code, template_type_description | paragraphs: paragraph_id, document_id, paragraph_text, other_details | documents.template_id = templates.template_id | templates.template_type_code = ref_template_types.template_type_code | paragraphs.document_id = documents.document_id |
|
select document_id , document_name , document_description from documents
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.