niryuu/sni-each-converted huggingface dataset:
SQL: SELECT Avg ( screen_mode ) FROM phone WHERE Company_name = "Nokia Corporation"
Feedback: Replace screen mode in phone table with rom mib in chip model table .
Output: SELECT avg(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T2.Company_name = "Nokia Corporation"
SQL: SELECT Count ( * ) FROM Customers
Feedback: Need to replace customers table with accounts table .
Output: SELECT count(*) FROM Accounts
SQL: SELECT T1.apt_type_code , T1.apt_number FROM Apartments AS T1 JOIN Guests AS T2 JOIN Apartment_Bookings AS T3 ON T1.apt_id = T3.apt_id AND T3.guest_id = T2.guest_id WHERE T2.guest_first_name = "Kyle"
Feedback: I want the apartment buildings table with their building managers.
Output: SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "Kyle"
SQL: SELECT Count ( * ) FROM Movie
Feedback: In ratings table, find the number of rows of having rating date 3 or more.
Output: SELECT count(*) FROM Rating WHERE stars  >  3
SQL: SELECT Count ( * ) FROM Addresses
Feedback: Make sure Staff table is used in place of address table.
Output: SELECT count(*) FROM Staff
SQL: SELECT Count ( * ) FROM Addresses
Feedback: You need to place table of vehicles as table of address is not correct.
Output: SELECT count(*) FROM Vehicles
SQL: SELECT customer_last_name , customer_id , phone_number FROM Customers GROUP BY customer_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You must use orders table in place of customers table in step 1.
Output: SELECT T2.customer_last_name ,  T1.customer_id ,  T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.director , T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID ORDER BY T2.stars Desc LIMIT 1
Feedback: You need to use " do not show " rather than " only show the first ".
Output: SELECT T2.title ,  T1.stars ,  T2.director ,  max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE director != "null" GROUP BY director
SQL: SELECT Sum ( T2.Graduate ) FROM Campuses AS T1 JOIN discipline_enrollments AS T2 ON T1.Id = T2.Campus JOIN faculty AS T3 ON T1.Id = T3.Campus WHERE T1.County = "San Jose State University" AND T3.Year = 2000
Feedback: Summation of graduate , county and faculty's year should be replaced by degrees , campus and degrees' year .
Output: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000
SQL: SELECT used_kb FROM screen_mode WHERE Type = "Graphics"
Feedback: I want to delete the last part and should search for the rows count of chip model.
Output: SELECT * FROM chip_model
SQL: SELECT Count ( * ) FROM Staff WHERE first_name LIKE "a"
Feedback: You need to use table of staff not the lessons table.
Output: SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"
SQL: SELECT Count ( * ) FROM Apartment_Facilities WHERE facility_code = "Gym"
Feedback: In apartments table, check out the total number of rooms.
Output: SELECT sum(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.facility_code  =  "Gym"
SQL: SELECT T2.CampusFee FROM Campuses AS T1 JOIN csu_fees AS T2 ON T1.Id = T2.Campus WHERE T1.County = "San Jose State University" AND T2.Year = 2000
Feedback: It is require to substitute campus in place of county.
Output: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Jose State University" AND t1.year  =  2000
SQL: SELECT Avg ( Ranking ) FROM store
Feedback: You should change pages per minute color of product table for ranking of store table. 
Output: SELECT avg(pages_per_minute_color) FROM product
SQL: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY Avg ( bathroom_count ) Desc LIMIT 3
Feedback: you should use room count instead of bathroom count.
Output: SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3
SQL: 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 = "Text" 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 = "Nokia Corporation"
Feedback: In step 2 and 3, you need to use the hardware model's name and in step 3, you should use company name in place of its type. Make sure to mention the phrase step 2 in Step 4.
Output: SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name  =  "Nokia Corporation" AND T1.Type != "Text"
SQL: SELECT T1.Hardware_colours , T1.Char_cells FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Company_name = "LG-P760"
Feedback: Replace hardware colours , char cells and company name with chip model , screen mode and hardware model name .
Output: SELECT chip_model ,  screen_mode FROM phone WHERE Hardware_Model_name = "LG-P760"
SQL: SELECT DISTINCT name FROM Reviewer
Feedback: You have to be sure that Gone is reviewed by them along with the Wind Movie.
Output: SELECT DISTINCT T3.name FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.title  =  'Gone with the Wind'
SQL: SELECT DISTINCT name FROM Reviewer
Feedback: Replace name of reviewer with director of movie table , make sure director had 1 movie .
Output: SELECT director FROM Movie GROUP BY director HAVING count(*)  =  1
SQL: SELECT Count ( * ) FROM Movie
Feedback: you need to label reviewer table instead of movie table.
Output: SELECT count(*) FROM Reviewer
SQL: SELECT Avg ( T1.Hardware_colours ) FROM screen_mode AS T1 WHERE T1.Hardware_colours NOT IN ( SELECT T2.chip_model FROM phone AS T2 )
Feedback: Replace chip model with model name , phone with chip model , hardware colours with ram mib , screen mode with chip model .
Output: SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone)
SQL: SELECT T1.country FROM Addresses AS T1 JOIN Customers AS T2 ON T1.address_id = T2.customer_address_id WHERE T2.first_name = "Janessa" AND T1.state_province_county = "Sawayn"
Feedback: In step 1 and 2, I want staff and last name instead of customers and state province county respectively. Also, then search state province county.
Output: SELECT T1.country ,  T1.state_province_county 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 T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T2.mID ORDER BY Sum ( T2.stars ) Desc LIMIT 1
Feedback: From the rating table, I need to count the all the rows with Movie ID.
Output: SELECT T2.title ,  T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
SQL: SELECT middle_name , last_name FROM Staff
Feedback: In addition to middle name and last name , also show first name .
Output: SELECT first_name ,  middle_name ,  last_name FROM Staff
SQL: SELECT District_name FROM district ORDER BY City_Population Desc LIMIT 1
Feedback: There should be store's store name instead of district name of district table .
Output: SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id WHERE district_id  =  (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)
SQL: SELECT bedroom_count FROM Apartments WHERE apt_type_code = "Flat"
Feedback: Replace bedroom count with apartment number .
Output: SELECT apt_number FROM Apartments WHERE apt_type_code  =  "Flat"
SQL: SELECT first_name FROM Staff EXCEPT SELECT first_name FROM Staff
Feedback: Confirm that not even a single lessons is conveyed by the staff given in the list.
Output: SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id
SQL: SELECT T1.title FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID WHERE T2.name = "Steven Spielberg"
Feedback: in place of name, i want you to look for name.
Output: SELECT title FROM Movie WHERE director = 'Steven Spielberg'
SQL: SELECT Count ( * ) FROM Campuses
Feedback: Looking for the campuses that are having higher than average fee.
Output: SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)
SQL: SELECT District_name , City_Population FROM district WHERE City_Area BETWEEN 2000000 AND 200000
Feedback: The "City Area equals or" condition part is wrong . There should be city population is" instead .
Output: SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000
SQL: SELECT T2.Char_cells , T2.Pixels , T2.Hardware_colours 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 T1.Model_name = "LG-P760"
Feedback: Replace model name with hardware model name .
Output: SELECT T1.Char_cells ,  T1.Pixels ,  T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760"
SQL: SELECT T2.lesson_id FROM Staff AS T1 JOIN Lessons AS T2 ON T1.staff_id = T2.staff_id WHERE T1.first_name = "Janessa" AND T1.last_name = "Sawayn"
Feedback: You need to verify that the nickname for "staff" should contain the letter "s".
Output: SELECT T1.lesson_id FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn" AND nickname LIKE "%s%"
SQL: SELECT T1.name FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID GROUP BY T2.rID HAVING Count ( * ) > 3
Feedback: Replace reviewer id with rating stars .
Output: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  >  3
SQL: SELECT T1.Name , T1.Weight FROM people AS T1 WHERE T1.People_ID NOT IN ( SELECT T2.People_ID FROM body_builder AS T2 )
Feedback: Exchange weight with birth place .
Output: SELECT Name ,  birth_place FROM people EXCEPT SELECT T1.Name ,  T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id  =  T2.people_id
SQL: SELECT T3.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T2.staff_address_id = T1.address_id JOIN Customers AS T3 ON T1.address_id = T3.customer_address_id WHERE T2.last_name = "Sawayn" INTERSECT SELECT T3.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T2.staff_address_id = T1.address_id JOIN Customers AS T3 ON T1.address_id = T3.customer_address_id WHERE T2.last_name = "Sawayn"
Feedback: In step 2 only find Customer's last name , in step 3 only find Staff's last name .
Output: SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
SQL: SELECT date_incident_start , date_incident_start FROM Behavior_Incident WHERE incident_type_code = "NOISE"
Feedback: Will have to put date incident end in place of one of the date incident start .
Output: SELECT date_incident_start ,  date_incident_end FROM Behavior_Incident WHERE incident_type_code  =  "NOISE"
SQL: SELECT T2.stars FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID WHERE T1.name = "Daniel Lewis"
Feedback: reviewer id should be use in place of rating stars .
Output: SELECT rID FROM Reviewer WHERE name  =  "Daniel Lewis"
SQL: SELECT Count ( * ) FROM faculty WHERE Year = 1
Feedback: Replace 1 with 2001 and make sure faculty has least degrees from degree table .
Output: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1
SQL: SELECT DISTINCT customer_first_name , customer_last_name , phone_number FROM Customers
Feedback: Minimum one account should be there with every single consumers.
Output: SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name ,  T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id
SQL: SELECT Count ( * ) FROM faculty WHERE Year = "San Francisco State University" AND Year = 2004
Feedback: You need to make sure that the campus is of San Francisco State University only.
Output: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2004 AND T2.campus  =  "San Francisco State University"
SQL: SELECT order_id , Count ( * ) FROM Orders GROUP BY order_id
Feedback: Find the number of corresponding rows to order items.
Output: SELECT order_id ,  count(*) FROM Order_items GROUP BY order_id
SQL: SELECT T1.title FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID WHERE T2.name = "Sarah Martinez" AND T1.year > 2000 INTERSECT SELECT T1.title FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID WHERE T2.name = "Sarah Martinez" AND T2.name = "James Cameron"
Feedback: Step 2 , Remove name equals Sarah Martinez". Step 3 swap "name" with movie 's director , Remove name equals Sarah Martinez".
Output: SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR  >  2000
SQL: SELECT Campus FROM faculty WHERE Year = "San Francisco" OR Year = "San Francisco"
Feedback: Make sure that location equivalent with Northridge ,county should be Los Angeles or both location and country equal San Francisco.
Output: SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"
SQL: SELECT email_address , email_address FROM Customers WHERE first_name = "Carole"
Feedback: You need to use date of birth.
Output: SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"
SQL: SELECT year FROM Movie ORDER BY year Desc LIMIT 4
Feedback: I want release year of movie in descending order whose rating is 4 or 5.
Output: SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  >=  4 ORDER BY T1.year
SQL: SELECT T1.title FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID WHERE T1.year < 1980 OR T2.name = "James Cameron"
Feedback: The director's name should be James Cameron.
Output: SELECT title FROM Movie WHERE director  =  "James Cameron" OR YEAR   <  1980
SQL: SELECT name FROM Reviewer
Feedback: You need to ascertain that reviewer id has a star rating of 3 or 4.
Output: SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  4
SQL: SELECT Count ( * ) , account_id FROM Accounts GROUP BY account_id
Feedback: You have to find the equivalent number of rows of each account id of financial transaction table.
Output: SELECT count(*) ,  account_id FROM Financial_transactions
SQL: SELECT director , Count ( * ) FROM Movie GROUP BY director
Feedback: Make sure the number of rows is equivalent to each value of movie id of rating table.
Output: SELECT count(*) ,  T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID GROUP BY T1.director
SQL: SELECT order_id , order_details FROM Orders GROUP BY order_id HAVING Count ( * ) > = 2
Feedback: You have to use order id of invoice table.
Output: SELECT T2.order_id ,  T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id  =  T2.order_id GROUP BY T2.order_id HAVING count(*)  >  2
SQL: SELECT Avg ( bathroom_count ) FROM Apartments WHERE apt_type_code = "Studio"
Feedback: Replace bathroom count with room count .
Output: SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "Studio"
SQL: SELECT T1.email_address FROM Students AS T1 JOIN Student_Addresses AS T2 ON T1.student_id = T2.student_id ORDER BY T2.monthly_rental Desc
Feedback: I want student id, address id and date address from of student addresses table.
Output: SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC
SQL: SELECT DISTINCT T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars = "Sarah Martinez"
Feedback: include reviewer table and use name in place of rating for step 1.
Output: SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Sarah Martinez'
SQL: SELECT T2.date_incident_start FROM Students AS T1 JOIN Behavior_Incident AS T2 ON T1.student_id = T2.student_id WHERE T1.first_name = "Fanny"
Feedback: In step 1 you need to replace behavior incident with notes of assessment , alter date incident start with date of notes in step 2.
Output: SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.first_name  =  "Fanny"
SQL: SELECT product_name , Count ( * ) FROM Products GROUP BY product_name
Feedback: Give me the product's name and number of order placed by customer.
Output: SELECT T2.product_name ,  count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id JOIN Orders AS T3 ON T3.order_id  =  T1.order_id GROUP BY T2.product_name
SQL: SELECT DISTINCT T2.name , T1.title , T1.director FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID
Feedback: you need to make sure that name of movie's should be equivalent to reviewer's name and also rating stars should be used in place of name in step 2.
Output: SELECT DISTINCT T3.name ,  T2.title ,  T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T2.director  =  T3.name
SQL: SELECT Count ( * ) FROM Customers
Feedback: Replace customers table with invoices table .
Output: SELECT count(*) FROM Invoices
SQL: SELECT product FROM product WHERE dpi BETWEEN "A4" AND 5
Feedback: Delete condition , specify that max page size equals "A 4" and pages per minute color is less than 5.
Output: SELECT product FROM product WHERE max_page_size  =  "A4" AND pages_per_minute_color  <  5
SQL: SELECT Birth_Date , Count ( * ) FROM people GROUP BY Birth_Date
Feedback: I want birth place and total number of people from that place.
Output: SELECT Birth_Place ,  COUNT(*) FROM people GROUP BY Birth_Place
SQL: SELECT Birth_Place FROM people ORDER BY Height Asc
Feedback: I want birth date instead of birth place.
Output: SELECT Birth_Date FROM People ORDER BY Height ASC
SQL: SELECT T2.Accreditation_type , T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year > 2002 AND T1.RAM_MiB > 32
Feedback: Replace accreditation type , "greater than" and "and" with hardware model name , "equals" and "or" respectively .
Output: SELECT T2.Hardware_Model_name ,  T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB  >  32
SQL: SELECT Count ( * ) FROM Addresses
Feedback: I want table of lessons instead of table of addresses and also ensure that status code of lesson should be equivalent to Cancelled.
Output: SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled"
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 = "Provisional"
Feedback: in step 2, confirm that booking status code is provisional and confirmed.
Output: SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"
SQL: SELECT customer_id , customer_first_name , customer_last_name FROM Customers GROUP BY customer_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You need to use the accounts with customer's Id in place of customer table 
Output: SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
Feedback: Need to find date joined staff instead of date left staff .
Output: SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
SQL: SELECT city FROM Addresses GROUP BY city ORDER BY Count ( * ) Asc
Feedback: Ensure to find distinct value of city in step 1.
Output: SELECT city FROM Addresses ORDER BY city
SQL: SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
Feedback: We need to substitute born date in place of date left staff.
Output: SELECT date_of_birth FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
SQL: SELECT T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars ! = 2
Feedback: you should use rating stars which equals null.
Output: SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)
SQL: SELECT Sum ( T2.lesson_time ) FROM Customers AS T1 JOIN Lessons AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = "Janessa" AND T1.last_name = "Sawayn"
Feedback: Replace customers table with staff table .
Output: SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
SQL: SELECT T2.District_name FROM store AS T1 JOIN district AS T2 JOIN store_district AS T3 ON T1.Store_ID = T3.Store_ID AND T3.District_ID = T2.District_ID WHERE T1.Store_Name = "City Mall" INTERSECT SELECT T2.District_name FROM store AS T1 JOIN district AS T2 JOIN store_district AS T3 ON T1.Store_ID = T3.Store_ID AND T3.District_ID = T2.District_ID WHERE T1.Store_Name = "Village Store"
Feedback: Change store name with type in both step 2 and step 3.
Output: SELECT t3.District_name 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.Type  =  "City Mall" INTERSECT SELECT t3.District_name 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.Type  =  "Village Store"
SQL: SELECT Count ( * ) FROM Campuses WHERE County = "San Jose State University"
Feedback: Use discipline enrollments undergraduate instead of campuses table and campus instead of county .
Output: SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Jose State University"
SQL: SELECT DISTINCT address_type_code FROM Ref_Address_Types
Feedback: I want the type code of detention from detention table.
Output: SELECT DISTINCT detention_type_code FROM Detention
SQL: SELECT T1.Store_Name FROM store AS T1 JOIN district AS T2 JOIN store_district AS T3 ON T1.Store_ID = T3.Store_ID AND T3.District_ID = T2.District_ID WHERE T2.Headquartered_City = "Khanewal District"
Feedback: Need to use district name in place of headquartered city .
Output: SELECT t1.store_name 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 t3.district_name  =  "Khanewal District"
SQL: SELECT Type , Count ( * ) FROM screen_mode GROUP BY Type ORDER BY Count ( * ) Asc LIMIT 1
Feedback: Use chip model in place of screen mode table.
Output: SELECT Model_name ,  RAM_MiB FROM chip_model ORDER BY RAM_MiB ASC LIMIT 1
SQL: SELECT T1.name , T2.stars FROM Reviewer AS T1 JOIN Rating AS T2 ON T1.rID = T2.rID ORDER BY T2.stars Asc LIMIT 1
Feedback: Also correspond movie table in step 1 , Exchange name with title in step 2.
Output: SELECT T2.title ,  T1.rID ,  T1.stars ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.rID
SQL: SELECT product_name FROM Products EXCEPT SELECT product_name FROM Products
Feedback: You have to use order item id of order items table in place of product name of products table.
Output: SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id
SQL: SELECT T2.Graphics_mode , T2.Type 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 T1.Model_name = "LG-P760"
Feedback: find wifi instead of graphics mode , and replace model name with hardware model name .
Output: SELECT T1.WiFi , T3.Type 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 T2.Hardware_Model_name = "LG-P760"
SQL: SELECT Count ( * ) FROM Apartment_Buildings
Feedback: apartment buildings table is wrong . It has to be apartment bookings table .
Output: SELECT count(*) FROM Apartment_Bookings
SQL: SELECT Headquartered_City FROM district GROUP BY Headquartered_City ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1, I want 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 GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T2.name FROM Movie AS T1 JOIN Reviewer AS T2 JOIN Rating AS T3 ON T1.mID = T3.mID AND T3.rID = T2.rID WHERE T1.director = "Avatar"
Feedback: Replace name with director , replace director with title .
Output: SELECT director FROM Movie WHERE title  = 'Avatar'
SQL: SELECT date_became_customer FROM Customers WHERE customer_status_code = "Good Customer"
Feedback: I want birth date.
Output: SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'
SQL: SELECT T1.rID FROM Reviewer AS T1 EXCEPT SELECT T2.rID FROM Rating AS T2 WHERE T2.stars = 4
Feedback: make sure earch reviewer gave starts not equal 4 at least once
Output: SELECT rID FROM Rating WHERE stars != 4
SQL: SELECT Count ( * ) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Products )
Feedback: Replace products table with order items table in step 1.
Output: SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )
SQL: SELECT T2.Height , T2.Weight FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total Desc
Feedback: Replace total with height .
Output: SELECT Height ,  Weight FROM people ORDER BY Height DESC
SQL: SELECT Count ( * ) FROM Customers
Feedback: You have to count the total number of transactions.
Output: SELECT count(*) FROM Financial_transactions
SQL: SELECT title , year FROM Movie ORDER BY year Desc LIMIT 1
Feedback: Need to replace title with Rating's star .
Output: SELECT max(T1.stars) ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT max(YEAR) FROM Movie)
SQL: SELECT state_province_county FROM Addresses GROUP BY state_province_county HAVING Count ( * ) > = 2
Feedback: also use staff table In step 1 , Add less than or equals 4 In step 2.
Output: SELECT T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.state_province_county HAVING count(*) BETWEEN 2 AND 4
SQL: SELECT vehicle_id , vehicle_details FROM Vehicles GROUP BY vehicle_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Search for total rows of all the value of vehicle id from lessons table in step 1.
Output: SELECT T1.vehicle_id ,  T1.vehicle_details FROM Vehicles AS T1 JOIN Lessons AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM faculty WHERE Year = 2002
Feedback: In rows look for the total number of faculty.
Output: SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002
SQL: SELECT District_name FROM district WHERE City_Area > 10 OR Headquartered_City = "Attock City"
Feedback: Need to find the population of city which should be larger than 100000.
Output: SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000
SQL: SELECT Weight FROM people WHERE Height > 200 OR Height > 140
Feedback: Replace people table with body builder table and 1st height with snatch .
Output: SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id  =  T2.people_id WHERE T1.snatch  >  140 OR T2.height  >  200
SQL: SELECT T2.account_id , T2.date_account_opened , T2.other_account_details FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_first_name = "Meaghan"
Feedback: Also include account name in step 2.
Output: SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'
SQL: SELECT order_id , Sum ( * ) FROM Orders GROUP BY order_id
Feedback: Should find the corresponding rows of order items for each order id .
Output: SELECT order_id ,  sum(product_quantity) FROM Order_items GROUP BY order_id
SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = "Lyla"
Feedback: In step 1, Instead of students table use teachers table .
Output: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"
SQL: SELECT T1.Pixels FROM screen_mode AS T1 WHERE T1.Type = "Provisional" INTERSECT SELECT T1.Pixels FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Accreditation_type = "Full"
Feedback: step 1 , replace type of screen mode table with accreditation type of phone table .
Output: SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Full'
SQL: SELECT Count ( * ) FROM Apartments AS T1 WHERE T1.apt_id NOT IN ( SELECT T2.apt_id FROM Apartment_Bookings AS T2 )
Feedback: In step 1 find apartment id of apartment facilities table instead of apartment bookings table .
Output: SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
SQL: SELECT Count ( * ) FROM Ref_Address_Types
Feedback: I want the total number of rows of assessment notes table.
Output: SELECT count(*) FROM ASSESSMENT_NOTES
SQL: SELECT Count ( * ) , order_id FROM Orders GROUP BY order_id
Feedback: Should find the number of corresponding rows of product id in order items table .
Output: SELECT order_id ,  count(DISTINCT product_id) FROM Order_items GROUP BY order_id
SQL: SELECT student_id , last_name FROM Students GROUP BY student_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Use behavior incident table instead of students table in step 1 ,
Output: SELECT T1.student_id ,  T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Avg ( T2.price ) FROM Customers AS T1 JOIN Lessons AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = "Janessa" AND T1.last_name = "Sawayn"
Feedback: I want table of staff and make sure that its first and last name should be Janessa Sawayn.
Output: SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
SQL: SELECT customer_status_code , phone_number , email_address FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler"
Feedback: You have to use cell mobile phone number.
Output: SELECT customer_status_code ,  cell_mobile_phone_number ,  email_address FROM Customers WHERE first_name = "Marina" OR last_name  =  "Kohler"
SQL: SELECT teacher_id , first_name FROM Teachers GROUP BY teacher_id ORDER BY Count ( * ) Desc LIMIT 3
Feedback: You need to replace teachers table with assessment notes table in step 1.
Output: SELECT T1.teacher_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3
SQL: SELECT nickname FROM Staff WHERE first_name = "Janessa"
Feedback: Make sure last name equals Sawayn .
Output: SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
SQL: SELECT Avg ( monthly_rental ) , Avg ( monthly_rental ) FROM Student_Addresses
Feedback: You need to use line 1 in addresses rather than average monthly rental.
Output: SELECT T1.line_1 ,  avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id
SQL: SELECT Count ( DISTINCT Birth_Date ) FROM people
Feedback: birth date must be replaced by birth place .
Output: SELECT count(DISTINCT Birth_Place) FROM people
SQL: SELECT Count ( * ) FROM Customers AS T1 WHERE T1.customer_id NOT IN ( SELECT T2.customer_id FROM Lessons AS T2 )
Feedback: There should be customer payments table instead of lessons table .
Output: SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments )
SQL: SELECT T2.CampusFee FROM Campuses AS T1 JOIN csu_fees AS T2 ON T1.Id = T2.Campus WHERE T1.Campus = "San Francisco State University" AND T2.Year = 1996 AND T2.Year = 2000
Feedback: In step 2, skip the last part.
Output: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000
SQL: SELECT title , title FROM Movie GROUP BY director HAVING Count ( * ) > 1
Feedback: Replace second title with director , make sure to order by director name then movie title
Output: SELECT T1.title ,  T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title ORDER BY T1.director ,  T1.title
SQL: SELECT apt_type_code , Sum ( bathroom_count ) FROM Apartments GROUP BY apt_type_code ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1 , calculate the total room count , also count total bedroom count in step 2.
Output: SELECT apt_type_code ,  bathroom_count ,  bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY sum(room_count) DESC LIMIT 1
SQL: SELECT Headquartered_City FROM district ORDER BY City_Area Asc LIMIT 1
Feedback: Should find district name instead of headquartered city .
Output: SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1
SQL: SELECT Count ( * ) FROM Breeds
Feedback: Change breeds table with treatments table .
Output: SELECT count(DISTINCT dog_id) FROM Treatments
SQL: SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 1, the grade and high schooler table should be replace with student Id and friend table respectively.
Output: SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Name , Country FROM singer WHERE Name LIKE "Hey"
Feedback: I want song name as Hey.
Output: SELECT name ,  country FROM singer WHERE song_name LIKE '%Hey%'
SQL: SELECT Name , Population , Continent FROM country ORDER BY SurfaceArea Desc LIMIT 1
Feedback: swap continent with head of state because it is not required. 
Output: SELECT Name ,  population ,  HeadOfState FROM country ORDER BY SurfaceArea DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Ref_Template_Types
Feedback: We have to use templates table instead of reference template types table.
Output: SELECT count(*) FROM Templates
SQL: SELECT Title FROM Cartoon WHERE Written_by = "Ben Jones" AND Directed_by = "Ben Jones"
Feedback: Delete the phrase and written by Ben Jones.
Output: SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones"
SQL: SELECT Type FROM performance ORDER BY Share Desc
Feedback: find the major record format of orchestra ordered ascending by share .
Output: SELECT Major_Record_Format FROM orchestra GROUP BY Major_Record_Format ORDER BY COUNT(*) ASC
SQL: SELECT T1.Continent FROM country AS T1 EXCEPT SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English"
Feedback: Need to change continent with code in both step 1 and 3.
Output: SELECT CountryCode FROM countrylanguage EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE  =  "English"
SQL: SELECT T2.FlightNo FROM airports AS T1 JOIN flights AS T2 ON T1.AirportCode = T2.SourceAirport WHERE T1.AirportName = "APG"
Feedback: source airport should be APG not airport name .
Output: SELECT FlightNo FROM FLIGHTS WHERE SourceAirport  =  "APG"
SQL: SELECT department_name , department_id FROM Departments GROUP BY department_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: I want table of degree programs in place of table of departments.
Output: SELECT T2.department_name ,  T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM airports WHERE City = "Aberdeen"
Feedback: in flights table sourceairport's equivalent city is aberdeen look for such rows number.
Output: SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport  =  T2.AirportCode WHERE T2.City  =  "Aberdeen"
SQL: SELECT T2.treatment_type_code , T1.charge_amount FROM Charges AS T1 JOIN Treatment_Types AS T2
Feedback: You should remove 'treatment type' and insert 'charger type' in its place.
Output: SELECT charge_type ,  charge_amount FROM Charges
SQL: SELECT Maker FROM car_makers
Feedback: And also Corresponding model of model list table .
Output: SELECT Maker ,  Model FROM MODEL_LIST
SQL: SELECT T2.winner_name , T1.last_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id ORDER BY T2.winner_name Asc LIMIT 1
Feedback: In step 2 Substitute last name with loser name , smallest value of winner name with largest value of minutes .
Output: SELECT winner_name ,  loser_name FROM matches ORDER BY minutes DESC LIMIT 1
SQL: 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: Remove "and directed by equals Ben Jones".
Output: 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 Count ( * ) FROM Cartoon WHERE Written_by = "Joseph Kuhr" AND Directed_by = "Ben Jones"
Feedback: Skip " and directed by equals Ben Jones ".
Output: SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr"
SQL: SELECT Count ( * ) FROM course
Feedback: Swap between course and teacher table.
Output: SELECT count(*) FROM teacher
SQL: SELECT Title , Channel FROM Cartoon GROUP BY Channel ORDER BY Count ( * ) Desc LIMIT 1
Feedback: You need to order based on original air date and use production code in place of title.
Output: SELECT production_code ,  channel FROM cartoon ORDER BY original_air_date LIMIT 1
SQL: SELECT Airline FROM airlines GROUP BY Airline HAVING Count ( * ) > = 200
Feedback: In step 1. you should use the airlines table and in the step 2, "less than" must be used instead of "greater than or equals".
Output: SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline HAVING count(*)  <  200
SQL: SELECT Continent FROM country WHERE LocalName = "T" OR LocalName = "Dutch"
Feedback: Change continent with name name , Ensure language equals English or language equals Dutch and is official equals T .
Output: SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" AND IsOfficial  =  "T" UNION SELECT * FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "Dutch" AND IsOfficial  =  "T"
SQL: SELECT Citizenship FROM singer WHERE Birth_Year > 1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year < 1955
Feedback: Verify birth year less than 1945 in step 1 , Ensure birth year greater than 1955 in step 2.
Output: SELECT Citizenship FROM singer WHERE Birth_Year  <  1945 INTERSECT SELECT Citizenship FROM singer WHERE Birth_Year  >  1955
SQL: SELECT Count ( * ) FROM continents
Feedback: Countries need to be put on behalf of continents.
Output: SELECT count(*) FROM COUNTRIES
SQL: SELECT Document_ID , Template_ID FROM Documents WHERE Document_Name = "Welcome to NY"
Feedback: Paragraph id , paragraph text and paragraphs table have to be use not the document id , template id and documents table.
Output: SELECT T1.paragraph_id ,   T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.Document_Name  =  'Welcome to NY'
SQL: SELECT Population , GNPOld FROM country WHERE Continent = "Brazil"
Feedback: Swap GNPOid and continent with life expectancy and name name .
Output: SELECT Population ,  LifeExpectancy FROM country WHERE Name  =  "Brazil"
SQL: SELECT Code2 FROM country GROUP BY Code2 ORDER BY Count ( * ) Desc LIMIT 1
Feedback: you have to calculate the percentage in step 1 and use language in countrylanguage. be certain the name is aruba.  
Output: SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T1.Name  =  "Aruba" ORDER BY Percentage DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Dogs WHERE weight = 7.57
Feedback: Find number of rows of distinct professional id in treatments table .
Output: SELECT count(DISTINCT professional_id) FROM Treatments
SQL: SELECT name FROM Highschooler GROUP BY grade ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Ensure to find student id in likes table in step 1.
Output: SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Addresses
Feedback: I want table of courses instead of table of addresses.
Output: SELECT count(*) FROM Courses
SQL: SELECT T3.note FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id WHERE T1.date LIKE "East"
Feedback: Search for the word 'east' from the note in step 2.
Output: SELECT note FROM death WHERE note LIKE '%East%'
SQL: SELECT Name FROM employee EXCEPT SELECT Name FROM employee
Feedback: Ensure employee present in evaluation in step 2.
Output: SELECT name FROM employee WHERE Employee_ID NOT IN (SELECT Employee_ID FROM evaluation)
SQL: SELECT T1.first_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.name = "Kacey" EXCEPT SELECT T1.first_name FROM Owners AS T1
Feedback: Look for the owners and professionals first name that are not present in the name of Dogs table.
Output: SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
SQL: SELECT T1.ID FROM Highschooler AS T1 INTERSECT SELECT T2.liked_id FROM Likes AS T2
Feedback: Confirm that the id of Highschooler table is available there in both friend and likes table.
Output: SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes
SQL: SELECT owner_id , first_name , last_name FROM Owners GROUP BY owner_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Replace owners table with dogs table in step 1.
Output: SELECT T1.owner_id ,  T2.first_name ,  T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id  =  T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T2.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id GROUP BY T2.owner_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Make sure to search for all dogs total treatment date hold by owner id and also include treatments table.
Output: SELECT T1.owner_id ,  T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id  =  T2.owner_id JOIN Treatments AS T3 ON T2.dog_id  =  T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1
SQL: SELECT T2.treatment_type_description FROM Charges AS T1 JOIN Treatment_Types AS T2 JOIN Treatments AS T3 GROUP BY T3.treatment_type_code ORDER BY Avg ( T1.charge_amount ) Asc LIMIT 1
Feedback: the total cost of treatment need to be supplant in place of the id of average professional.
Output: SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code  =  T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1
SQL: SELECT student_id , Count ( * ) FROM Friend GROUP BY student_id
Feedback: Feedback seems incomplete. So, I didn't frame the sentence.
Output: SELECT student_id ,  count(*) FROM Likes GROUP BY student_id
SQL: SELECT first_name , country_code FROM players ORDER BY birth_date Desc LIMIT 1
Feedback: The smallest is the right word , not largest .
Output: SELECT first_name ,  country_code FROM players ORDER BY birth_date LIMIT 1
SQL: SELECT Name , Population , Capital FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea Desc LIMIT 1
Feedback: Need to change capital with life expectancy .
Output: SELECT Name ,  Population ,  LifeExpectancy FROM country WHERE Continent  =  "Asia" ORDER BY SurfaceArea DESC LIMIT 1
SQL: SELECT Region FROM country WHERE Name = "Dutch" OR Name = "English"
Feedback: There should be language in place of name .
Output: SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code  =  T2.CountryCode WHERE T2.Language  =  "English" OR T2.Language  =  "Dutch"
SQL: SELECT Abbreviation , Country FROM airlines GROUP BY Country ORDER BY Count ( * ) Asc LIMIT 1
Feedback: use airline and flight table instead of country and airline table.
Output: SELECT T1.Abbreviation ,  T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid  =  T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1
SQL: SELECT current_address_id , email_address FROM Students GROUP BY permanent_address_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: I want id of current address from 1st step and id of address, line 1, line 2, line 3 from 2nd step.
Output: SELECT T1.address_id ,  T1.line_1 ,  T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.AirportName FROM airports AS T1 WHERE T1.AirportCode NOT IN ( SELECT T2.DestAirport FROM flights AS T2 )
Feedback: Also mention " or source airport in step 1.
Output: SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights)
SQL: SELECT Template_Type_Code , Count ( * ) FROM Templates GROUP BY Template_Type_Code
Feedback: You need to search all the similar rows for individual value of documents table.
Output: SELECT T1.template_type_code ,  count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id  =  T2.template_id GROUP BY T1.template_type_code
SQL: SELECT City FROM airports GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1
Feedback: i want " city of "destairport from table of flights " in step 1.
Output: SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode  =  T2.DestAirport GROUP BY T1.City ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Air_Date , Episode FROM TV_series WHERE Episode = "A Love of a Lifetime"
Feedback: You need to search for the air date.
Output: SELECT Air_Date FROM TV_series WHERE Episode = "A Love of a Lifetime"
SQL: SELECT Max ( T3.Horsepower ) 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 T1.Model = "amc" OR T3.Year < 1
Feedback: Change horsepower with mpg , model list's model with cylinders equals 8 and ensure year less than 1980.
Output: SELECT mpg FROM CARS_DATA WHERE Cylinders  =  8 OR YEAR  <  1980 ORDER BY mpg DESC LIMIT 1
SQL: SELECT T1.first_name , T1.country_code FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.loser_id GROUP BY T2.loser_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Supplant matches with rankings in step 1 , Only find value of ranking's tours in step 2.
Output: SELECT T1.country_code ,  T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id  =  T2.player_id ORDER BY T2.tours DESC LIMIT 1
SQL: SELECT DestAirport FROM flights GROUP BY DestAirport ORDER BY Count ( * ) Asc LIMIT 1
Feedback: in step 1 and 2, use airport code instead of destination airport.
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(*) LIMIT 1