niryuu/sni-each-converted huggingface dataset:
SQL: SELECT Name , Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Asc LIMIT 3
Feedback: you need to direct population for all the name of country in step 1 and delete continent in step 2.
Output: SELECT Name FROM country ORDER BY Population ASC LIMIT 3
SQL: SELECT Title FROM Cartoon WHERE Written_by = "Ben Jones" OR Directed_by = "Brandon Vietti"
Feedback: Use directed by rather than written by .
Output: SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"
SQL: SELECT Code2 FROM country WHERE Continent = "Asia" GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Need to change code 2 with countrylanguage 's language .
Output: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Continent  =  "Asia" GROUP BY T2.Language ORDER BY COUNT (*) DESC LIMIT 1
SQL: SELECT T1.Airline FROM airlines AS T1 WHERE T1.Abbreviation = "CVO" EXCEPT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = "APG"
Feedback: i want source airport, flights and source airport from step 1, 2 and 3 respectively.
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO" EXCEPT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG"
SQL: SELECT name , date_of_birth FROM Dogs ORDER BY age Desc LIMIT 1
Feedback: for the lowest breed code, give me the name and date of treatment of dogs.
Output: SELECT T1.name ,  T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id WHERE T1.breed_code  =  ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )
SQL: SELECT tourney_name FROM matches WHERE year = 2013 INTERSECT SELECT tourney_name FROM matches WHERE year = 2016
Feedback: Substitute winner name for both tourney name .
Output: SELECT winner_name FROM matches WHERE YEAR  =  2013 INTERSECT SELECT winner_name FROM matches WHERE YEAR  =  2016
SQL: SELECT date_departed , date_of_birth FROM Dogs WHERE gender = 1
Feedback: gender equals 1 to be replaced with treatments table's dog id and date of birth with date arrived .
Output: SELECT DISTINCT T1.date_arrived ,  T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id  =  T2.dog_id
SQL: SELECT Count ( DISTINCT department_name ) FROM Departments
Feedback: I want the departments having department id in degree programs table. 
Output: SELECT count(DISTINCT department_id) FROM Degree_Programs
SQL: SELECT T1.hand , Count ( * ) FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id
Feedback: Substitute loser id with hand in step 2.
Output: SELECT count(*) ,  hand FROM players GROUP BY hand
SQL: SELECT Count ( * ) FROM Pets WHERE PetType = "F" AND pet_age = 3
Feedback: i want the number of rows of has pet table whose pet type is dog and sex is female.
Output: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T2.petid  =  T3.petid WHERE T1.sex  =  'F' AND T3.pettype  =  'dog'
SQL: SELECT T1.StuID FROM Student AS T1 EXCEPT SELECT T2.StuID FROM Has_Pet AS T2
Feedback: Find student id of has pet whose pet type equals cat in Step 2.
Output: SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat'
SQL: SELECT name FROM Highschooler WHERE grade > 2 INTERSECT SELECT name FROM Highschooler WHERE grade < 5
Feedback: Exchange " 2" with " 5" , grade with Friend's student id greater than or equals 2 in step 2.
Output: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.grade  >  5 GROUP BY T1.student_id HAVING count(*)  >=  2
SQL: SELECT Count ( * ) FROM airlines
Feedback: flights table should be use in place of airlines table .
Output: SELECT count(*) FROM FLIGHTS
SQL: SELECT T1.series_name , T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = "Ben Jones" AND T2.Directed_by = "Michael Chang"
Feedback: Use directed by instead of written by .
Output: SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Michael Chang' INTERSECT SELECT T1.series_name ,  T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by  =  'Ben Jones'
SQL: SELECT T1.District FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = "T" AND T2.LocalName = "Chinese"
Feedback: In step 2 swap district , continent and local name with city , is official and language respectively , ensure continent is Asia .
Output: SELECT DISTINCT T3.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode JOIN city AS T3 ON T1.Code  =  T3.CountryCode WHERE T2.IsOfficial  =  'T' AND T2.Language  =  'Chinese' AND T1.Continent  =  "Asia"
SQL: SELECT name FROM Highschooler GROUP BY grade , grade HAVING Count ( * ) > = 3
Feedback: In step 1, you need student id in friend table and grade in high schooler table.
Output: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  3
SQL: SELECT Count ( * ) FROM airports WHERE Country = "ATO"
Feedback: you need to interchange airports table which has country to flights table which has destairport.
Output: SELECT count(*) FROM FLIGHTS WHERE DestAirport  =  "ATO"
SQL: SELECT tourney_name , loser_rank FROM matches GROUP BY winner_entry ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You should use winner's name and winner's rank instead of tourney's name and loser's rank respectively.
Output: SELECT winner_name ,  winner_rank_points FROM matches GROUP BY winner_name ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( DISTINCT Code2 ) FROM country WHERE IndepYear < 1930
Feedback: Replace code 2 in country with language in countrylanguage and Ensure corresponding is official equals T .
Output: SELECT count(DISTINCT T2.Language) FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE  IndepYear  <  1930 AND T2.IsOfficial  =  "T"
SQL: SELECT Sum ( SurfaceArea ) FROM country WHERE Continent = "Europe" AND Continent = "Asia"
Feedback: Incomplete feedback, so cannot form the sentence.
Output: SELECT sum(SurfaceArea) FROM country WHERE Continent  =  "Asia" OR Continent  =  "Europe"
SQL: SELECT T1.first_name , T1.country_code , T2.loser_age FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_rank Desc LIMIT 1
Feedback: Use birth date instead of loser age and winner rank points instead of winner rank .
Output: SELECT T1.first_name ,  T1.country_code ,  T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id  =  T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
SQL: SELECT Template_Type_Code FROM Templates GROUP BY Template_Type_Code ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Change templates table with documents in step 1.
Output: SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Avg ( T1.Maker ) FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Year < 1980
Feedback: Exchange maker with horsepower in step 2.
Output: SELECT avg(horsepower) FROM CARS_DATA WHERE YEAR  <  1980
SQL: SELECT property_type_description FROM Ref_Property_Types
Feedback: You need to mention code of property type.
Output: SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code  =  T2.property_type_code GROUP BY T1.property_type_code
SQL: SELECT Count ( * ) FROM airlines WHERE Airline = "Aberdeen" AND Airline = "Ashley"
Feedback: Exchange airlines with flights table and 1st airline with destination airport and 2nd airline with source airport .
Output: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport  =  T3.AirportCode WHERE T2.City  =  "Ashley" AND T3.City  =  "Aberdeen"
SQL: SELECT Continent , Count ( * ) FROM continents GROUP BY Continent
Feedback: It should be number of the corresponding rows for each continent in car makers .
Output: SELECT T1.Continent ,  count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId  =  T2.continent JOIN car_makers AS T3 ON T2.CountryId  =  T3.Country GROUP BY T1.Continent
SQL: SELECT Count ( * ) FROM Templates WHERE Template_Type_Code = "PPT"
Feedback: I want table of documents.
Output: SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID  =  T2.Template_ID WHERE T2.Template_Type_Code  =  'PPT'
SQL: SELECT first_name FROM Students UNION SELECT first_name FROM Students
Feedback: You need to search the first name from student table and also make sure that permanent address Id does not contains ID of current address.
Output: SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
SQL: SELECT Count ( * ) , winner_rank FROM matches GROUP BY winner_rank
Feedback: I need date of ranking in rankings table.
Output: SELECT sum(tours) ,  ranking_date FROM rankings GROUP BY ranking_date
SQL: SELECT name FROM Highschooler WHERE grade = "Kyle"
Feedback: search Names of high schooler who are friend of Kyle whose id present in friend table .
Output: SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id JOIN Highschooler AS T3 ON T1.friend_id  =  T3.id WHERE T2.name  =  "Kyle"
SQL: SELECT Count ( * ) FROM country WHERE LocalName = "Spanish"
Feedback: Use language instead of local name .
Output: SELECT count(*) ,   max(Percentage) FROM countrylanguage WHERE LANGUAGE  =  "Spanish" GROUP BY CountryCode
SQL: SELECT Cylinders FROM cars_data ORDER BY Accelerate Asc LIMIT 1
Feedback: Make sure that car model name is volvo.
Output: SELECT T1.cylinders FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T2.Model  =  'volvo' ORDER BY T1.accelerate ASC LIMIT 1
SQL: SELECT T1.Content FROM TV_Channel AS T1 EXCEPT SELECT T1.Content FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = "Ben Jones"
Feedback: You should use directed by and id instead of written by and content respectively.
Output: SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones'
SQL: SELECT Max ( Population ) , Min ( GNP ) FROM country
Feedback: Find summation of population and maximum gnp in country table whose continent equals Asia .
Output: SELECT sum(Population) ,  max(GNP) FROM country WHERE Continent  =  "Asia"
SQL: SELECT Template_Type_Code FROM Templates EXCEPT SELECT Template_Type_Code FROM Templates
Feedback: steps 1 and 2 change template type code with template id , In step 3 find corresponding template type code of the result .
Output: SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id
SQL: SELECT Count ( * ) FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = "United Airlines" AND T1.Airline = "ASY"
Feedback: you have to use airlines of airline table and destination airport instead of country of airports table and airports name respectively.also use flights table in step 1.
Output: SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline  =  T1.uid WHERE T1.Airline  =  "United Airlines" AND T2.DestAirport  =  "ASY"
SQL: SELECT T1.Name , T2.Year_of_Founded FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID
Feedback: The year of founded is wrong , orchestra should be there .
Output: SELECT T1.Name ,  T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID  =  T2.Conductor_ID
SQL: SELECT Document_Name , Document_ID FROM Documents WHERE Document_Description LIKE "w"
Feedback: document id is wrong . Put template id in place of it .
Output: SELECT document_name ,  template_id FROM Documents WHERE Document_Description LIKE "%w%"
SQL: SELECT Sum ( GNP ) , Sum ( Population ) FROM country WHERE Continent = "US Territory"
Feedback: Instead of "summation of GNP" , Use "Average of GNP".
Output: SELECT avg(GNP) ,  sum(population) FROM country WHERE GovernmentForm  =  "US Territory"
SQL: SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Look for the degree summary name which have program id maximum number of time in student enrolment table.
Output: SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.AirportName = "AHD"
Feedback: in step 1, you need to use table of flights and in step 2 you need to use source airport.
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "AHD"
SQL: SELECT other_details FROM Student_Enrolment ORDER BY other_details Desc
Feedback: You should use other student details and student table instead of other details and student enrolment table respectively.
Output: SELECT other_student_details FROM Students ORDER BY other_student_details DESC
SQL: SELECT Avg ( Population ) FROM country WHERE Continent NOT IN ( SELECT Continent FROM country WHERE LocalName = "English" )
Feedback: in step 1 , i want the name, language of countrylanguage , life expectancy , make sure t equivalent with the is official of countrylanguage.
Output: SELECT avg(LifeExpectancy) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" AND T2.IsOfficial  =  "T")
SQL: SELECT Max ( student_course_id ) , course_id FROM Student_Enrolment_Courses GROUP BY course_id
Feedback: I want the number of time course apperaed in transcription contents.
Output: SELECT count(*) ,  student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Airline FROM airlines GROUP BY Airline ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You need to interchange flights table for airlines table in step 1.
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) , T1.Name FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID
Feedback: Replace hiring's shop id with shop's name and find corresponding rows in hiring table .
Output: SELECT count(*) ,  t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id  =  t2.shop_id GROUP BY t2.name
SQL: SELECT Document_ID FROM Documents WHERE Document_Description = "Presentation"
Feedback: Find template id of templates table for which template type description equals Presentation .
Output: SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code WHERE T1.template_type_description  =  "Presentation"
SQL: SELECT course_name FROM Courses GROUP BY course_name ORDER BY Count ( * ) Desc LIMIT 1
Feedback: you should use course Id from student enrolment courses table in step 1.
Output: SELECT  T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.name FROM Highschooler AS T1 JOIN Friend AS T2 ON T1.ID = T2.student_id GROUP BY T2.student_id HAVING Count ( * ) > = 2
Feedback: Likes table should be used as replacement of friend table in 1st step.
Output: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id HAVING count(*)  >=  2
SQL: SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Name = "English" ORDER BY T1.Population Desc LIMIT 1
Feedback: Exchange name of the country table with language of countrylanguage table in step 2. In step 1, equivalence to countrylanguage also.
Output: SELECT T1.Name ,  T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode  =  T2.CountryCode WHERE T2.Language  =  "English" ORDER BY T1.Population DESC LIMIT 1
SQL: SELECT T1.Code FROM country AS T1 WHERE T1.Continent = ( SELECT T2.CountryCode FROM countrylanguage AS T2 WHERE T2.Language = "Republic" ) EXCEPT SELECT T1.Code FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English"
Feedback: You should use government form instead of language and also make sure that value should not be in the result of step 2 and 4.
Output: SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
SQL: SELECT Name FROM teacher EXCEPT SELECT Name FROM teacher
Feedback: In step 2 show teacher's name whose teacher id is present under course arrange table .
Output: SELECT Name FROM teacher WHERE Teacher_id NOT IN (SELECT Teacher_id FROM course_arrange)
SQL: SELECT Min ( Weight ) FROM cars_data WHERE Year = 1
Feedback: make sure year should be 1974 and cylinders equivalent with 8.
Output: SELECT Weight FROM CARS_DATA WHERE Cylinders  =  4 AND YEAR  =  1974 ORDER BY Weight ASC LIMIT 1
SQL: SELECT transcript_date , other_details FROM Transcripts
Feedback: Provide me the id of transcript and also look for the lowest value of transcript date. 
Output: SELECT transcript_date ,  other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
SQL: SELECT * FROM Treatments ORDER BY date_of_treatment Asc LIMIT 1
Feedback: Provide largest value not smallest value of date .
Output: SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1
SQL: SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = "T" EXCEPT SELECT T1.Name FROM city AS T1 JOIN country AS T2 ON T1.CountryCode = T2.Code WHERE T2.Continent = "Europe"
Feedback: make sure that English should be language and f should be the is official in step 2 , include countrylanguageb table , need to view both results.
Output: SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode  =  T1.Code WHERE T1.Continent  =  'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code  =  T4.CountryCode WHERE T4.IsOfficial  =  'T' AND T4.Language  =  'English')
SQL: SELECT first_name FROM Students WHERE cell_mobile_number LIKE "Haiti" UNION SELECT first_name FROM Students WHERE cell_mobile_number = 09700166582
Feedback: I want permanent address whose Addresses' country is Haiti in step 1.
Output: SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id  =  T2.address_id WHERE T2.country  =  'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number  =  '09700166582'
SQL: SELECT Count ( * ) FROM cars_data WHERE Cylinders > 150
Feedback: Supersede cylinders with horsepower .
Output: SELECT count(*) FROM CARS_DATA WHERE horsepower  >  150
SQL: SELECT Continent FROM country WHERE Code2 = "T" INTERSECT SELECT Continent FROM country WHERE Code2 = "French"
Feedback: Replace continent with name name , code 2 with language , ensure is official equals T in both steps , T with English(step 1).
Output: SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" AND T2.IsOfficial  =  "T" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "French" AND T2.IsOfficial  =  "T"
SQL: SELECT T1.Name , Sum ( T2.Sales ) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T2.Singer_ID
Feedback: Display name of singer.
Output: SELECT T1.Name ,  sum(T2.Sales) FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID  =  T2.Singer_ID GROUP BY T1.Name
SQL: SELECT Avg ( loser_age ) , Avg ( loser_age ) FROM matches
Feedback: Supersede one of the loser age with winner age .
Output: SELECT avg(loser_age) ,  avg(winner_age) FROM matches
SQL: SELECT Count ( * ) FROM city
Feedback: determine the number of rows of country table, where continent is asia.
Output: SELECT count(*) FROM country WHERE continent  =  "Asia"
SQL: SELECT DISTINCT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id WHERE T3.Weight > 3500 EXCEPT SELECT T1.Model FROM car_makers AS T4 JOIN model_list AS T1 ON T4.Id = T1.Maker WHERE T4.Maker = "Ford Motor Company"
Feedback: In step 2 replace greater with less , in step 4 replace maker with full name .
Output: SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model  =  T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId  =  T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker  =  T4.Id WHERE T3.weight  <  3500 AND T4.FullName != 'Ford Motor Company'
SQL: SELECT Count ( * ) FROM car_makers WHERE Country = "usa"
Feedback: Switch country with country name .
Output: SELECT count(*) FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker  =  T2.Id JOIN COUNTRIES AS T3 ON T2.Country  =  T3.CountryId WHERE T3.CountryName  =  'usa'
SQL: SELECT Count ( * ) FROM Highschooler WHERE grade = "Kyle"
Feedback: Looking for number of rows of friend table for Kyle.
Output: SELECT count(*) FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"
SQL: SELECT first_name , middle_name , last_name FROM Students
Feedback: Make sure that student are enrolled in Bachelor degree programs.
Output: SELECT DISTINCT T1.first_name ,  T1.middle_name ,  T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id  =  T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id  =  T3.degree_program_id WHERE T3.degree_summary_name  =  'Bachelor'
SQL: SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID ORDER BY T2.Year_of_Founded Desc LIMIT 1
Feedback: It should be year of work , not year of founded in step 2.
Output: SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Ref_Template_Types
Feedback: You need to use table of documents.
Output: SELECT count(*) FROM Documents
SQL: SELECT T1.Name , T1.District FROM shop AS T1 JOIN hiring AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T2.Shop_ID ORDER BY Count ( * ) Desc LIMIT 1
Feedback: manager name not name and use number products instead of step 2 results
Output: SELECT manager_name ,  district FROM shop ORDER BY number_products DESC LIMIT 1
SQL: SELECT semester_name , semester_id FROM Semesters GROUP BY semester_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Replace semesters table with student enrolment table in step 1.
Output: SELECT T1.semester_name ,  T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id  =  T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT line_1 FROM Addresses WHERE line_1 = "2294 Grant Square Apt. 235" INTERSECT SELECT line_1 FROM Addresses WHERE line_1 = "2294 Grant Square Apt. 235"
Feedback: Remove second part in both step and change line 1 with line 2 in step2.
Output: SELECT line_1 ,  line_2 FROM addresses
SQL: SELECT Count ( * ) FROM Pets WHERE pet_age > 20
Feedback: Put has pet table and age instead of pets table and pet age .
Output: SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid WHERE T1.age  >  20
SQL: SELECT Name FROM singer WHERE Citizenship = 1949 OR Citizenship = 1948
Feedback: There should be birth year instead of citizenship .
Output: SELECT Name FROM singer WHERE Birth_Year  =  1948 OR Birth_Year  =  1949
SQL: SELECT course_id , course_description FROM Courses GROUP BY course_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You have to reconstitute using degree program id, student enrollment, degree's summary name and degree programs.
Output: SELECT T1.degree_program_id ,  T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Departments WHERE department_name = "engineer"
Feedback: Use degree programs table instead of departments table.
Output: SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id  =  T2.department_id WHERE T1.department_name  =  'engineer'
SQL: SELECT Document_ID FROM Documents WHERE Document_Name LIKE "Ireland"
Feedback: Change document name with paragraph text and Ensure that paragraph text equals Brazil and paragraph text equals Ireland .
Output: SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text  =  'Ireland'
SQL: SELECT Code FROM country WHERE LocalName = "Spanish"
Feedback: Also ensure that countrylanguage's is official equals T .
Output: SELECT CountryCode ,  max(Percentage) FROM countrylanguage WHERE LANGUAGE  =  "Spanish" GROUP BY CountryCode
SQL: SELECT T1.Package_Option FROM TV_Channel AS T1 EXCEPT SELECT T1.Package_Option FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = "Ben Jones"
Feedback: You need to use directed by instead of written by.
Output: SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by  =  'Ben Jones')
SQL: SELECT Template_ID , Version_Number , Template_Type_Code , Template_Type_Code FROM Templates
Feedback: Remove extra template type code .
Output: SELECT template_id ,  version_number ,  template_type_code FROM Templates
SQL: SELECT Name FROM people
Feedback: Specify people's people id is present in poker player table .
Output: SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID
SQL: SELECT FullName , Maker FROM car_makers ORDER BY FullName Asc LIMIT 1
Feedback: you need to use year in-place of both the full name.
Output: SELECT T2.Make ,  T1.Year FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id  =  T2.MakeId WHERE T1.Year  =  (SELECT min(YEAR) FROM CARS_DATA)
SQL: SELECT SurfaceArea FROM country WHERE Name = "Caribbean"
Feedback: we need to determine the total of surface area and exchange name using region.
Output: SELECT sum(SurfaceArea) FROM country WHERE Region  =  "Caribbean"
SQL: SELECT Name , SurfaceArea FROM country ORDER BY Population Desc LIMIT 5
Feedback: i want surface area instead of population.
Output: SELECT Name ,  SurfaceArea FROM country ORDER BY SurfaceArea DESC LIMIT 5
SQL: SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 10
Feedback: In step 1 Swap airlines table with flights table .
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  >  10
SQL: SELECT age FROM Dogs ORDER BY age Asc LIMIT 1
Feedback: There should be largest value of age instead of smallest value of age .
Output: SELECT max(age) FROM Dogs
SQL: SELECT T1.ID FROM Highschooler AS T1 EXCEPT SELECT T2.liked_id FROM Likes AS T2
Feedback: In Step 2 Supplant liked id of likes table with student id of friend Table .
Output: SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend
SQL: SELECT Name , Capacity FROM stadium GROUP BY Stadium_ID ORDER BY Avg ( Average ) Desc LIMIT 1
Feedback: No need to find average of all average .
Output: SELECT name ,  capacity FROM stadium ORDER BY average DESC LIMIT 1
SQL: SELECT T1.Fname FROM Student AS T1 JOIN Has_Pet AS T2 ON T1.StuID = T2.StuID JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = "cat" INTERSECT SELECT T2.StuID FROM Has_Pet AS T2 JOIN Pets AS T3 ON T2.PetID = T3.PetID WHERE T3.PetType = "dog"
Feedback: i want the age of pet and last name from student table having pet type cat and dog.
Output: SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat' INTERSECT SELECT T1.Fname FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog'
SQL: SELECT Count ( * ) FROM Ref_Template_Types
Feedback: Here need to count number of rows of paragraphs table instead of reference template types table .
Output: SELECT count(*) FROM Paragraphs
SQL: SELECT country_code FROM players WHERE player_id > 50
Feedback: Find each value of player's country code with number of corresponding rows of each value .
Output: SELECT country_code FROM players GROUP BY country_code HAVING count(*)  >  50
SQL: SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > = 2 INTERSECT SELECT T3.MakeId , T1.Maker FROM car_makers AS T1 JOIN model_list AS T2 ON T1.Id = T2.Maker AND T1.Id = T2.Maker JOIN car_names AS T3 ON T2.Model = T3.Model WHERE T2.Model > 3
Feedback: In step 3, you need to make sure that number of cars should be more than 3 and keep Id in both step.
Output: SELECT T1.Id ,  T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker GROUP BY T1.Id HAVING count(*)  >=  2 INTERSECT SELECT T1.Id ,  T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker JOIN CAR_NAMES AS T3 ON T2.model  =  T3.model GROUP BY T1.Id HAVING count(*)  >  3
SQL: SELECT CountryName FROM countries EXCEPT SELECT CountryName FROM countries
Feedback: from step 2, i want country of car makers table.
Output: SELECT CountryName FROM countries EXCEPT SELECT T1.CountryName FROM countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.countryId  =  T2.Country
SQL: SELECT T1.Model FROM model_list AS T1 JOIN car_names AS T2 ON T1.Model = T2.Model JOIN cars_data AS T3 ON T2.MakeId = T3.Id ORDER BY T3.Accelerate Asc LIMIT 1
Feedback: Swap accelerate with horsepower .
Output: SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id ORDER BY T2.horsepower ASC LIMIT 1
SQL: SELECT Country , Id FROM car_makers GROUP BY Country HAVING Count ( * ) > = 1
Feedback: Substitute country , id , car makers table with country name , country id , countries table in step 2.
Output: SELECT T1.CountryName ,  T1.CountryId FROM COUNTRIES AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country GROUP BY T1.CountryId HAVING count(*)  >=  1
SQL: SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = "APG" INTERSECT SELECT T1.Airline FROM airlines AS T1 JOIN airports AS T2 WHERE T2.Country = "CVO"
Feedback: Exchange country with airport code in both step 2 and step 3.
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "APG" INTERSECT SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline WHERE T2.SourceAirport  =  "CVO"
SQL: SELECT Count ( DISTINCT Code2 ) FROM country WHERE Continent = "Africa"
Feedback: The code 2 is wrong . It should be government form instead .
Output: SELECT count(DISTINCT GovernmentForm) FROM country WHERE Continent  =  "Africa"
SQL: SELECT Count ( * ) FROM Highschooler WHERE name = "Kyle"
Feedback: Find number of rows in likes table whose student id's corresponding Highschooler's name equals Kyle .
Output: SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id WHERE T2.name  =  "Kyle"
SQL: SELECT Channel FROM TV_series GROUP BY Channel HAVING Count ( * ) > 2
Feedback: Instead of channel , tv series table use TV Channel's id , tv channel table in step 2.
Output: SELECT id FROM tv_channel GROUP BY country HAVING count(*)  >  2
SQL: SELECT DISTINCT id , name FROM ship WHERE ship_type = "Brig"
Feedback: Need to swap ship table with battle table .
Output: SELECT DISTINCT T1.id ,  T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.ship_type  =  'Brig'
SQL: SELECT Max ( Cylinders ) , Accelerate FROM cars_data GROUP BY Cylinders
Feedback: you need to search for highest accelerate.
Output: SELECT max(Accelerate) ,  Cylinders FROM CARS_DATA GROUP BY Cylinders
SQL: SELECT Hight_definition_TV , Country FROM TV_Channel WHERE Language ! = "English"
Feedback: Rather than hight definition tv , Use pixel aspect ratio par .
Output: SELECT Pixel_aspect_ratio_PAR ,  country FROM tv_channel WHERE LANGUAGE != 'English'
SQL: SELECT Avg ( LifeExpectancy ) FROM country WHERE Continent = "Central Africa"
Feedback: Switch continent with region .
Output: SELECT avg(LifeExpectancy) FROM country WHERE Region  =  "Central Africa"
SQL: SELECT Count ( * ) FROM countrylanguage AS T1 WHERE T1.Language = "English" INTERSECT SELECT T2.Continent FROM country AS T2 JOIN countrylanguage AS T1 ON T2.Code = T1.CountryCode WHERE T1.Language = "Dutch"
Feedback: Exchange countrylanguage table with country table in step 1 and continent with country table .
Output: SELECT COUNT(*) FROM (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" INTERSECT SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "Dutch")
SQL: SELECT Model FROM model_list GROUP BY Model ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1, you can use table of car names.
Output: SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.AirportCode FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport ORDER BY T2.FlightNo Desc LIMIT 1
Feedback: airport code should be present most number of times as source airport or destination airport in flights .
Output: SELECT T1.AirportCode FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport OR T1.AirportCode  =  T2.SourceAirport GROUP BY T1.AirportCode ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.Name , Count ( * ) FROM teacher AS T1 JOIN course_arrange AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Teacher_ID
Feedback: Also need to find teacher's name .
Output: SELECT T2.Name ,  COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID  =  T2.Teacher_ID GROUP BY T2.Name
SQL: SELECT Max ( Weight ) FROM cars_data WHERE Cylinders = 1
Feedback: Replace weight with horsepower , also find corresponding car names's make , and ensure cylinders equals 3
Output: SELECT T2.horsepower ,  T1.Make FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId  =  T2.Id WHERE T2.cylinders  =  3 ORDER BY T2.horsepower DESC LIMIT 1
SQL: SELECT Template_Details , Template_Type_Code FROM Templates WHERE Version_Number > 5
Feedback: Need to change template details with version number .
Output: SELECT version_number ,  template_type_code FROM Templates WHERE version_number  >  5
SQL: SELECT T1.id , T1.name FROM ship AS T1 JOIN death AS T2 ON T1.id = T2.caused_by_ship_id GROUP BY T2.id ORDER BY Sum ( T2.injured ) Desc LIMIT 1
Feedback: use caused by ship id in step 2 instead of id
Output: SELECT T2.id ,  T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id  =  T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Name FROM country ORDER BY LifeExpectancy Asc LIMIT 1
Feedback: Verify continent equals Asia .
Output: SELECT Name FROM country WHERE Continent  =  "Asia" ORDER BY LifeExpectancy LIMIT 1
SQL: SELECT T2.first_name , T2.last_name FROM Charges AS T1 JOIN Professionals AS T2 WHERE T1.charge_amount < ( SELECT Avg ( T1.charge_amount ) FROM Charges AS T1 )
Feedback: Change charge amount in charges with cost of treatment of treatments in step 1 and charge amount with Treatments's cost of treatment in step 3.
Output: SELECT DISTINCT T1.first_name ,  T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment  <  ( SELECT avg(cost_of_treatment) FROM Treatments )
SQL: SELECT first_name , last_name , owner_id FROM Owners
Feedback: Replace owner id with corresponding Dogs's size code .
Output: SELECT T1.first_name ,  T1.last_name ,  T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id
SQL: SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = "Michael Jelenic" EXCEPT SELECT T1.Country FROM TV_Channel AS T1 JOIN Cartoon AS T2 ON T1.id = T2.Channel WHERE T2.Written_by = "Todd Casey" AND T2.Directed_by = "Ben Jones"
Feedback: We need to determine the country which is not written by Todd Casey.
Output: SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by  =  'Todd Casey'
SQL: SELECT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )
Feedback: in step 2, the student id should only be dogs.
Output: SELECT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid JOIN pets AS T3 ON T3.petid  =  T2.petid WHERE T3.pettype  =  'cat')
SQL: SELECT T1.Earnings FROM poker_player AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height Desc LIMIT 1
Feedback: Use money rank in place of earnings.
Output: SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Height DESC LIMIT 1
SQL: SELECT semester_name FROM Semesters WHERE semester_name = "Master" INTERSECT SELECT semester_name FROM Semesters WHERE semester_description = "Bachelor"
Feedback: You should use degree summary name in place of second semester name and semester description of step 1 and 2 respectively.
Output: SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id  =  T2.degree_program_id WHERE degree_summary_name  =  'Bachelor'
SQL: SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = "Virginia" AND T2.name = "Kacey"
Feedback: In step 2 also find name , and remove "and name equals Kacey" phrase .
Output: SELECT T1.first_name ,  T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id WHERE T1.state  =  'Virginia'
SQL: SELECT Name , Country , Age FROM singer ORDER BY Age Asc
Feedback: You have to interchange ascending with descending.
Output: SELECT name ,  country ,  age FROM singer ORDER BY age DESC
SQL: SELECT Count ( * ) FROM players
Feedback: Players table can be replace by matches table.
Output: SELECT count(*) FROM matches
SQL: SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > "fiat" UNION SELECT CountryId , CountryName FROM countries GROUP BY CountryId HAVING Count ( * ) > 3
Feedback: In step 1 car makers's model id , in step 2 needs model equals fiat , step 4 with step 3 in step 4.
Output: SELECT T1.countryId ,  T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country GROUP BY T1.countryId HAVING count(*)  >  3 UNION SELECT T1.countryId ,  T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId  =  T2.Country JOIN MODEL_LIST AS T3 ON T2.Id  =  T3.Maker WHERE T3.Model  =  'fiat'
SQL: SELECT Template_ID FROM Documents GROUP BY Template_ID HAVING Count ( * ) > = 2
Feedback: Replace template id , documents table with document id , paragraphs table In step 1 and template id with document id in Step 2.
Output: SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*)  >=  2
SQL: SELECT Count ( * ) FROM airlines WHERE Airline = "JetBlue Airways"
Feedback: Replace airlines table with flights table , ensure airlines's airline equals JetBlue Airways .
Output: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T1.Airline  =  T2.uid WHERE T2.Airline = "JetBlue Airways"
SQL: SELECT course_name FROM Courses
Feedback: Ensure that course id of courses table present in course id of student enrolment courses table .
Output: SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id  =  T2.course_id
SQL: SELECT Count ( * ) FROM airlines
Feedback: Airlines table should be used in place of airports table.
Output: SELECT count(*) FROM AIRPORTS
SQL: SELECT DISTINCT Template_Type_Description FROM Ref_Template_Types
Feedback: Ensure that template is used in a Document .
Output: SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code  = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID  =  T3.template_ID
SQL: SELECT DISTINCT email_address FROM Students
Feedback: Exchange email address with current address id .
Output: SELECT count(DISTINCT current_address_id) FROM Students
SQL: SELECT Count ( * ) FROM Ref_Feature_Types
Feedback: feature not feature types
Output: SELECT count(*) FROM Other_Available_Features
SQL: SELECT loser_rank FROM matches
Feedback: Provide me the rank of loser repeating frequently.
Output: SELECT min(loser_rank) FROM matches
SQL: SELECT T2.Other_Details FROM Documents AS T1 JOIN Paragraphs AS T2 ON T1.Document_ID = T2.Document_ID WHERE T1.Document_Name LIKE "Korea"
Feedback: Use paragraph text in step 2 and omit name of document.
Output: SELECT Other_Details FROM Paragraphs WHERE paragraph_text  =  'Korea'
SQL: SELECT course_name , course_id FROM Courses GROUP BY course_id HAVING Count ( * ) < = 2
Feedback: In step 1 exchange courses with sections .
Output: SELECT T1.course_name ,  T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_id HAVING count(*)  <=  2
SQL: SELECT T1.treatment_type_code FROM Treatment_Types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T2.treatment_type_code ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Find charge type of charges table with largest value of charge amount .
Output: SELECT max(charge_amount) FROM Charges
SQL: SELECT name FROM Highschooler INTERSECT SELECT name FROM Highschooler
Feedback: In step 1 ensure corresponding student id present in friend , in step 2 corresponding student id present in likes .
Output: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id
SQL: SELECT Count ( DISTINCT Episode ) , Count ( * ) FROM TV_series
Feedback: You need to search different name of series and content in tv channel table.
Output: SELECT count(DISTINCT series_name) ,  count(DISTINCT content) FROM TV_Channel
SQL: SELECT SurfaceArea , Population FROM country
Feedback: Substitute surface area with region and specify that Country's name name equals Angola .
Output: SELECT Population ,  Region FROM country WHERE Name  =  "Angola"
SQL: SELECT Count ( * ) FROM stadium
Feedback: Replace stadium table with singer table .
Output: SELECT count(*) FROM singer
SQL: SELECT Sum ( Population ) FROM country WHERE Continent ! = "English"
Feedback: The "Continent" is wrong , Use countrylanguage's language instead .
Output: SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English")
SQL: SELECT Count ( * ) FROM airports WHERE City = "Aberdeen"
Feedback: make sure that destination airport code is equal to aberdeen and use flights.
Output: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
SQL: SELECT professional_id , last_name , home_phone FROM Professionals WHERE state = "Indiana" UNION SELECT professional_id , last_name , home_phone FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2
Feedback: Exchange home phone with cell number in both step 1 and 3 and professionals table with treatments table in step 2.
Output: SELECT professional_id ,  last_name ,  cell_number FROM Professionals WHERE state  =  'Indiana' UNION SELECT T1.professional_id ,  T1.last_name ,  T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >  2
SQL: SELECT professional_id , role_code , first_name FROM Professionals GROUP BY professional_id HAVING Count ( * ) > = 2
Feedback: You should make use of treatments table in step 1 and omit professionals table.
Output: SELECT T1.professional_id ,  T1.role_code ,  T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id  =  T2.professional_id GROUP BY T1.professional_id HAVING count(*)  >=  2
SQL: SELECT Document_ID , Count ( * ) FROM Paragraphs GROUP BY Document_ID ORDER BY Count ( * ) Asc
Feedback: order by document id
Output: SELECT document_id ,  count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id
SQL: SELECT T1.name FROM Highschooler AS T1 WHERE T1.ID NOT IN ( SELECT T2.student_id FROM Likes AS T2 )
Feedback: You have to use friend table in step 1.
Output: SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id
SQL: SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = "Lettice" AND T2.name = "HMS Atalanta"
Feedback: HMS Atalanta and Lettice both should not be the name.
Output: SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'Lettice' INTERSECT SELECT T1.name ,  T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id  =  T2.lost_in_battle WHERE T2.name  =  'HMS Atalanta'
SQL: SELECT AirportName FROM airports WHERE AirportName = "AKO"
Feedback: Exchange 2nd airport name with airport code .
Output: SELECT AirportName FROM AIRPORTS WHERE AirportCode  =  "AKO"
SQL: SELECT Year_of_Founded FROM orchestra GROUP BY Year_of_Founded HAVING Count ( * ) > 1
Feedback: In step 1 , substitute orchestra id in performance table in place of year of founded in orchestra table .
Output: SELECT Year_of_Founded FROM orchestra AS T1 JOIN performance AS T2 ON T1.Orchestra_ID  =  T2.Orchestra_ID GROUP BY T2.Orchestra_ID HAVING COUNT(*)  >  1
SQL: SELECT Count ( * ) FROM car_makers WHERE Maker = "American Motor Company"
Feedback: Find number of rows of model list table whose corresponding car makers's maker equals American Motor Company .
Output: SELECT count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id  =  T2.Maker WHERE T1.FullName  =  'American Motor Company'
SQL: SELECT DISTINCT T1.Fname , T1.Age FROM Student AS T1 WHERE T1.StuID NOT IN ( SELECT T2.StuID FROM Has_Pet AS T2 )
Feedback: should be one of the results in step 1
Output: SELECT DISTINCT T1.fname ,  T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid
SQL: SELECT T1.Name , T1.Capacity FROM stadium AS T1 JOIN concert AS T2 ON T1.Stadium_ID = T2.Stadium_ID WHERE T2.Year > 2014 GROUP BY T1.Stadium_ID ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Ensure year greater than 2013 in step 2
Output: SELECT T2.name ,  T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id  =  T2.stadium_id WHERE T1.year  >=  2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Continent FROM country GROUP BY Continent ORDER BY Count ( * ) Desc LIMIT 1
Feedback: i want the continent where highest number of different languages are spoken.
Output: SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM battle WHERE result = "Captured"
Feedback: Take ship table and disposition of ship in place of battle table and result .
Output: SELECT count(*) FROM ship WHERE disposition_of_ship  =  'Captured'
SQL: SELECT Count ( * ) FROM performance WHERE Type > = "CD"
Feedback: Supersede 'performance' with 'orchestra' and 'Type greater than or' with 'Major Record Format' CD or DVD .
Output: SELECT COUNT(*) FROM orchestra WHERE Major_Record_Format  =  "CD" OR Major_Record_Format  =  "DVD"
SQL: SELECT Continent FROM country WHERE IndepYear > 1950
Feedback: i want name rather than continent.
Output: SELECT Name FROM country WHERE IndepYear  >  1950
SQL: SELECT * FROM employee
Feedback: hiring table should be use in place of employee table .
Output: SELECT * FROM hiring
SQL: SELECT Avg ( age ) FROM Dogs WHERE gender = 1
Feedback: Ensure that dog id should be detect in treatment table.
Output: SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )