interaction_utterance
sequencelengths 0
6
| interaction_query
sequencelengths 0
6
| final_utterance
stringlengths 19
224
| final_query
stringlengths 22
577
| db_id
stringclasses 140
values |
---|---|---|---|---|
[
"List all the guests' first and last names.",
"Also show the booking status code of each one.",
"What are the first names, start dates, and end dates of all the apartment bookings?"
] | [
"SELECT guest_first_name, guest_last_name FROM Guests",
"SELECT T2.guest_first_name , T2.guest_last_name, T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id",
"SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id"
] | Show the guest first names, start dates, and end dates of all the apartment bookings. | SELECT T2.guest_first_name , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id | apartment_rentals |
[
"List all the booking start and end dates.",
"Show the bedroom number of each record.",
"Show the start and end dates of the apartment bookings made by male guests.",
"What about female guests?"
] | [
"SELECT booking_start_date , booking_start_date FROM Apartment_Bookings",
"SELECT T1.booking_start_date , T1.booking_start_date, T2.bedroom_count FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Male\"",
"SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = \"Female\""
] | Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female". | SELECT T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" | apartment_rentals |
[
"List all the guests' first and last names.",
"Among all the guests, which of them have \"Provisional\" the apartment bookings?",
"How about \"Confirmed\"?"
] | [
"SELECT guest_first_name, guest_last_name FROM Guests",
"SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Provisional\"",
"SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = \"Confirmed\""
] | Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed". | SELECT T2.guest_first_name , T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = "Confirmed" | apartment_rentals |
[
"List all the unique facility codes.",
"List all the apartments and the facility codes of them.",
"How many of them have more than 3 bedrooms?",
"Show the facility codes of those where there are more than 4 bedrooms."
] | [
"SELECT distinct facility_code FROM Apartment_Facilities",
"SELECT * FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT count(*) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 3",
"SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4"
] | Show the facility codes of apartments with more than 4 bedrooms. | SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 | apartment_rentals |
[
"List all unique facility codes.",
"List all the apartments and the facility codes of them.",
"Calculate how many rooms are there for those apartments with facility code \"Gym\"."
] | [
"SELECT distinct facility_code FROM Apartment_Facilities",
"SELECT * FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = \"Gym\""
] | Show the total number of rooms of all apartments with facility code "Gym". | SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym" | apartment_rentals |
[
"What is the minimum number of rooms for the apartments?",
"List all the short names of each building.",
"For each short name, show the room count.",
"Only keep the result of \"Columbus Square\"."
] | [
"SELECT min(room_count) FROM Apartments",
"SELECT building_short_name FROM Apartment_Buildings",
"SELECT T1.building_short_name, T2.room_count FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id",
"SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = \"Columbus Square\""
] | Show the total number of rooms of the apartments in the building with short name "Columbus Square". | SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square" | apartment_rentals |
[
"List all the addresses of the buildings.",
"Show the building address for each apartment id.",
"Only show the addresses of the buildings that have apartments with more than 3 bathrooms.",
"How about more than 2?"
] | [
"SELECT building_address FROM Apartment_Buildings",
"SELECT T1.building_address, T2.apt_id FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id",
"SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 3",
"SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2"
] | Show the addresses of the buildings that have apartments with more than 2 bathrooms. | SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2 | apartment_rentals |
[
"For each apartment booking, show the start date, and end date.",
"Also show the type code with each record.",
"What the apartment type codes and apartment numbers in the buildings managed by \"Kyle\"?"
] | [
"SELECT booking_start_date , booking_start_date FROM Apartment_Bookings",
"SELECT T2.apt_type_code , T1.booking_start_date , T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id",
"SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = \"Kyle\""
] | Show the apartment type codes and apartment numbers in the buildings managed by "Kyle". | SELECT T2.apt_type_code , T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle" | apartment_rentals |
[
"List all the unique booking status codes.",
"How many apartments are there for each one?"
] | [
"SELECT \tdistinct booking_status_code FROM Apartment_Bookings",
"SELECT \tbooking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code"
] | Show the booking status code and the corresponding number of bookings. | SELECT booking_status_code , COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | apartment_rentals |
[
"List all the apartment numbers.",
"Order those results by number of bedrooms in descending order.",
"Order them by room count in descending order.",
"What about in ascending order?"
] | [
"SELECT apt_number FROM Apartments",
"SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC",
"SELECT apt_number FROM Apartments ORDER BY room_count ASC",
"SELECT apt_number FROM Apartments ORDER BY room_count ASC"
] | Return all the apartment numbers sorted by the room count in ascending order. | SELECT apt_number FROM Apartments ORDER BY room_count ASC | apartment_rentals |
[
"List all the apartment numbers.",
"Order them by the number of bedrooms in descending order.",
"Which ones are top 4?",
"What about the top 1?"
] | [
"SELECT apt_number FROM Apartments",
"SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC",
"SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 4",
"SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1"
] | Return the apartment number with the largest number of bedrooms. | SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1 | apartment_rentals |
[
"List all the apartment type codes with the counts of apartments.",
"Order those results by the number of apartments in ascending order."
] | [
"SELECT apt_type_code, count(*) FROM Apartments GROUP BY apt_type_code",
"SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC"
] | Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order. | SELECT apt_type_code , COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) ASC | apartment_rentals |
[
"List all the apartment type codes with the counts of apartments.",
"Order the apartments by the average number of rooms in descending order.",
"From those results, only keep the top 5.",
"What about top 3?",
"What are the apartment type codes from those results?"
] | [
"SELECT apt_type_code, count(*) FROM Apartments GROUP BY apt_type_code",
"SELECT * FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC",
"SELECT * FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 5",
"SELECT * FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3",
"SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3"
] | Show the top 3 apartment type codes sorted by the average number of rooms in descending order. | SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3 | apartment_rentals |
[
"What are all the information about the apartments.",
"Order those records by the number of total rooms.",
"Which is the apartment type code that has the largest number of total rooms?",
"Order the apartment type code by the number of total rooms.",
"Add the number of bathrooms and number of bedrooms to the results."
] | [
"SELECT * FROM Apartments",
"SELECT * FROM Apartments ORDER BY room_count",
"SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1",
"SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC",
"SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1"
] | Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms. | SELECT apt_type_code , bathroom_count , bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1 | apartment_rentals |
[
"How many unique apartment type codes are there?",
"Show the number of apartments for each code.",
"Which are the most two common apartment type codes?",
"How about the top 1?"
] | [
"SELECT count(distinct apt_type_code) FROM Apartments",
"SELECT apt_type_code, count(*) FROM Apartments GROUP BY apt_type_code",
"SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 2",
"SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1"
] | Show the most common apartment type code. | SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1 | apartment_rentals |
[
"How many unique apartment type codes are there?",
"What is the minimum room count for the departments?",
"What is the minimum bathroom count for the departments?",
"How many apartments have more than 2 bathrooms?",
"How about more than 1?",
"Among those apartments, which apartment type is the most popular one?"
] | [
"SELECT count(distinct apt_type_code) FROM Apartments",
"SELECT min(room_count) FROM Apartments",
"SELECT min(bathroom_count) FROM Apartments",
"SELECT count(*) FROM Apartments WHERE bathroom_count > 2",
"SELECT count(*) FROM Apartments WHERE bathroom_count > 1",
"SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1"
] | Show the most common apartment type code among apartments with more than 1 bathroom. | SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1 | apartment_rentals |
[
"How many unique apartment type codes are there?",
"What is the minimum room count for the departments?",
"List the apartment type code and the maximum and minimum number of rooms for each one."
] | [
"SELECT count(distinct apt_type_code) FROM Apartments",
"SELECT min(room_count) FROM Apartments",
"SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code"
] | Show each apartment type code, and the maximum and minimum number of rooms for each type. | SELECT apt_type_code , max(room_count) , min(room_count) FROM Apartments GROUP BY apt_type_code | apartment_rentals |
[
"Show all the guests information.",
"How many genders are there in total?",
"Has \"Rebeca\" ever visited, show the related information.",
"Count how many guests for each gender, and list them in descending order."
] | [
"SELECT * FROM Guests",
"SELECT count(distinct gender_code) FROM Guests",
"SELECT * FROM Guests where guest_first_name = \"Rebeca\"",
"SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC"
] | Show each gender code and the corresponding count of guests sorted by the count in descending order. | SELECT gender_code , COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC | apartment_rentals |
[
"Show all the information about the facilities.",
"How many records are there?",
"Which apartments have no facility, show ids?",
"How many are there?"
] | [
"SELECT * FROM Apartment_Facilities",
"SELECT count(*) FROM Apartment_Facilities",
"SELECT apt_id FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)",
"SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)"
] | How many apartments do not have any facility? | SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities) | apartment_rentals |
[
"How many apartments are there?",
"What are the status codes?",
"How many apartments have the status code to be \"Confirmed\"?",
"What about that of \"Provisional\" or \"Confirmed\"?"
] | [
"SELECT count(apt_number) FROM Apartments",
"SELECT booking_status_code FROM Apartment_Bookings",
"SELECT count(T2.apt_number) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\"",
"SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Confirmed\" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = \"Provisional\""
] | Show the apartment numbers of apartments with bookings that have status code both "Provisional" and "Confirmed" | SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional" | apartment_rentals |
[
"List all the country names and their languages.",
"How many official languages that contain the word \"English\"?",
"Which countries are they?"
] | [
"SELECT Country_name, Official_native_language FROM country",
"SELECT count(*) FROM country WHERE Official_native_language LIKE \"%English%\"",
"SELECT Official_native_language FROM country WHERE Official_native_language LIKE \"%English%\""
] | Show all official native languages that contain the word "English". | SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" | match_season |
[
"Show all the information about the match season.",
"List the positions.",
"How many distinct positions are there?",
"What are the distinct position of players from college Virginia?",
"What about UCLA or Duke?"
] | [
"SELECT * FROM match_season",
"SELECT position FROM match_season",
"SELECT count(distinct position) FROM match_season",
"SELECT DISTINCT POSITION FROM match_season WHERE College = \"Virginia\"",
"SELECT DISTINCT POSITION FROM match_season WHERE College = \"UCLA\" OR College = \"Duke\""
] | Show the distinct position of players from college UCLA or Duke. | SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke" | match_season |
[
"Show the match season and the corresponding country.",
"How many distinct countries in total?",
"List the player names who are from Ireland.",
"How about Indonesia?"
] | [
"SELECT T2.season, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country",
"SELECT count(distinct T1.Country_name) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country",
"SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Ireland\"",
"SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = \"Indonesia\""
] | Which players are from Indonesia? | SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia" | match_season |
[
"Show the country whose capital is Baghdad.",
"What about Dublin?",
"List all the positions corresponding to that country.",
"What about the distinct positions?"
] | [
"select country_name from country where capital = 'Baghdad'",
"select country_name from country where capital = 'Dublin'",
"SELECT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\"",
"SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = \"Dublin\""
] | What are the distinct positions of the players from a country whose capital is Dublin? | SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin" | match_season |
[
"What are the distinct position of players from college Furman?",
"What about the players who come from college of Maryland or Duke?",
"What are the official languages of them?"
] | [
"SELECT DISTINCT POSITION FROM match_season WHERE College = \"Furman\"",
"SELECT player FROM match_season WHERE College = \"Maryland\" OR College = \"Duke\"",
"SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = \"Maryland\" OR T2.College = \"Duke\""
] | What are the official languages of the countries of players from Maryland or Duke college? | SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke" | match_season |
[
"List the players and their country names.",
"Which ones have the position of Forward?",
"What about the official languages of them?",
"How many official languages in total for the defenders?"
] | [
"SELECT T2.player,T1.country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"",
"SELECT T2.player,T1.country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\" WHERE T2.Position = \"Forward\"",
"SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\"",
"SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\""
] | How many distinct official languages are there among countries of players whose positions are defenders. | SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" | match_season |
[
"List the player, position and the corresponding team for each player.",
"Which ones are from the team 'Evalyn Feil', show the positions only?",
"What about the team name \"Ryley Goldner\"?"
] | [
"SELECT T1.player,T1.Position, T2.name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id",
"SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id where t2.name = 'Evalyn Feil'",
"SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Ryley Goldner\""
] | Show the positions of the players from the team with name "Ryley Goldner". | SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner" | match_season |
[
"List the college and the corresponding team name.",
"How many unique colleges are there for team 'Miami Fusion'?",
"What about the team \"Columbus Crew\"?"
] | [
"SELECT college,name FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id",
"SELECT count(DISTINCT College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = 'Miami Fusion'",
"SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\""
] | How many distinct colleges are associated with players from the team with name "Columbus Crew". | SELECT count(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" | match_season |
[
"For each player, show the name and the team.",
"What about adding the corresponding team name for each record?",
"What are the players and years played for those who are from team \"Brown Erdman\"?",
"What about that of \"Columbus Crew\"?"
] | [
"SELECT player, years_played FROM player",
"SELECT T1.player, T1.years_played,T2.name FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\"",
"SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Brown Erdman\"",
"SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = \"Columbus Crew\""
] | Show the players and years played for players from team "Columbus Crew". | SELECT T1.Player , T1.Years_Played FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" | match_season |
[
"List all the country names.",
"For all players, show their country names.",
"For each country, how many players are there?"
] | [
"SELECT Country_name from country",
"SELECT T2.player, Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name",
"SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name"
] | Show the country names and the corresponding number of players. | SELECT Country_name , COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name | match_season |
[
"What are the number of the positions for each type?",
"Among those, which one is the list popular one?",
"How about the most popular one?"
] | [
"SELECT POSITION, count(*) FROM match_season GROUP BY POSITION",
"SELECT POSITION FROM match_season GROUP BY POSITION order by count(*) ASC limit 1",
"SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1"
] | Show the most common position of players in match seasons. | SELECT POSITION FROM match_season GROUP BY POSITION ORDER BY count(*) DESC LIMIT 1 | match_season |
[
"What are the number of the players in the match season for each college?",
"Which ones have the least players, keep the least 5 colleges.",
"What about the top 3?"
] | [
"SELECT College, count(*) FROM match_season GROUP BY College",
"SELECT College FROM match_season GROUP BY College order by count(*) asc LIMIT 5",
"SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3"
] | Show the top 3 most common colleges of players in match seasons. | SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3 | match_season |
[
"How many unique colleges are there in the match season?",
"Which countries have only one player?",
"What about at least two?"
] | [
"SELECT count(distinct College) FROM match_season",
"SELECT College FROM match_season GROUP BY College HAVING count(*) = 1",
"SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2"
] | Show the name of colleges that have at least two players. | SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 | match_season |
[
"How many distinct colleges are there in the match season?",
"Which countries have only one player?",
"What about at least two?",
"Show the result in descending alphabetical order."
] | [
"SELECT count(distinct College) FROM match_season",
"SELECT College FROM match_season GROUP BY College HAVING count(*) = 1",
"SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2",
"SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC"
] | Show the name of colleges that have at least two players in descending alphabetical order. | SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC | match_season |
[
"Show the team names.",
"Which of them have at least one record in the match season?",
"Which are not?"
] | [
"SELECT Name FROM team",
"SELECT Name FROM team WHERE Team_id IN (SELECT Team FROM match_season)",
"SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)"
] | What are the names of teams that do no have match season record? | SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season) | match_season |
[
"List the positions from all seasons.",
"How many are there for each position?",
"Show the positions and the corresponding country.",
"Keep the country names that have both forward and defender as position."
] | [
"SELECT position FROM match_season",
"SELECT position, count(*) FROM match_season group by position",
"SELECT T2.position,T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country",
"SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Forward\" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = \"Defender\""
] | What are the names of countries that have both players with position forward and players with position defender? | SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender" | match_season |
[
"Show all the song names and their release date.",
"How many different releasing dates are there?",
"From those songs, which ones are released in the most recent year?"
] | [
"SELECT song_name , releasedate FROM song",
"SELECT COUNT(DISTINCT releasedate) FROM song",
"SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1"
] | What is the name of the song that was released in the most recent year? | SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1 | music_1 |
[
"Order the songs by their file size, from large to small.",
"What about ordering by duration?",
"From those results, which one is the top 1, only keep the id of it."
] | [
"SELECT * FROM files ORDER BY file_size DESC",
"SELECT * FROM files ORDER BY duration DESC",
"SELECT f_id FROM files ORDER BY duration DESC LIMIT 1"
] | What is the id of the longest song? | SELECT f_id FROM files ORDER BY duration DESC LIMIT 1 | music_1 |
[
"What is the average rating for all the songs?",
"How many of the songs which rating is above 9?",
"What are singer names and their countries of these songs?"
] | [
"SELECT avg(rating) FROM song",
"SELECT count(*) FROM song where rating > 9",
"SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9"
] | List the name and country of origin for all singers who have produced songs with rating above 9. | SELECT DISTINCT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9 | music_1 |
[
"List all the song names by the resolution in ascending order.",
"How many songs have resolution higher than 800?",
"What about lower?",
"What are the file size and format of them?"
] | [
"SELECT song_name FROM song order by resolution desc",
"SELECT count(song_name) FROM song where resolution > 800",
"SELECT count(song_name) FROM song where resolution < 800",
"SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800"
] | List the file size and format for all songs that have resolution lower than 800. | SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 | music_1 |
[
"Which song ids are the top three long ones?",
"What about the shortest one?",
"What is the artist name of it?"
] | [
"SELECT f_id FROM files order by duration desc limit 3",
"SELECT f_id FROM files order by duration asc limit 1",
"SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1"
] | What is the name of the artist who produced the shortest song? | SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1 | music_1 |
[
"What is the maximum rating for all the songs?",
"Which songs are the top 2 rating ones?",
"What about top 3?",
"What are the names and countries of origin for the artists of these songs?"
] | [
"SELECT max(rating) FROM song",
"SELECT * FROM song order by rating desc limit 2",
"SELECT * FROM song order by rating desc limit 3",
"SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3"
] | What are the names and countries of origin for the artists who produced the top three highly rated songs. | SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3 | music_1 |
[
"List all the durations of the songs.",
"How many are there if the duration is only 2 mins to 3 mins?",
"What about 4 minutes long?"
] | [
"SELECT duration FROM files",
"SELECT count(*) FROM files WHERE duration LIKE \"2:%\"",
"SELECT count(*) FROM files WHERE duration LIKE \"4:%\""
] | How many songs have 4 minute duration? | SELECT count(*) FROM files WHERE duration LIKE "4:%" | music_1 |
[
"How many songs are produced by female artists?",
"What is the maximum rating of these songs?",
"How about average rating?"
] | [
"SELECT count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"",
"SELECT max(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"",
"SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\""
] | What is the average rating of songs produced by female artists? | SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" | music_1 |
[
"For each format, how many files are there?",
"So which format is the most common one?"
] | [
"SELECT formats,count(*) FROM files group by formats",
"SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1"
] | What is the most popular file format? | SELECT formats FROM files GROUP BY formats ORDER BY COUNT (*) DESC LIMIT 1 | music_1 |
[
"How many distinct countries are there?",
"How many artists come from India?",
"Which ones who come from UK and have songs in English?"
] | [
"SELECT COUNT(DISTINCT country) FROM artist",
"SELECT count(*) FROM artist where country = 'India'",
"SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT artist_name FROM song WHERE languages = \"english\""
] | Find the names of the artists who are from UK and have produced English songs. | SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT artist_name FROM song WHERE languages = "english" | music_1 |
[
"List all the durations of the songs.",
"How many are there if the duration is only 3 mins to 4 mins?",
"What about the ones which have the format to be mp4?",
"Show the ids that the song is in mp4 and resolution is lower than 1000."
] | [
"SELECT duration FROM files",
"SELECT count(*) FROM files WHERE duration LIKE \"3:%\"",
"SELECT count(*) FROM files WHERE formats = \"mp4\"",
"SELECT f_id FROM files WHERE formats = \"mp4\" INTERSECT SELECT f_id FROM song WHERE resolution < 1000"
] | Find the id of songs that are available in mp4 format and have resolution lower than 1000. | SELECT f_id FROM files WHERE formats = "mp4" INTERSECT SELECT f_id FROM song WHERE resolution < 1000 | music_1 |
[
"How many songs are produced by male artists?",
"How about female artisits?",
"Among those songs, which ones are in Bangla?",
"What are the country of origin for the artists of these songs?"
] | [
"SELECT count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Male\"",
"SELECT count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\"",
"SELECT count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND languages = \"bangla\"",
"SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = \"Female\" AND T2.languages = \"bangla\""
] | What is the country of origin of the artist who is female and produced a song in Bangla? | SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla" | music_1 |
[
"List all the song names by the resolution in ascending order.",
"How many songs have resolution higher than 900?",
"What about lower than 800?",
"Among those results, how may have mp3 format?",
"What is the average duration of those songs?"
] | [
"SELECT song_name FROM song order by resolution desc",
"SELECT count(song_name) FROM song where resolution > 900",
"SELECT count(song_name) FROM song where resolution < 800",
"SELECT count(*) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800",
"SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" AND T2.resolution < 800"
] | What is the average duration of songs that have mp3 format and resolution below 800? | SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800 | music_1 |
[
"List all the song names and the resolutions in descending order of resolution.",
"Which one has the highest resolution?",
"What about the lowest one?",
"What is the gender and name of the corresponding artist of that song?"
] | [
"SELECT song_name, resolution FROM song order by resolution desc",
"SELECT song_name, resolution FROM song order by resolution desc limit 1",
"SELECT song_name, resolution FROM song order by resolution asc limit 1",
"SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1"
] | Return the gender and name of artist who produced the song with the lowest resolution. | SELECT T1.gender , T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.resolution LIMIT 1 | music_1 |
[
"List all the song names and the resolutions in ascending order of resolution.",
"Which ones are the top two of the resolution?",
"What is the average resolution for the English songs?",
"Which songs have a higher resolution than the English ones?",
"What about the distinct song names of them?"
] | [
"SELECT song_name, resolution FROM song order by resolution asc",
"SELECT song_name, resolution FROM song order by resolution desc limit 2",
"SELECT avg(resolution) FROM song WHERE languages = \"english\"",
"SELECT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")",
"SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = \"english\")"
] | Find the distinct names of all songs that have a higher resolution than some songs in English. | SELECT DISTINCT song_name FROM song WHERE resolution > (SELECT min(resolution) FROM song WHERE languages = "english") | music_1 |
[
"List all the song names and the ratings.",
"What is the maximum rating?",
"Which songs have a lower rating than the average rating?",
"What about lower rating than that of blues genre ones?"
] | [
"SELECT song_name, rating FROM song",
"SELECT max(rating) FROM song",
"SELECT song_name FROM song WHERE rating < (SELECT avg(rating) FROM song)",
"SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = \"blues\")"
] | What are the names of all songs that have a lower rating than some song of blues genre? | SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = "blues") | music_1 |
[
"Show all the names of the song.",
"How many of them contain the word 'robe'?",
"How about the word 'love'?",
"What are the name and country of origin for the artists of these songs?"
] | [
"SELECT song_name FROM song",
"SELECT count(*) FROM song where song_name LIKE \"%robe%\"",
"SELECT count(*) FROM song where song_name LIKE \"%love%\"",
"SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE \"%love%\""
] | What is the name and country of origin of the artist who released a song that has "love" in its title? | SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%" | music_1 |
[
"How many songs are released in January?",
"Who are the artists of these songs, list the name and gender?"
] | [
"SELECT count(*) FROM song where releasedate LIKE \"%JAN%\"",
"SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE \"%Mar%\""
] | List the name and gender for all artists who released songs in March. | SELECT T1.artist_name , T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%" | music_1 |
[
"How many songs have resolution higher than 1000?",
"What about higher than 720?",
"Among those results, how may have mp4 format?",
"List the ids of these songs.",
"What about the ids of the songs that in mp4 format or resolution above 720?"
] | [
"SELECT count(song_name) FROM song where resolution > 1000",
"SELECT count(song_name) FROM song where resolution > 720",
"SELECT count(*) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp4\" AND T2.resolution > 720",
"SELECT f_id FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp4\" AND T2.resolution > 720",
"SELECT f_id FROM files WHERE formats = \"mp4\" UNION SELECT f_id FROM song WHERE resolution > 720"
] | What are the ids of songs that are available in either mp4 format or have resolution above 720? | SELECT f_id FROM files WHERE formats = "mp4" UNION SELECT f_id FROM song WHERE resolution > 720 | music_1 |
[
"List all the durations of the songs.",
"How many are there if the duration is 4 mins?",
"What are the names of those songs?",
"What about the song names which has 4 minute duration or is in English?"
] | [
"SELECT duration FROM files",
"SELECT count(*) FROM files WHERE duration LIKE \"4:%\"",
"SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\"",
"SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"4:%\" UNION SELECT song_name FROM song WHERE languages = \"english\""
] | List the names of all songs that have 4 minute duration or are in English. | SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english" | music_1 |
[
"How many distinct languages are there for the songs?",
"Among those languages, which one is the most popular one?"
] | [
"SELECT COUNT(DISTINCT languages) FROM song",
"SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1"
] | What is the language used most often in the songs? | SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1 | music_1 |
[
"List each language and how many songs for each?",
"Which one is the most popular language?",
"What about that for the songs which resolution are above 1000?",
"How about resolution are above 500?"
] | [
"SELECT languages, count(*) FROM song GROUP BY languages",
"SELECT languages, count(*) FROM song GROUP BY languages DESC limit 1",
"SELECT artist_name FROM song WHERE resolution > 1000 GROUP BY languages ORDER BY count(*) DESC LIMIT 1",
"SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1"
] | What is the language that was used most often in songs with resolution above 500? | SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1 | music_1 |
[
"How many artists come from India?",
"How about UK?",
"Among those artists, who are male?"
] | [
"SELECT count(*) FROM artist WHERE country = \"India\"",
"SELECT count(*) FROM artist WHERE country = \"UK\"",
"SELECT artist_name FROM artist WHERE country = \"UK\" AND gender = \"Male\""
] | What are the names of artists who are Male and are from UK? | SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male" | music_1 |
[
"Which songs have the genre to be blues?",
"How about folk?",
"What about the songs has genre to be modern OR the songs are in English?"
] | [
"SELECT song_name FROM song WHERE genre_is = \"blues\"",
"SELECT song_name FROM song WHERE genre_is = \"folk\"",
"SELECT song_name FROM song WHERE genre_is = \"modern\" OR languages = \"english\""
] | Find the names of songs whose genre is modern or language is English. | SELECT song_name FROM song WHERE genre_is = "modern" OR languages = "english" | music_1 |
[
"How many songs have a resolution below 900?",
"Among those songs, which ones have mp3 format, show the file size of them.",
"What are the names of songs which have mp3 format and the resolution is below 1000."
] | [
"SELECT count(*) FROM song WHERE resolution < 900",
"SELECT T1.file_size FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" and T2.resolution < 900",
"SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = \"mp3\" INTERSECT SELECT song_name FROM song WHERE resolution < 1000"
] | Return the names of songs for which format is mp3 and resolution is below 1000. | SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000 | music_1 |
[
"How many UK male artists?",
"Which British artists have released English songs?"
] | [
"SELECT artist_name FROM artist WHERE country = \"UK\" and gender = 'Male'",
"SELECT artist_name FROM artist WHERE country = \"UK\" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\""
] | Return the names of singers who are from UK and released an English song. | SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" | music_1 |
[
"What is the maximum resolution for all the English songs?",
"What about the average rating and resolution for songs in Bangla?"
] | [
"SELECT max(resolution) FROM song WHERE languages = \"english\"",
"SELECT avg(rating) , avg(resolution) FROM song WHERE languages = \"bangla\""
] | What are the average rating and resolution of songs that are in Bangla? | SELECT avg(rating) , avg(resolution) FROM song WHERE languages = "bangla" | music_1 |
[
"List all the durations of the songs.",
"How many are there when the duration is only 4 mins?",
"What about that of 3 mins?",
"How about the maximum and minimum resolutions of these songs?"
] | [
"SELECT duration FROM files",
"SELECT count(*) FROM files WHERE duration LIKE \"4:%\"",
"SELECT count(*) FROM files WHERE duration LIKE \"3:%\"",
"SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE \"3:%\""
] | What are the maximum and minimum resolution of songs whose duration is 3 minutes? | SELECT max(T2.resolution) , min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "3:%" | music_1 |
[
"For each language, how many songs are there?",
"For each language group in order, what is the average duration value of the songs in the group?",
"How about the maximum duration and resolution?"
] | [
"SELECT languages,COUNT(*) FROM song GROUP BY languages",
"SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages",
"SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages"
] | What are the maximum duration and resolution of songs grouped and ordered by languages? | SELECT max(T1.duration) , max(T2.resolution) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages | music_1 |
[
"How many genres are there in total?",
"How many songs for each of them, show the result in the order of genre?",
"What are the shortest duration and lowest rating for each group?"
] | [
"SELECT COUNT(DISTINCT genre_is) FROM song",
"SELECT genre_is,COUNT(*) FROM song GROUP BY genre_is",
"SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is"
] | What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre? | SELECT min(T1.duration) , min(T2.rating) , T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is | music_1 |
[
"List the number of songs for each artist.",
"How many songs does Farida has?",
"How about Prity?",
"What about the people who has at least an English song?"
] | [
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name",
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name having T1.artist_name = 'Farida'",
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name having T1.artist_name = 'Prity'",
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"english\" GROUP BY T2.artist_name HAVING count(*) >= 1"
] | Find the names and number of works of all artists who have at least one English songs. | SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" GROUP BY T2.artist_name HAVING count(*) >= 1 | music_1 |
[
"Which songs have a resolution to be lower than 800?",
"List artist names and the countries of these songs?",
"What about the artist names and countries who have at least one song of resolution above 900?"
] | [
"SELECT song_name from song where resolution < 800",
"SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution < 800",
"SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1"
] | Find the name and country of origin for all artists who have release at least one song of resolution above 900. | SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.resolution > 900 GROUP BY T2.artist_name HAVING count(*) >= 1 | music_1 |
[
"Order the artist names by the number of songs.",
"How about the names and the number of songs for the top one artist?",
"How about top three?"
] | [
"SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*)",
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 1",
"SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3"
] | Find the names and number of works of the three artists who have produced the most songs. | SELECT T1.artist_name , count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3 | music_1 |
[
"For each artist, count how many songs.",
"What is the country of origin for the artist who made the least number of songs?"
] | [
"SELECT T1.artist_name, count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name group by T1.artist_name",
"SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1"
] | Find the country of origin for the artist who made the least number of songs? | SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) LIMIT 1 | music_1 |
[
"What are the minimum, maximum and average values of the ratings?",
"Which songs have a higher rating than the average, list the song names.",
"What about the names which rating is higher than the rating of all songs in English?",
"How about lower?"
] | [
"SELECT min(rating), max(rating), avg(rating) FROM song",
"SELECT song_name FROM song WHERE rating > (SELECT avg(rating) FROM song)",
"SELECT song_name FROM song WHERE rating > (SELECT min(rating) FROM song WHERE languages = 'english')",
"SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')"
] | What are the names of the songs whose rating is below the rating of all songs in English? | SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english') | music_1 |
[
"What are the minimum, maximum and average values of the ratings?",
"Which songs have a higher rating than the average, list the song ids.",
"What about the song ids whose resolution is higher than the resolution of any songs with rating lower than 8?"
] | [
"SELECT min(rating), max(rating), avg(rating) FROM song",
"SELECT f_id FROM song WHERE rating > (SELECT avg(rating) FROM song)",
"SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8)"
] | What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8? | SELECT f_id FROM song WHERE resolution > (SELECT max(resolution) FROM song WHERE rating < 8) | music_1 |
[
"What are the minimum, maximum and average values of the resolution?",
"Which songs have a higher value than the average, list the song ids.",
"How about the ones that is higher than the average resolution value for the modern genre songs?"
] | [
"SELECT min(resolution), max(resolution), avg(resolution) FROM song",
"SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song)",
"SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = \"modern\")"
] | What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre? | SELECT f_id FROM song WHERE resolution > (SELECT avg(resolution) FROM song WHERE genre_is = "modern") | music_1 |
[
"For each artist, count how many songs.",
"Among those, only count the Bangla songs.",
"Which is the top one artist who has the most counts?",
"How about top 3?"
] | [
"SELECT T1.artist_name, count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name GROUP BY T2.artist_name",
"SELECT T1.artist_name, count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name",
"SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 1",
"SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = \"bangla\" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3"
] | Find the top 3 artists who have the largest number of songs works whose language is Bangla. | SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "bangla" GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3 | music_1 |
[
"What is the average rating of the Bangla songs?",
"How about English songs?",
"How many of them in total?",
"What are the id, genre and artist name of these songs in the order of rating?"
] | [
"SELECT avg(rating) FROM song WHERE languages = \"bangla\"",
"SELECT avg(rating) FROM song WHERE languages = \"english\"",
"SELECT count(*) FROM song WHERE languages = \"english\"",
"SELECT f_id , genre_is , artist_name FROM song WHERE languages = \"english\" ORDER BY rating"
] | List the id, genre and artist name of English songs ordered by rating. | SELECT f_id , genre_is , artist_name FROM song WHERE languages = "english" ORDER BY rating | music_1 |
[
"What is the average duration of the blues songs?",
"How about that of pop songs?",
"What about the duration, file size and format of those songs, order the results by title?"
] | [
"SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"blues\"",
"SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\"",
"SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = \"pop\" ORDER BY T2.song_name"
] | List the duration, file size and format of songs whose genre is pop, ordered by title? | SELECT T1.duration , T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.genre_is = "pop" ORDER BY T2.song_name | music_1 |
[
"How many artists have Bangla songs?",
"How about English?",
"What are the names of them?",
"Which of them have never received rating higher than 8."
] | [
"SELECT count(DISTINCT artist_name) FROM song WHERE languages = 'bangla'",
"SELECT count(DISTINCT artist_name) FROM song WHERE languages = 'bangla'",
"SELECT artist_name FROM song WHERE languages = \"english\"",
"SELECT DISTINCT artist_name FROM song WHERE languages = \"english\" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8"
] | Find the names of the artists who have produced English songs but have never received rating higher than 8. | SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 | music_1 |
[
"How many technicians are there?",
"Show me their names.",
"What about those that are either 36 or 37 years old?"
] | [
"SELECT count(*) FROM technician",
"SELECT Name FROM technician",
"SELECT Name FROM technician WHERE Age = 36 OR Age = 37"
] | Show the name of technicians aged either 36 or 37 | SELECT Name FROM technician WHERE Age = 36 OR Age = 37 | machine_repair |
[
"How many technicians are there?",
"Show me the name of the oldest one.",
"What about his starting year?"
] | [
"SELECT count(*) FROM technician",
"SELECT Name FROM technician ORDER BY Age DESC LIMIT 1",
"SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1"
] | What is the starting year of the oldest technicians? | SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1 | machine_repair |
[
"How many technicians are there?",
"What about in terms of teams?",
"Show me the team with the most of them."
] | [
"SELECT count(*) FROM technician",
"SELECT Team, count(*) FROM technician GROUP BY Team",
"SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1"
] | Please show the team that has the most number of technicians. | SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1 | machine_repair |
[
"How many technicians are there?",
"What about in terms of teams?",
"Show me the teams that have at least two."
] | [
"SELECT count(*) FROM technician",
"SELECT Team, count(*) FROM technician GROUP BY Team",
"SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2"
] | Show the team that have at least two technicians. | SELECT Team FROM technician GROUP BY Team HAVING COUNT(*) >= 2 | machine_repair |
[
"How many repair assignments are there in file?",
"Show me the name of technicians assigned to those repairs.",
"What about the series of machines they repaired?"
] | [
"SELECT count(*) FROM repair_assignment",
"SELECT T2.Name FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID",
"SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID"
] | Show names of technicians and series of machines they are assigned to repair. | SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID | machine_repair |
[
"How many repair assignments are there in file?",
"Show me the name of technicians assigned to those repairs.",
"What about the series of machines they repaired?",
"Show me those machines' quality ranks.",
"Show them in ascending order of quality rank.",
"Only show me the names."
] | [
"SELECT count(*) FROM repair_assignment",
"SELECT T2.Name FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID",
"SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID",
"SELECT T3.Name , T2.Machine_series, T2.quality_rank FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID",
"SELECT T3.Name , T2.Machine_series, T2.quality_rank FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank",
"SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank"
] | Show names of technicians in ascending order of quality rank of the machine they are assigned. | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank | machine_repair |
[
"How many repair assignments are there in file?",
"Show me the name of technicians assigned to those repairs.",
"What about the series of machines they repaired?",
"Show me those with machine's value points higher than 70.",
"Only show me the names."
] | [
"SELECT count(*) FROM repair_assignment",
"SELECT T2.Name FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID",
"SELECT T3.Name , T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID",
"SELECT T3.Name, T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70",
"SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70"
] | Show names of technicians who are assigned to repair machines with value point more than 70. | SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70 | machine_repair |
[
"How many repair assignments are there in file?",
"What about in terms of technicians?",
"Show me their names instead of ids."
] | [
"SELECT count(*) FROM repair_assignment",
"SELECT technician_ID, count(*) FROM repair_assignment GROUP BY technician_ID",
"SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name"
] | Show names of technicians and the number of machines they are assigned to repair. | SELECT T2.Name , COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID = T2.technician_ID GROUP BY T2.Name | machine_repair |
[
"How many repair assignments are there in file?",
"Show me their names.",
"What about the technicians in file who are not one of those?",
"Show me their names."
] | [
"SELECT count(*) FROM repair_assignment",
"SELECT technician_id FROM repair_assignment",
"SELECT technician_id FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)",
"SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)"
] | List the names of technicians who have not been assigned to repair machines. | SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment) | machine_repair |
[
"Show me the grant id for grants where the documents were sent before '1986-08-26 20:49:27'.",
"Which of those grant ended after '1989-03-16 18:27:16'? Show their id.",
"What are the distinct grant amount of these grants?"
] | [
"SELECT T1.grant_id FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27';",
"SELECT T1.grant_id FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_id FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'",
"SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16';"
] | What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'? | SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'; | tracking_grants_for_research |
[
"What are the project details of all projects?",
"Which ones of the result produced patent?",
"Among the current result, which ones also had paper outcome?"
] | [
"SELECT project_details FROM Projects;",
"SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent';",
"SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'"
] | List the project details of the project both producing patent and paper as outcomes. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent' | tracking_grants_for_research |
[
"Show me the grant amount of the organisations described as sponser?",
"How about the organisations described as research?",
"Show me the sum of the result."
] | [
"SELECT grant_amount FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Sponsor';",
"SELECT grant_amount FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research';",
"SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research';"
] | What is the total grant amount of the organisations described as research? | SELECT sum(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'; | tracking_grants_for_research |
[
"Which project hires the most staffs?",
"Who's the leader of this project? Show me the id.",
"What's his from-date and to-date of working?"
] | [
"SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1;",
"SELECT staff_id FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader';",
"SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader';"
] | List from which date and to which date these staff work: project staff of the project which hires the most staffs | SELECT date_from , date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from , date_to FROM Project_Staff WHERE role_code = 'leader'; | tracking_grants_for_research |
[
"Show me the id of organizations involved in less then 3000$ grant amount.",
"How about those with a total of more than 6000$ grants?",
"List their description as well."
] | [
"SELECT T2.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) < 3000;",
"SELECT T2.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000;",
"SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000;"
] | Find the organisation ids and details of the organisations which are involved in more than 6000 grant amount. | SELECT T2.organisation_id , T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount) > 6000; | tracking_grants_for_research |
[
"Which organization has the least number of research staff?",
"How about the one with the most number of research staff?",
"List the organization type together with the result."
] | [
"SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) ASC LIMIT 1;",
"SELECT T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;",
"SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1;"
] | What is the organisation type and id of the organisation which has the most number of research staff? | SELECT T1.organisation_type , T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"Show me all the organization types.",
"Which of those hires the least research staff?",
"How about the one hiring the most research staff?"
] | [
"SELECT organisation_type FROM Organisations;",
"SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) ASC LIMIT 1;",
"SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1;"
] | Which organisation type hires most research staff? | SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1; | tracking_grants_for_research |
[
"Show me the all documents with grant amount more than 5000 dollars.",
"Which of the result were granted by organisation type described research.",
"Show me their send dates."
] | [
"SELECT * FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id WHERE T2.grant_amount > 5000;",
"SELECT * FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'",
"SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'"
] | Find out the send dates of the documents with the grant amount of more than 5000 which were granted by organisation type described research. | SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research' | tracking_grants_for_research |
[
"What're the response received dates for the documents described as 'Initial Application'?",
"How about those granted with more than 100?",
"What are the response received dates for the documents described as 'Regular' or granted with more than 100?"
] | [
"SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T2.document_description = 'Initial Application';",
"SELECT T1.response_received_date FROM Documents AS T1 JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T3.grant_amount > 100;",
"SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100"
] | What are the response received dates for the documents described as 'Regular' or granted with more than 100? | SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100 | tracking_grants_for_research |
[
"Show me the project ids of the projects which did not hire any staff for a leader role.",
"How about those without a researcher role?",
"What are their details?"
] | [
"SELECT project_id FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'leader' )",
"SELECT project_id FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )",
"SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' )"
] | List the project details of the projects which did not hire any staff for a researcher role. | SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code = 'researcher' ) | tracking_grants_for_research |
[
"Show me the task ids for projects detailed as 'omnis'.",
"How about the project id for projects which are detailed as 'omnis' or have more than 2 outcomes?",
"List the corresponding task details and task id as well."
] | [
"SELECT T1.task_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis';",
"SELECT T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2",
"SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2"
] | What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes? | SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details , T1.task_id , T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING count(*) > 2 | tracking_grants_for_research |
[
"Show me all the research outcome.",
"List those described with the substring 'Published' in the result.",
"How about the project details of the result?"
] | [
"SELECT * FROM Research_outcomes;",
"SELECT * FROM Research_outcomes WHERE outcome_description LIKE '%Published%';",
"SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%';"
] | List the project details of the projects with the research outcome described with the substring 'Published'. | SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'; | tracking_grants_for_research |
[
"Show me the number of staff for project with id 1.",
"How about the number of staff each project has? List the project id and the number.",
"Order the result by ascending number of staff."
] | [
"SELECT count(*) FROM Project_Staff WHERE project_id = 1;",
"SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id;",
"SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC;"
] | How many staff does each project has? List the project id and the number in an ascending order. | SELECT T1.project_id , count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC; | tracking_grants_for_research |
[
"Show me the end date of all projects staff.",
"What about the start date?",
"What's the earliest date among the result?"
] | [
"SELECT date_to FROM Project_Staff;",
"SELECT date_from FROM Project_Staff;",
"SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1;"
] | When did the first staff for the projects started working? | SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1; | tracking_grants_for_research |