niryuu/sni-each-converted huggingface dataset:
SQL: SELECT problem_id FROM Problems
Feedback: Ensure corresponding date problem reported is beyond largest value of date problem reported by Rylan Homenick of staff table .
Output: SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  >  ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick" )
SQL: SELECT Avg ( T1.duration ) FROM trip AS T1 JOIN weather AS T2 WHERE T2.min_temperature_f > 50
Feedback: Find the date whose average max humidity greater than 50 and average max visibility miles greater than 8.
Output: SELECT COUNT(*) FROM weather WHERE mean_humidity  >  50 AND mean_visibility_miles  >  8
SQL: SELECT Count ( * ) FROM Student WHERE Sex = "HKG" OR city_code = "CHI"
Feedback: sex is to be replaced with city code .
Output: SELECT count(*) FROM Student WHERE city_code  =  "HKG" OR city_code  =  "CHI"
SQL: SELECT Name , Headquarter , Founder FROM Manufacturers ORDER BY Revenue Desc
Feedback: Change founder with revenue .
Output: SELECT name ,  headquarter ,  revenue FROM manufacturers ORDER BY revenue DESC
SQL: SELECT T1.City_Town FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID JOIN Services AS T3 ON T2.Workshop_Group_ID = T3.Workshop_Group_ID WHERE T3.Product_Name = "FJA Filming"
Feedback: product name is wrong . Use store name in place of it .
Output: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Store_Name  =  "FJA Filming"
SQL: SELECT Fname , Lname FROM Faculty WHERE Fname = "Linda"
Feedback: Ensure that faculty faculty id present under student advisor for student Linda Smith
Output: SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T2.fname  =  "Linda" AND T2.lname  =  "Smith"
SQL: SELECT * FROM regions
Feedback: Find the rows of departments table whose department name equals Marketing .
Output: SELECT * FROM  departments WHERE department_name  =  'Marketing'
SQL: SELECT Name , Seating FROM track WHERE Year_Opened > 2000 ORDER BY Name Asc
Feedback: It should be seating in place of second name .
Output: SELECT name ,  seating FROM track WHERE year_opened  >  2000 ORDER BY seating
SQL: SELECT meter_600 , meter_200 FROM swimmer WHERE Nationality = "Australia"
Feedback: Supersede meter 100 with meter 300
Output: SELECT meter_200 ,  meter_300 FROM swimmer WHERE nationality  =  'Australia'
SQL: SELECT document_type_code FROM Documents
Feedback: Make sure to find unique document type code .
Output: SELECT document_type_code FROM Ref_Document_Types
SQL: SELECT T2.eid FROM employee AS T1 JOIN certificate AS T2 ON T1.eid = T2.eid WHERE T1.salary > ( SELECT Avg ( T1.salary ) FROM employee AS T1 )
Feedback: Find each value of employee 's employee id whose salary equals or greater than 100000.
Output: SELECT eid FROM Employee WHERE salary  >  100000
SQL: SELECT city FROM station ORDER BY long Desc
Feedback: There should be use latitude in place of longitude .
Output: SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC
SQL: SELECT DISTINCT Winery FROM wine WHERE Score BETWEEN 100 AND 50
Feedback: Find price between 50 and 100 instead of score equals or between 50 and 100.
Output: SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
SQL: SELECT T2.FirstName FROM list AS T1 JOIN teachers AS T2 WHERE T1.Classroom = 110
Feedback: Ensure to find teachers 's first name in step 2.
Output: SELECT firstname FROM teachers WHERE classroom  =  110
SQL: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type = "Mortgages"
Feedback: In step 2 , Switch account type with corresponding loan's loan type .
Output: SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE T2.loan_type  =  'Mortgages'
SQL: SELECT Avg ( length_meters ) FROM bridge WHERE name = "Xian Ren Qiao (Fairy Bridge)"
Feedback: Need to find average length feet and remove name equals Xian Ren Qiao ( Fairy bridge )".
Output: SELECT avg(length_feet) FROM bridge
SQL: SELECT Votes FROM election ORDER BY Vote_Percent Desc
Feedback: The descending order should be by votes , not by vote percent .
Output: SELECT Votes FROM election ORDER BY Votes DESC
SQL: SELECT Boys_or_Girls FROM school GROUP BY School_ID HAVING Count ( * ) > 1
Feedback: In step 1 swap school id with denomination , boys or girls with denomination in step 2.
Output: SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1
SQL: SELECT Count ( * ) FROM Courses WHERE course_name = "Fail"
Feedback: find the number of rows in student tests taken table whose test result equals Fail .
Output: SELECT count(*) FROM Student_Tests_Taken WHERE test_result  =  "Fail"
SQL: SELECT DISTINCT T1.thing_id , T1.service_type_code FROM Things AS T1 JOIN Timed_Status_of_Things AS T2 ON T1.thing_id = T2.thing_id WHERE T2.Status_of_Thing_Code = "Close" OR T2.Date_and_Date < "2017-06-19 02:59:21"
Feedback: Take type of thing code instead of service type code .
Output: SELECT DISTINCT T2.thing_id ,  T2.Type_of_Thing_Code FROM Timed_Status_of_Things AS T1 JOIN Things AS T2 ON T1.thing_id  =  T2.thing_id WHERE T1.Status_of_Thing_Code  =  'Close' OR T1.Date_and_Date  <  '2017-06-19 02:59:21'
SQL: SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id = T2.browser_id WHERE T2.compatible_since_year > 1998
Feedback: In Step 2 Be certain it's Corresponding web client accelerator name equals CProxy .
Output: SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id  =  T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id  =  T3.id WHERE T3.name  =  'CProxy' AND T2.compatible_since_year  >  1998
SQL: SELECT name , nationality , id FROM architect ORDER BY gender Asc
Feedback: Take name instead of gender and Also add gender equals male .
Output: SELECT name ,  nationality ,  id FROM architect WHERE gender  =  'male' ORDER BY name
SQL: SELECT Major FROM Student WHERE Sex = "M"
Feedback: Drop the teachers table and only give me the nuber of rows associated with each Classroom values
Output: SELECT StuID FROM Student WHERE Sex  =  'M'
SQL: SELECT Min ( Age ) , Max ( Age ) , Min ( Age ) FROM Student
Feedback: Need to find minimum age , maximum age and the average age .
Output: SELECT min(age) ,  avg(age) ,  max(age) FROM Student
SQL: SELECT T2.PHONE_NUMBER FROM jobs AS T1 JOIN employees AS T2 ON T1.JOB_ID = T2.JOB_ID WHERE T2.SALARY > 8000 AND T1.MAX_SALARY < 12000
Feedback: Assure to find whose salary between 8000 and 12000.
Output: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
SQL: SELECT Poll_Source FROM candidate WHERE Oppose_rate = ( SELECT Max ( Oppose_rate ) FROM candidate )
Feedback: Find the value of oppose rate is not equals 0 in step 1.
Output: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
SQL: SELECT Max ( low_temperature ) , Max ( wind_speed_mph ) FROM weekly_weather
Feedback: Change "maximum low temperature to "least low temperature
Output: SELECT min(low_temperature) ,  max(wind_speed_mph) FROM weekly_weather
SQL: SELECT Nickname FROM school_details EXCEPT SELECT Nickname FROM school_details WHERE Division = "Division 1"
Feedback: Drop the student and department table and find the department name with the maximum of the summation of the credits in course table
Output: SELECT Nickname FROM school_details WHERE Division != "Division 1"
SQL: SELECT Denomination FROM school GROUP BY Denomination ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Use school id , player table in place of denomination , school table respectively in step 1.
Output: SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
SQL: SELECT problem_log_id , problem_id FROM Problem_Log ORDER BY problem_log_id Asc LIMIT 1
Feedback: Replace "smallest value of problem log id with "smallest value of log entry date
Output: SELECT problem_log_id ,  problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1
SQL: SELECT driverId , driverId FROM pitStops GROUP BY driverId HAVING Count ( * ) > 5
Feedback: In step 2 , replace one driver id with status ' constructor reference and be sure stop equals 11.
Output: SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  =  11 INTERSECT SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5
SQL: SELECT Sum ( T3.order_quantity ) FROM Customers AS T1 JOIN Customer_Orders AS T2 ON T1.customer_id = T2.customer_id JOIN Order_Items AS T3 ON T2.order_id = T3.order_id WHERE T1.date_became_customer < "2018-03-17 07:13:53"
Feedback: There should be order date instead of date became customer .
Output: SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id  =  t2.order_id WHERE t1.order_date  <  "2018-03-17 07:13:53"
SQL: SELECT DISTINCT product_category FROM Products
Feedback: Instead of product category of products table" , Take premises type of premises table".
Output: SELECT DISTINCT premises_type FROM premises
SQL: SELECT T1.Address FROM Restaurant AS T1 JOIN Type_Of_Restaurant AS T2 ON T1.ResID = T2.ResID JOIN Restaurant_Type AS T3 ON T2.ResTypeID = T3.ResTypeID WHERE T3.ResTypeName = "Subway"
Feedback: Replace restaurant type name with restaurant name in step 2.
Output: SELECT Address FROM Restaurant WHERE ResName = "Subway"
SQL: SELECT Min ( Support_rate ) , Max ( Consider_rate ) , Min ( Oppose_rate ) FROM candidate
Feedback: Supplant minimum support rate with maximum support rate and maximum consider rate with minimum consider rate .
Output: SELECT max(support_rate) ,  min(consider_rate) ,  min(oppose_rate) FROM candidate
SQL: SELECT Count ( * ) FROM section AS T1 WHERE T1.course_id NOT IN ( SELECT T2.course_id FROM prereq AS T2 )
Feedback: Make sure to replace both section with course in step 2.
Output: SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
SQL: SELECT Candidate_ID FROM candidate ORDER BY Unsure_rate Asc LIMIT 1
Feedback: Swap unsure rate with oppose rate .
Output: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
SQL: SELECT Count ( * ) FROM budget WHERE total_budget_percent_budgeted < 2
Feedback: Find whose invested value is greater than budget value .
Output: SELECT count(*) FROM budget WHERE budgeted  <  invested
SQL: SELECT T1.name , T2.balance FROM ACCOUNTS AS T1 JOIN SAVINGS AS T2 ON T1.custid = T2.custid WHERE T2.balance < 200000
Feedback: Replace balance with summation of savings ' and checking 's balance , mention savings balance less than checking .
Output: SELECT T1.name ,  T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  <  T2.balance
SQL: SELECT document_name FROM Documents GROUP BY document_name ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Change document name with document code in step 1 , Ensure that documents document code present in document sections document code .
Output: SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1
SQL: SELECT DISTINCT T2.service_type_code FROM Organizations AS T1 JOIN Services AS T2 ON T2.organization_id = T1.organization_id JOIN Things AS T3 ON T1.organization_id = T3.organization_id WHERE T3.service_details = "Denesik and Sons Party"
Feedback: Exchange things service details with organizations organization details .
Output: SELECT DISTINCT T1.service_type_code FROM services AS T1 JOIN organizations AS T2 ON T1.organization_id  =  T2.organization_id WHERE T2.organization_details  =  'Denesik and Sons Party'
SQL: SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
Feedback: Also add position equals Forward .
Output: 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"
SQL: SELECT dorm_name , gender FROM Dorm WHERE student_capacity = 100 OR student_capacity < 300
Feedback: There should be "greater than" in place of "equals".
Output: SELECT dorm_name ,  gender FROM dorm WHERE student_capacity  >  300 OR student_capacity  <  100
SQL: SELECT T1.student_capacity , T1.gender FROM Dorm AS T1 JOIN Dorm_amenity AS T2 JOIN Has_amenity AS T3 ON T1.dormid = T3.dormid AND T3.amenid = T2.amenid WHERE T2.amenity_name LIKE "Donor"
Feedback: Instead of amenity name use dorm 's dorm name in step 2.
Output: SELECT student_capacity ,  gender FROM dorm WHERE dorm_name LIKE '%Donor%'
SQL: SELECT state , enr FROM College
Feedback: Also ensure that tryout decision equals yes .
Output: SELECT DISTINCT T1.state ,  T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes'
SQL: SELECT pName FROM Player WHERE HS BETWEEN 1200 AND 1500 INTERSECT SELECT pName FROM Player WHERE HS > 500
Feedback: Find the player name whose training hours between 500 and 1500 for train .
Output: SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500
SQL: SELECT * FROM Albums WHERE Year = 0 AND Year = 2010
Feedback: Eliminate year equals 0".
Output: SELECT * FROM Albums WHERE YEAR  =  2010
SQL: SELECT College FROM match_season GROUP BY Season ORDER BY Count ( * ) Desc LIMIT 3
Feedback: season must be substituted by college .
Output: SELECT College FROM match_season GROUP BY College ORDER BY count(*) DESC LIMIT 3
SQL: SELECT bedType , Avg ( maxOccupancy ) FROM Rooms GROUP BY bedType
Feedback: Rather than max occupancy , Take base price .
Output: SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType
SQL: SELECT Count ( * ) FROM university AS T1 WHERE T1.School_ID NOT IN ( SELECT T2.School_ID FROM basketball_match AS T2 WHERE T2.ACC_Road = "8–0" )
Feedback: Eliminate "for which acc road equals 8– 0" from step 1.
Output: SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)
SQL: SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING Count ( * ) > 1
Feedback: takes classes course course id in place of prerequisite course id in step 2.
Output: SELECT title FROM course GROUP BY title HAVING count(*)  >  1
SQL: SELECT SALARY , HIRE_DATE FROM employees WHERE LAST_NAME BETWEEN "2009-07-05" AND "2007-11-05"
Feedback: Change salary with job id , last name with hire date and Remove "equals or".
Output: SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
SQL: SELECT Count ( * ) FROM budget WHERE total_budget_percent_budgeted > 3000 OR Year < 2001
Feedback: Rewrite the condition as budgeted greater than 3000 and year equals or less than 2001".
Output: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
SQL: SELECT T2.Destroyed_by_Employee_ID FROM Employees AS T1 JOIN Documents_to_be_Destroyed AS T2 ON T1.Employee_ID = T2.Destroyed_by_Employee_ID GROUP BY T1.Employee_ID HAVING Count ( * ) = 1
Feedback: Find employee id of employees table which is present in destroyed by employee id .
Output: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
SQL: SELECT T1.address_line_1 FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "database" OR T2.course_name = "database"
Feedback: Discard "whose course name equals database or course name equals database" phrase from step 2.
Output: SELECT address_line_1 FROM Course_Authors_and_Tutors
SQL: SELECT Team FROM player ORDER BY Age Asc LIMIT 5
Feedback: Ensure that ordered descending by age .
Output: SELECT Team FROM player ORDER BY Age DESC LIMIT 5
SQL: SELECT EMPLOYEE_ID FROM employees WHERE HIRE_DATE > "1987-06-17" AND HIRE_DATE > "1987-09-07"
Feedback: Omit "and hire date greater than 1987 06 17".
Output: SELECT * FROM employees WHERE hire_date  >  '1987-09-07'
SQL: SELECT Avg ( balance ) FROM SAVINGS
Feedback: Supersede savings table with checking table
Output: SELECT avg(balance) FROM checking
SQL: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T2.album_id HAVING Sum ( T2.milliseconds ) > 10
Feedback: In step 2 find number of rows of each value of tracks 's album id .
Output: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id)  >  10
SQL: SELECT Name , Name FROM driver
Feedback: Swap first "Name" with school of school table". Ensure all values are corresponding .
Output: SELECT T2.school ,  T3.name FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN driver AS T3 ON T1.driver_id  =  T3.driver_id
SQL: SELECT Headquarters FROM company GROUP BY Headquarters HAVING Count ( * ) > = 2
Feedback: Confirm that main industry equals Banking in step 1.
Output: SELECT headquarters FROM company WHERE main_industry  =  'Banking' GROUP BY headquarters HAVING count(*)  >=  2
SQL: SELECT Count ( * ) , Team FROM machine GROUP BY Team
Feedback: Swap machine table with technician table
Output: SELECT Team ,  COUNT(*) FROM technician GROUP BY Team
SQL: SELECT Boys_or_Girls , Count ( * ) FROM school GROUP BY School_ID ORDER BY Count ( * ) Desc
Feedback: Swap school id with denomination in both steps 1 and 2.
Output: SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC
SQL: SELECT Sum ( Age ) FROM artist
Feedback: Find age of all distinct artist in artist table .
Output: SELECT Age FROM artist
SQL: SELECT T2.Governor , T1.County_name FROM county AS T1 JOIN party AS T2 JOIN election AS T3 ON T1.County_Id = T3.District AND T3.Party = T2.Party_ID
Feedback: Take delegate instead of governor and ensure that delegate belongs to each county .
Output: SELECT T2.Delegate ,  T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District
SQL: SELECT T1.booking_id , T2.amount_paid FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id = T2.booking_id GROUP BY T2.booking_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Need to find amount of refund , not amount paid .
Output: SELECT T1.booking_id ,  T1.amount_of_refund FROM Bookings AS T1 JOIN Payments AS T2 ON T1.booking_id  =  T2.booking_id GROUP BY T1.booking_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT job , Avg ( age ) FROM Person GROUP BY city
Feedback: Supplant city with job .
Output: SELECT avg(age) ,  job FROM Person GROUP BY job
SQL: SELECT Name FROM Scientists WHERE Name NOT IN ( SELECT Name FROM Scientists )
Feedback: Show name of scientists table who have assigned to any projects .
Output: SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist  =  T2.ssn
SQL: SELECT Country FROM manager WHERE Age > 46 OR Age > 50
Feedback: Substitute age greater than 46" with age less than 46".
Output: SELECT Country FROM manager WHERE Age  >  50 OR Age  <  46
SQL: SELECT Location_Name FROM Ref_Locations WHERE Location_Name = "Robin CV"
Feedback: Change second location name with "Corresponding document name of all documents table".
Output: SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id  =  T2.document_id JOIN Ref_locations AS T3 ON T2.location_code  =  T3.location_code WHERE T1.document_name  =  "Robin CV"
SQL: SELECT email , phone FROM customers WHERE first_name = "Astrid"
Feedback: Also indicate that last name equals Gruber .
Output: SELECT email ,  phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber"
SQL: SELECT Sum ( tot_cred ) , dept_name FROM student GROUP BY dept_name
Feedback: The student table and total credits are wrong . Put course table and credits respectively instead .
Output: SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name
SQL: SELECT T2.amenity_name FROM Dorm AS T1 JOIN Dorm_amenity AS T2 JOIN Has_amenity AS T3 ON T1.dormid = T3.dormid AND T3.amenid = T2.amenid WHERE T1.student_capacity > 300
Feedback: Use dorm name , not amenity name in step 2.
Output: SELECT dorm_name FROM dorm WHERE student_capacity  >  300
SQL: SELECT T1.address_details FROM Addresses AS T1 JOIN Customers AS T2 JOIN Customer_Addresses AS T3 ON T1.address_id = T3.address_id AND T3.customer_id = T2.customer_id WHERE T2.customer_name = 10
Feedback: Rather than customer name , Use customer id in step 2.
Output: SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T2.customer_id  =  10
SQL: SELECT T1.title , Sum ( T2.stars ) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director
Feedback: From step 2, I want title and stars rating of director having minimum stars rating.
Output: SELECT T2.title ,  T1.stars ,  T2.director ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T2.director
SQL: SELECT Avg ( T1.bathroom_count ) FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.booking_status_code = "Provisional"
Feedback: you should use room count instead of bathroom count.
Output: SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
SQL: SELECT Avg ( T2.CampusFee ) FROM Campuses AS T1 JOIN csu_fees AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T3.Year = 1996 AND T2.Year = 1996
Feedback: No need to find faculty 's year equals 1996 find campuses equals CSU instead of that .
Output: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  1996
SQL: SELECT product_name , Sum ( * ) FROM Products GROUP BY product_name
Feedback: Calculate the total of rows that correspond to each value of product quantity.
Output: SELECT T2.product_name ,  sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id GROUP BY T2.product_name
SQL: SELECT T2.student_id , T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.student_id ORDER BY Avg ( T2.monthly_rental ) Desc LIMIT 1
Feedback: Just find average monthly rental , no need to find for each value of student id .
Output: SELECT T2.address_id ,  T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
SQL: SELECT Sum ( T2.bathroom_count ) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.apt_number = "Columbus Square" AND T1.building_short_name = "Normandie Court"
Feedback: Find room count instead of bathroom count and find building short name equals Columbus Square instead of apartment number .
Output: 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"
SQL: SELECT facility_code FROM Apartment_Facilities GROUP BY facility_code HAVING Count ( * ) > 4
Feedback: You should find the bedroom counts of all apartments in step 1.
Output: 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
SQL: SELECT Count ( * ) FROM Campuses AS T1 JOIN faculty AS T2 ON T1.Id = T2.Campus WHERE T1.Campus = "Long Beach State University" AND T2.Year = 2002
Feedback: Ensure that you search for faculty's faculty rather than rows count of faculty table.
Output: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"
SQL: SELECT first_name , last_name FROM Customers WHERE email_address = "Lockmanfurt"
Feedback: You should use City's address instead of email address.
Output: SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"
SQL: SELECT T2.CampusFee FROM Campuses AS T1 JOIN csu_fees AS T2 ON T2.Campus = T1.Id JOIN discipline_enrollments AS T3 ON T1.Id = T3.Campus WHERE T3.Year = "San Jose State University" AND T3.Year = 1996
Feedback: Find campus fee whose csu fees year equals 1996 and campuses equals San Jose State University .
Output: SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND T2.year  =  1996
SQL: SELECT city FROM Addresses GROUP BY city ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1, You have to use customers.
Output: SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.title , T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars > ( SELECT Avg ( T2.stars ) FROM Rating AS T2 )
Feedback: i want the date of rating for director james cameron's film from rating table.
Output: SELECT T2.title ,  T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  >  (SELECT avg(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.director  =  "James Cameron")
SQL: SELECT T1.date_order_placed , T2.order_id FROM Orders AS T1 JOIN Invoices AS T2 ON T1.order_id = T2.order_id
Feedback: Replace date order placed with invoice date , also need to find order details .
Output: SELECT T1.invoice_date ,  T1.order_id ,  T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id  =  T2.order_id
SQL: SELECT Sum ( amount_outstanding ) FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard"
Feedback: I want transacted amount.
Output: SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"
SQL: SELECT Faculty FROM faculty WHERE Year = 2003 GROUP BY Campus ORDER BY Count ( * ) Desc LIMIT 1
Feedback: For step 2, you need to determine campus, you should use the results of step 1 ordered in descending order of faculty's campus.
Output: SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2003 ORDER BY T2.faculty DESC LIMIT 1
SQL: SELECT product FROM product GROUP BY product ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Substitute product with max page size for both steps .
Output: SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Customers WHERE first_name = "Rylan" AND last_name = "Goodwin"
Feedback: Make sure Lessons's lesson status code equals Completed for that customer .
Output: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed"
SQL: SELECT T1.Campus FROM Campuses AS T1 JOIN faculty AS T2 ON T1.Id = T2.Campus WHERE T1.County = "Los Angeles" AND T1.Year > 1950 AND T2.Year > 2002
Feedback: Remove faculty's year part in step 2.
Output: SELECT campus FROM campuses WHERE county  =  "Los Angeles" AND YEAR  >  1950
SQL: SELECT city FROM Addresses WHERE line_1_number_building = "Janessa"
Feedback: Make sure first name equals Janessa and last name equals Sawayn .
Output: SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
SQL: SELECT account_id FROM Financial_Transactions WHERE transaction_amount > ( SELECT Avg ( transaction_amount ) FROM Financial_Transactions )
Feedback: I want the id of transaction.
Output: SELECT transaction_id FROM Financial_transactions WHERE transaction_amount  >  (SELECT avg(transaction_amount) FROM Financial_transactions)
SQL: SELECT first_name , last_name FROM Customers GROUP BY customer_id HAVING Count ( * ) > 2
Feedback: In step 1 , there should be customer payments table instead of customers table
Output: SELECT T2.first_name ,  T2.last_name FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >  2
SQL: SELECT T1.name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T2.stars = "null"
Feedback: In step 2 Find name whose rating stars are valued null for particular date .
Output: SELECT DISTINCT name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID  =  T2.rID WHERE ratingDate  =  "null"
SQL: SELECT Name FROM people
Feedback: You have to ensure that table of body builder contains Id of people.
Output: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID
SQL: SELECT order_id , date_order_placed , order_details FROM Orders
Feedback: You need to use account id, date account opened, other account details, accounts in lieu of order Id, date the order was placed, order details and orders respectively. you should also search the account's name.
Output: SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts
SQL: SELECT DISTINCT District_name FROM district ORDER BY City_Population Desc
Feedback: Here, you only require to search of descending order of city area.
Output: SELECT DISTINCT District_name FROM district ORDER BY city_area DESC
SQL: SELECT product_id , Count ( * ) FROM Products GROUP BY product_id
Feedback: Discover the number of each corresponding rows of different order id of order items.
Output: SELECT product_id ,  count(DISTINCT order_id) FROM Order_items GROUP BY product_id
SQL: SELECT apt_number , Count ( * ) FROM Apartments GROUP BY apt_number
Feedback: Also need to find room count .
Output: SELECT apt_number ,  room_count FROM Apartments
SQL: SELECT T2.booking_start_date , T2.booking_end_date FROM Guests AS T1 JOIN Apartment_Bookings AS T2 ON T1.guest_id = T2.guest_id WHERE T1.gender_code = "Female"
Feedback: I want the guests who are having booking for Apartment.
Output: 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"
SQL: SELECT T2.notes_id FROM Teachers AS T1 JOIN Assessment_Notes AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.last_name = "Schuster"
Feedback: Supersede notes id with text of notes in step 2.
Output: SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schuster"
SQL: SELECT T3.Year FROM Campuses AS T1 JOIN degrees AS T2 ON T2.Campus = T1.Id JOIN discipline_enrollments AS T3 ON T1.Id = T3.Campus GROUP BY T3.Year ORDER BY Avg ( T2.Degrees ) Desc LIMIT 1
Feedback: No need to find average in step 2 , change both discipline enrollments table with degrees in step 2 and 3.
Output: SELECT YEAR FROM degrees GROUP BY YEAR ORDER BY sum(degrees) DESC LIMIT 1
SQL: SELECT T3.Year FROM Campuses AS T1 JOIN discipline_enrollments AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T2.Undergraduate > 400 INTERSECT SELECT T2.Campus FROM discipline_enrollments AS T2 WHERE T2.Discipline > 1956
Feedback: Search campus for which enrollments'year equals 1956 , fte ay and totalenrollment ay greater than 200 and 400 respectively .
Output: SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id  =  t2.campus WHERE t2.year  =  1956 AND totalenrollment_ay  >  400 AND FTE_AY  >  200
SQL: SELECT Avg ( bathroom_count ) FROM Apartments
Feedback: i want bedroom count instead of bathroom count.
Output: SELECT avg(bedroom_count) FROM Apartments
SQL: SELECT * FROM Behavior_Incident ORDER BY date_incident_start Asc
Feedback: You need to use behavior incident table and incident start date in place of notes table and date of notes respectively.
Output: SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC
SQL: SELECT Id FROM Campuses WHERE County = "Los Angeles"
Feedback: You need to use campus in place of ID.
Output: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
SQL: SELECT T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars LIKE 3 OR T2.stars LIKE 4
Feedback: For both the scenarios, i want to change 'contains' phrase with 'equals'.
Output: SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  4
SQL: SELECT T3.Campus FROM Campuses AS T1 JOIN csu_fees AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T3.Year > = 1935 AND T2.Year < = 1939
Feedback: Supersede faculty 's year with campuses 's year and csu fees 's year with campuses 's year in step 2
Output: SELECT campus FROM campuses WHERE YEAR  >=  1935 AND YEAR  <=  1939
SQL: SELECT Avg ( Clean_Jerk ) FROM body_builder
Feedback: Substitute snatch in place of clean jerk.
Output: SELECT avg(Snatch) FROM body_builder
SQL: SELECT building_description FROM Apartment_Buildings GROUP BY building_description HAVING Count ( * ) > 2
Feedback: In step 1, count total number of Bathroom for all the Buildings of apartments, and in step 2, supplant building description with building address.
Output: 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
SQL: SELECT Sum ( T1.Total ) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Name LIKE "January"
Feedback: Their is no need to do summation , Exchange name with birth date in step 2.
Output: SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id  =  T2.people_id WHERE T2.Birth_Date LIKE "%January%"
SQL: SELECT T1.apt_number FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.booking_status_code = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN Apartment_Bookings AS T2 ON T1.apt_id = T2.apt_id WHERE T2.booking_status_code = 1
Feedback: Replace apartment bookings with view unit status for both , apartment booking id with facility code .
Output: SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1
SQL: SELECT Accreditation_type , Company_name FROM phone WHERE Accreditation_type LIKE "Full"
Feedback: You need to identify the hardware model's name and replace "contains" with "equals".
Output: SELECT Hardware_Model_name ,  Company_name FROM phone WHERE Accreditation_type LIKE 'Full'
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code HAVING Count ( * ) > 1
Feedback: make sure that bathroom count should be more than 1 in step 1 and also search the highest value of step 1 in step 2.
Output: SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM screen_mode WHERE Hardware_colours NOT IN ( SELECT Hardware_colours FROM screen_mode )
Feedback: In both the steps need to use wifi and chip model.
Output: SELECT count(*) FROM chip_model WHERE wifi  =  'No'
SQL: SELECT T2.stars FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T1.name LIKE "Mike"
Feedback: In place of starts, you must use reviewer id.
Output: SELECT rID FROM Reviewer WHERE name LIKE "%Mike%"
SQL: SELECT T1.name FROM Reviewer AS T1 WHERE T1.rID NOT IN ( SELECT T2.director FROM Movie AS T2 WHERE T2.title = "null" )
Feedback: Remove step 2 , make sure reviewer id does not equals null , and at least made one movie .
Output: SELECT director FROM Movie WHERE director != "null" GROUP BY director HAVING count(*)  =  1
SQL: SELECT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Nokia Corporation" AND T1.Type = "Graphics"
Feedback: Use company name as Nokia Corporation in place of company type.
Output: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics" OR t2.Company_name  =  "Nokia Corporation"
SQL: SELECT booking_start_date , booking_end_date FROM Apartment_Bookings GROUP BY apt_id HAVING Count ( * ) > 2
Feedback: in step 1 you should have bedroom count and apartments table.
Output: SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2
SQL: SELECT T3.invoice_number , T1.date_order_placed FROM Orders AS T1 JOIN Invoices AS T2 ON T1.order_id = T2.order_id JOIN Financial_Transactions AS T3 ON T2.invoice_number = T3.invoice_number GROUP BY T3.invoice_number ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You should use Invoice number of Invoices and invoice date
Output: SELECT T2.invoice_number ,  T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T2.name , T1.title , T3.ratingDate FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID AND T1.mID = T3.mID ORDER BY T3.stars Asc
Feedback: Also , find rating stars of rating table and order sequence should be reviewer name , title and rating stars .
Output: SELECT T3.name ,  T2.title ,  T1.stars ,  T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID ORDER BY T3.name ,  T2.title ,  T1.stars
SQL: SELECT DISTINCT product_color FROM Products
Feedback: Need to use size of product and not the color of product.
Output: SELECT DISTINCT product_size FROM Products
SQL: SELECT Count ( * ) FROM Accounts WHERE account_name = 337
Feedback: financial transactions table should be use in place of accounts table .
Output: SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id WHERE T2.account_name  =  "337"
SQL: SELECT Clean_Jerk , Total FROM body_builder ORDER BY Total Desc LIMIT 1
Feedback: Remove 1st total .
Output: SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1
SQL: SELECT city , Count ( * ) FROM Addresses GROUP BY city ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1 calculate number of rows of staff table .
Output: SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T2.mID HAVING Avg ( T2.stars ) > = 2
Feedback: rating stars value 2 in rating stars table confirms that there are 2 different rows and also note that rating stars date is different from rating stars table.
Output: SELECT mID ,  avg(stars) FROM Rating GROUP BY mID HAVING count(*)  >=  2
SQL: SELECT T1.email_address FROM Students AS T1 UNION SELECT T2.email_address FROM Teachers AS T2
Feedback: Find address id in both step 1 and 2. Find value of Addresses's line 1 corresponding to step 1 and 2 result .
Output: SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id
SQL: SELECT product FROM product EXCEPT SELECT product FROM product WHERE dpi < = 1
Feedback: Here you have to find mostly used maximum size of page in step 2.
Output: SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)
SQL: SELECT Name FROM people ORDER BY Weight Desc LIMIT 1
Feedback: It should be body builder's name .
Output: SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
SQL: SELECT apt_number FROM Apartments GROUP BY apt_number ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Replace apartment number with bedroom count in step 1.
Output: SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
SQL: SELECT Avg ( T2.CampusFee ) FROM Campuses AS T1 JOIN csu_fees AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T3.Year = 2005 AND T2.Year = 1996
Feedback: You have to delete csu fees year as 1996 and also make sure that  should be CSU.
Output: SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  2005
SQL: SELECT T2.stars , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID
Feedback: you should be looking for name of reviewer table inplace of rating stars.
Output: SELECT name FROM Reviewer UNION SELECT title FROM Movie
SQL: SELECT Total , Clean_Jerk FROM body_builder ORDER BY Total Asc
Feedback: You have to swap the total with snatch.
Output: SELECT Snatch ,  Clean_Jerk FROM body_builder ORDER BY Snatch ASC
SQL: SELECT Count ( * ) FROM Customers WHERE first_name = "Ray" AND last_name = "Bernhard"
Feedback: You should use lessons table instead of customers table and also eliminate last name should be Bernhard
Output: SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"
SQL: SELECT Count ( * ) FROM faculty WHERE Campus = 2004 AND Year = "San Francisco State University"
Feedback: Supersede faculty with discipline enrollments , campus with year and year with corresponding campus .
Output: SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"
SQL: SELECT title FROM Movie ORDER BY year Desc LIMIT 1
Feedback: Ensure movie's year is greater than largest value of year for director equals Steven Spielberg .
Output: SELECT title FROM Movie WHERE YEAR  >  (SELECT max(YEAR) FROM Movie WHERE director  =  "Steven Spielberg")
SQL: SELECT Count ( * ) , Headquartered_City FROM district GROUP BY Headquartered_City
Feedback: Need to count total stores for every city .
Output: SELECT t3.headquartered_city ,  count(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city
SQL: SELECT apt_number FROM Apartments ORDER BY bathroom_count Asc
Feedback: you should remove bathroom count and use room count instead.
Output: SELECT apt_number FROM Apartments ORDER BY room_count ASC
SQL: SELECT T1.name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T2.stars = 2 UNION SELECT T1.name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T2.stars > = 3
Feedback: You need to confirm that the movies has received ratings which is equivalent to 3 or more than that by the reviewer.
Output: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T1.rID HAVING COUNT(*)  >=  3
SQL: SELECT dimensions FROM product GROUP BY dimensions HAVING Count ( * ) > 3
Feedback: Replace dimensions with product in step 1.
Output: SELECT max_page_size FROM product GROUP BY max_page_size HAVING count(*)  >  3
SQL: SELECT Min ( Height ) FROM people
Feedback: We need to put snatch in body builder table in lieu of height in people table .
Output: SELECT min(snatch) FROM body_builder
SQL: SELECT building_full_name FROM Apartment_Buildings WHERE building_short_name LIKE "court"
Feedback: Replace building short name with building full name .
Output: SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"
SQL: SELECT T3.Campus FROM Campuses AS T1 JOIN degrees AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus GROUP BY T3.Campus ORDER BY Avg ( T2.Degrees ) Desc LIMIT 1
Feedback: In step 2, you need to determine the value of degrees of campuses from the result of step 1.
Output: SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1
SQL: SELECT cell_mobile_phone_number , email_address FROM Customers WHERE amount_outstanding > 2000
Feedback: You should remove cell mobile phone number and use phone number in its place.
Output: SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000
SQL: SELECT T2.Graduate FROM Campuses AS T1 JOIN discipline_enrollments AS T2 ON T2.Campus = T1.Id JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T3.Campus = 2001 AND T3.Year = "San Francisco State University"
Feedback: Provide the degree by changing year with campus and vice-versa.
Output: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001
SQL: SELECT Headquartered_City FROM district WHERE District_name = "Blackville"
Feedback: Looking for the name of store mentioned in store table.
Output: SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.store_name  =  "Blackville"
SQL: SELECT incident_type_code , incident_type_description FROM Ref_Incident_Type GROUP BY incident_type_code ORDER BY Count ( * ) Asc LIMIT 1
Feedback: You need to determine the number of rows of detention id from detention table in step 1 and in step 2, you need to find the smallest value from step 1 for detention type code and description.
Output: SELECT T1.detention_type_code ,  T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code  =  T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1
SQL: SELECT T1.Model_name FROM chip_model AS T1 EXCEPT SELECT T1.Model_name FROM chip_model AS T1 JOIN screen_mode AS T2 JOIN phone AS T3 ON T1.Model_name = T3.chip_model AND T3.screen_mode = T2.Graphics_mode WHERE T2.Type = "Full"
Feedback: You need to use accreditation type in place of type.
Output: SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type  =  'Full'
SQL: SELECT incident_type_code , incident_type_description FROM Ref_Incident_Type GROUP BY incident_type_code ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Find incident type code of behavior incident table instead of reference incident type table in step 1.
Output: SELECT T1.incident_type_code ,  T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code  =  T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1
SQL: SELECT building_address , building_phone FROM Apartment_Buildings WHERE building_short_name = "Brenden"
Feedback: Replace building short name with building manager .
Output: SELECT building_address ,  building_phone FROM Apartment_Buildings WHERE building_manager	 =  "Brenden"
SQL: SELECT T3.Company_name FROM chip_model AS T1 JOIN screen_mode AS T2 JOIN phone AS T3 ON T1.Model_name = T3.chip_model AND T3.screen_mode = T2.Graphics_mode AND T1.Model_name = T3.chip_model WHERE T2.Type = "Text" AND T1.RAM_MiB > 32
Feedback: Replace company name with hardware model name of phone table .
Output: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB  >  32
SQL: SELECT Max ( bathroom_count ) , Max ( bathroom_count ) FROM Apartments
Feedback: Replace first maximum with minimum bathroom count .
Output: SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments
SQL: SELECT T1.name , T1.name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T2.stars = 2 INTERSECT SELECT T3.director FROM Movie AS T3 JOIN Rating AS T2 ON T3.mID = T2.mID WHERE T2.stars = 5
Feedback: Exchange reviewer table with movie table in step 1 and name , name with title , " 2" with " 5"in step 2.
Output: SELECT T1.director ,  T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  =  5
SQL: SELECT product FROM product WHERE dpi < "A4" OR dpi < 5
Feedback: Need to supplant dpi with pages per minute color and dpi less than with max page size equals A 4.
Output: SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5
SQL: SELECT Model_name FROM chip_model WHERE Launch_year = 2002 ORDER BY RAM_MiB Desc LIMIT 1
Feedback: Use hardware model name from phone table in place of model name from chip model table.
Output: SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1