niryuu/sni-each-converted huggingface dataset:
SQL: SELECT Customer_Name FROM Clients EXCEPT SELECT Customer_Name FROM Clients
Feedback: In step 2 , make sure customers have bookings .
Output: SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID  =  T2.Client_ID
SQL: SELECT Name FROM roller_coaster ORDER BY Height Asc
Feedback: Make sure ordered ascending by length .
Output: SELECT Name FROM roller_coaster ORDER BY LENGTH ASC
SQL: SELECT Count ( * ) FROM College WHERE enr > "yes"
Feedback: Replace college table with tryout table and make sure decision equals yes .
Output: SELECT count(*) FROM tryout WHERE decision  =  'yes'
SQL: SELECT Revenue , Revenue FROM Manufacturers
Feedback: Need to find all rows of products table and manufacturers table .
Output: SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code
SQL: SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY Count ( * ) Asc LIMIT 1
Feedback: Find number of rows of customer id in customer orders table where order status equals purchased in step 1.
Output: SELECT t1.payment_method 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 GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1
SQL: SELECT Name , City FROM branch EXCEPT SELECT Name , City FROM branch
Feedback: Only find for without any registered members in membership register branch .
Output: SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)
SQL: SELECT Title , Director FROM movie WHERE Gross_worldwide > = 2000 ORDER BY Gross_worldwide Desc LIMIT 1
Feedback: Replace first gross worldwide with year and replace greater with lesser or equals to 2000
Output: SELECT title ,  director FROM movie WHERE YEAR  <=  2000 ORDER BY gross_worldwide DESC LIMIT 1
SQL: SELECT T1.pName , T2.pPos FROM Player AS T1 JOIN Tryout AS T2 ON T1.pID = T2.pID WHERE T1.HS < 1500
Feedback: Need to find training hours instead of player position .
Output: SELECT pName ,  HS FROM Player WHERE HS  <  1500
SQL: SELECT T1.state FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = "goalie" INTERSECT SELECT T2.cName FROM Tryout AS T2 WHERE T2.pPos = "mid"
Feedback: In step 3 , need to find "state" instead of "Tryout's college name of tryout table"
Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid'
SQL: SELECT Count ( * ) FROM Customers WHERE customer_name = "Rodrick Heaney"
Feedback: Make sure to find unique product id of order items .
Output: SELECT count(DISTINCT t3.product_id) 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.customer_name  =  "Rodrick Heaney"
SQL: SELECT Avg ( T1.HS ) FROM Player AS T1 WHERE T1.pID NOT IN ( SELECT T2.pID FROM Tryout AS T2 )
Feedback: In step 1 also make sure Tryout's decision equals Yes .
Output: SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'no'
SQL: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN Invoices AS T2 ON T1.Order_ID = T2.Order_ID JOIN Invoice_Items AS T3 ON T2.Invoice_ID = T3.Invoice_ID WHERE T3.Order_Quantity = 1
Feedback: should be actual delivery date instead of order date
Output: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID WHERE T2.Order_Quantity  =  1
SQL: SELECT T1.Name , T1.Open_year FROM branch AS T1 JOIN membership_register_branch AS T2 ON T1.Branch_ID = T2.Branch_ID GROUP BY T2.Branch_ID ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Add register year equals 2016.
Output: SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT pName , HS FROM Player
Feedback: Make sure Tryout's decision for those students equals yes .
Output: SELECT T1.pName ,  T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes'
SQL: SELECT Avg ( Price ) , Name FROM Products GROUP BY Name
Feedback: Replace products table with manufacturer table and should be corresponding rows to each product .
Output: SELECT avg(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name
SQL: SELECT decision FROM Tryout WHERE pPos = "striker"
Feedback: Replace decision of tryout table with state of college table
Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'striker'
SQL: SELECT T1.Headquarter FROM Manufacturers AS T1 JOIN Products AS T2 ON T1.Code = T2.Manufacturer WHERE T2.Name = "James"
Feedback: Should replace "Products' Name" with "Manufacturers's Founder"
Output: SELECT headquarter FROM manufacturers WHERE founder  =  'James'
SQL: SELECT Store_Name FROM Stores
Feedback: Replace stores table with reference service types .
Output: SELECT Store_Name FROM Drama_Workshop_Groups
SQL: SELECT Count ( * ) FROM Customer_Orders WHERE order_status = "Cancelled"
Feedback: Need to find corresponding total number of products
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_status  =  "Cancelled"
SQL: SELECT customer_name FROM Customers EXCEPT SELECT customer_name FROM Customers
Feedback: In step 2 , there should be ordered product details equals Latte .
Output: SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name 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 JOIN products AS t4 ON t3.product_id  =  t4.product_id WHERE t4.product_details  =  'Latte'
SQL: SELECT Avg ( HS ) , Max ( HS ) FROM Player
Feedback: Find for students for whom Tryout's decision equals yes .
Output: SELECT avg(T1.HS) ,  max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes'
SQL: SELECT T2.Customer_Email_Address FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = "Alaska"
Feedback: change performers table with drama workshop groups also change customer email address with store email address
Output: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.State_County  =  "Alaska"
SQL: SELECT Count ( * ) FROM Ref_Characteristic_Types
Feedback: Need to find summation of colors from reference colors
Output: SELECT count(*) FROM ref_colors
SQL: SELECT T1.Rank FROM captain AS T1 WHERE T1.Class = "Cutter" INTERSECT SELECT T1.Rank FROM captain AS T1 JOIN Ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Type = "Armed schooner"
Feedback: Should replace type with captain's class in step 3.
Output: SELECT rank FROM captain WHERE CLASS  =  'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS  =  'Armed schooner'
SQL: SELECT Fname , LName FROM Student EXCEPT SELECT Fname , LName FROM Student WHERE Major = 1
Feedback: In step 2 , need to find largest value of major .
Output: SELECT fname ,  lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)
SQL: SELECT Avg ( T2.Price ) FROM appellations AS T1 JOIN wine AS T2 ON T1.Appelation = T2.Appelation WHERE T1.State = "Sonoma"
Feedback: Need to replace state with county in step 2.
Output: SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Sonoma"
SQL: SELECT Max ( T1.HS ) , T2.pPos FROM Player AS T1 JOIN Tryout AS T2 ON T1.pID = T2.pID GROUP BY T2.pPos
Feedback: Make sure maximum training hours is greater than training hours of any student with training hours equals 1000.
Output: SELECT max(T1.HS) ,  pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T1.HS  >  1000 GROUP BY T2.pPos
SQL: SELECT Count ( * ) FROM railway AS T1 WHERE T1.Railway_ID NOT IN ( SELECT T2.Railway_ID FROM train AS T2 )
Feedback: It should find railway's objectnumber along with step 2 results .
Output: SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)
SQL: SELECT T2.customer_name , T1.city , T1.state_province_county FROM Addresses AS T1 JOIN Customers AS T2 JOIN Customer_Address_History AS T3 ON T1.address_id = T3.address_id AND T3.customer_id = T2.customer_id
Feedback: Remove state province county , also find date from and date to from customer address history table .
Output: SELECT T2.customer_name ,  T3.city ,  T1.date_from ,  T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id JOIN addresses AS T3 ON T1.address_id  =  T3.address_id
SQL: SELECT Name , Name FROM member ORDER BY Card_Number Asc
Feedback: Replace first name and card number with branch's name and membership register branch respectively
Output: SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year
SQL: SELECT T1.cName FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = "striker" INTERSECT SELECT T3.pName FROM Player AS T3 JOIN Tryout AS T2 ON T3.pID = T2.pID WHERE T2.pPos = "yes"
Feedback: There should be college name instead of player name and decision instead of player position in step 3.
Output: SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes' AND T2.pPos  =  'striker'
SQL: SELECT customer_name FROM Customers ORDER BY date_became_customer Desc LIMIT 1
Feedback: Replace date became customer with order date of customer orders table .
Output: SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.order_date DESC LIMIT 1
SQL: SELECT T2.Year , T2.Title , T1.Publisher FROM book_club AS T1 JOIN movie AS T2 JOIN culture_company AS T3 ON T1.book_club_id = T3.book_club_id AND T3.movie_id = T2.movie_id ORDER BY T2.Year Desc
Feedback: replace movie table with book club table and title with book title
Output: SELECT YEAR ,  book_title ,  publisher FROM book_club ORDER BY YEAR DESC
SQL: SELECT T2.Customer_Name FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = "Feliciaberg"
Feedback: There should be addresses table instead of performers table , Replace customer name with store name .
Output: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.City_Town  =  "Feliciaberg"
SQL: SELECT state FROM College WHERE enr > ( SELECT Max ( enr ) FROM College )
Feedback: Need to replace "greater" with "smaller" in step 2.
Output: SELECT DISTINCT state FROM college WHERE enr  <  (SELECT max(enr) FROM college)
SQL: SELECT T1.Name , T1.Hometown FROM member AS T1 JOIN branch AS T2 JOIN membership_register_branch AS T3 ON T1.Member_ID = T3.Member_ID AND T3.Branch_ID = T2.Branch_ID WHERE T2.Name = 2016
Feedback: Replace branch's name with membership register branch register year .
Output: SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016
SQL: SELECT Avg ( Price ) , Avg ( Score ) FROM wine WHERE Year = 2009
Feedback: Replace score with cases also make sure grape equals Zinfandel
Output: SELECT AVG(Price) ,  AVG(Cases) FROM WINE WHERE YEAR  =  2009 AND Grape  =  "Zinfandel"
SQL: SELECT product_name , Sum ( product_price ) FROM Products GROUP BY product_id
Feedback: Use product name instead of product id and order quantity instead of product price .
Output: SELECT T1.product_name ,  sum(T2.order_quantity) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id
SQL: SELECT cName FROM College ORDER BY cName Asc
Feedback: Replace college table with tryout table and make sure they are distinct .
Output: SELECT DISTINCT cName FROM tryout ORDER BY cName
SQL: SELECT T2.product_name FROM Characteristics AS T1 JOIN Products AS T2 JOIN Product_Characteristics AS T3 ON T1.characteristic_id = T3.characteristic_id AND T3.product_id = T2.product_id WHERE T1.characteristic_data_type = "yellow"
Feedback: Replace product characteristics table and characteristic data type with reference colors table and color description respectively
Output: SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  'yellow'
SQL: SELECT Count ( * ) FROM Products WHERE color_code = "hot"
Feedback: There should be characteristic name instead of color code .
Output: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t3.characteristic_name  =  "hot"
SQL: SELECT DISTINCT Appelation FROM wine
Feedback: Replace appelation with name and make sure grapes's color equals red .
Output: SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red"
SQL: SELECT city FROM Addresses GROUP BY city ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Use city corresponding to customers step 1.
Output: SELECT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id GROUP BY t3.city ORDER BY count(*) DESC LIMIT 1
SQL: SELECT characteristic_type_description FROM Ref_Characteristic_Types
Feedback: Make sure to find color description of reference colors
Output: SELECT color_description FROM ref_colors
SQL: SELECT Card_Number , Name , Hometown FROM member ORDER BY Card_Number Desc
Feedback: It should find descending order by level .
Output: SELECT card_number ,  name ,  hometown FROM member ORDER BY LEVEL DESC
SQL: SELECT city_code , Avg ( Age ) FROM Student GROUP BY city_code
Feedback: Instead finding each value of city code , Need to find count of students living in city .
Output: SELECT count(*) ,  avg(age) ,  city_code FROM student GROUP BY city_code
SQL: SELECT date_became_customer FROM Customers WHERE customer_id = 20 OR customer_id = 10
Feedback: Need to make sure customer id is between 10 to 20.
Output: SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20
SQL: SELECT Count ( * ) FROM member WHERE Hometown LIKE "Kentucky"
Feedback: Make sure to find card number .
Output: SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"
SQL: SELECT T1.cName FROM College AS T1 INTERSECT SELECT T2.cName FROM Tryout AS T2
Feedback: In step 1 , student whose player position equals goalie and step 2 , decision of tryout equals yes .
Output: SELECT cName FROM  tryout WHERE decision  =  'yes' AND pPos  =  'goalie'
SQL: SELECT Winery FROM wine WHERE Score > 90
Feedback: Replace winery with grape and make sure Grape's color is white .
Output: SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White" AND T2.score  >  90
SQL: SELECT name FROM swimmer GROUP BY name HAVING Count ( * ) > = 2
Feedback: Find number of rows of each value of id in record table in step 1.
Output: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id HAVING count(*)  >=  2
SQL: SELECT Fname FROM Student WHERE Age BETWEEN 25 AND 20
Feedback: Make sure whose city code equals PHL and age between 20 and 25.
Output: SELECT fname FROM student WHERE city_code  =  'PHL' AND age BETWEEN 20 AND 25
SQL: SELECT T1.address_content 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 LIKE "Maudie Kertzmann"
Feedback: There should be customer name equals Maudie Kertzmann in step 2.
Output: SELECT t3.address_content FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t1.customer_name  =  "Maudie Kertzmann"
SQL: SELECT T1.cName FROM College AS T1 WHERE T1.state NOT IN ( SELECT T2.cName FROM Tryout AS T2 WHERE T2.pPos = "goalie" )
Feedback: Need to find school name whose player position equals mid and player position not equals goalie .
Output: SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie'
SQL: SELECT Built , Count ( * ) FROM railway GROUP BY Builder
Feedback: Make sure to find distinct value of builder , should correspond rows to number of railways .
Output: SELECT Builder ,  COUNT(*) FROM railway GROUP BY Builder
SQL: SELECT City_Town , Count ( * ) FROM Addresses GROUP BY City_Town
Feedback: Should find the number of corresponding rows of drama workshop groups table for each city town .
Output: SELECT T1.City_Town ,  count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID GROUP BY T1.City_Town
SQL: SELECT T1.Name , T1.Location , Count ( * ) FROM station AS T1 JOIN train_station AS T2 ON T1.Station_ID = T2.Station_ID GROUP BY T2.Station_ID
Feedback: also find number of platforms .
Output: SELECT name ,  LOCATION ,  number_of_platforms FROM station
SQL: SELECT Sum ( T2.Total_pounds ) FROM member AS T1 JOIN purchase AS T2 ON T1.Member_ID = T2.Member_ID WHERE T1.Level = 6
Feedback: Need to find number of rows of purchase table instead of summation of total pounds .
Output: SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6
SQL: SELECT T2.active_from_date FROM Customers AS T1 JOIN Customer_Contact_Channels AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Tillman Ernser" ORDER BY T2.active_to_date Desc LIMIT 1
Feedback: Replace active from date with active to date . find first channel code of customer contact channels table in descending order of active to date .
Output: SELECT max(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name  =  "Tillman Ernser"
SQL: SELECT Count ( * ) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_category_code = "Spices" AND T1.product_category_description > 1000
Feedback: Need to find typical buying price in place of product category description in step 2.
Output: SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000
SQL: SELECT Count ( * ) FROM Products WHERE product_name = "laurel"
Feedback: Replace products table with characteristics table and make sure to find total number of characteristics .
Output: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t1.product_name  =  "laurel"
SQL: SELECT Winery FROM wine WHERE Appelation = "White" GROUP BY Appelation ORDER BY Count ( * ) Desc LIMIT 3
Feedback: In step 1 find the rows in grapes table whose color equals White .
Output: SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE  =  T2.GRAPE WHERE T1.Color  =  "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3
SQL: SELECT Avg ( Revenue ) , Min ( Revenue ) , Max ( Revenue ) FROM Manufacturers
Feedback: Replace the minimum revenue with summation of all revenue .
Output: SELECT avg(revenue) ,  max(revenue) ,  sum(revenue) FROM manufacturers
SQL: SELECT Other_Product_Service_Details FROM Products WHERE Product_Price > 2000
Feedback: Replace other product service details with other item details .
Output: SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_price  >  2000
SQL: SELECT customer_name , date_became_customer FROM Customers WHERE customer_name = "Email"
Feedback: Replace date became customer and customer name with active from date of customer contact channels table and channel code respectively .
Output: SELECT t1.customer_name ,  t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.channel_code  =  'Email'
SQL: SELECT T1.state FROM College AS T1 WHERE T1.state NOT IN ( SELECT T2.cName FROM Tryout AS T2 WHERE T2.pPos = "goalie" )
Feedback: In step 2 also need to make sure that player position equals mid .
Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie'
SQL: SELECT T2.product_name FROM Characteristics AS T1 JOIN Products AS T2 JOIN Product_Characteristics AS T3 ON T1.characteristic_id = T3.characteristic_id AND T3.product_id = T2.product_id WHERE T1.characteristic_data_type = "Handful" EXCEPT SELECT T2.product_name FROM Characteristics AS T1 JOIN Products AS T2 JOIN Product_Characteristics AS T3 ON T1.characteristic_id = T3.characteristic_id AND T3.product_id = T2.product_id WHERE T1.characteristic_data_type = "white"
Feedback: Replace product characteristics with reference colors , characteristics with reference product categories , characteristic data type(step 2) with unit of measure , characteristic data type(step 3) with color description , step 4 exchange" 3"with" 2" and " 2"with" 3".
Output: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"
SQL: SELECT Sum ( T1.enr ) FROM College AS T1 WHERE T1.state NOT IN ( SELECT T2.yCard FROM Player AS T2 )
Feedback: Remove step 1 andMake sure players player position equals goalie in step1. replace state with player id .
Output: SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie")
SQL: SELECT Sum ( Product_Price ) FROM Products WHERE Product_Name = "photo"
Feedback: Use order quantity in order items instead of product price in products table .
Output: SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_Name  =  "photo"
SQL: SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM Characteristics EXCEPT SELECT characteristic_name , other_characteristic_details , characteristic_data_type FROM Characteristics
Feedback: Make sure to find product's characteristics which have never been used .
Output: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
SQL: SELECT T1.Fname FROM Student AS T1 JOIN Lives_in AS T2 ON T1.StuID = T2.stuid ORDER BY T2.room_number Desc LIMIT 1
Feedback: Need to make sure students resides in dorm with highest amenities .
Output: SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid  =  T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid  =  T5.amenid GROUP BY T3.dormid ORDER BY count(*) DESC LIMIT 1)
SQL: SELECT Count ( * ) FROM Products AS T1 WHERE T1.product_id NOT IN ( SELECT T2.product_id FROM Product_Characteristics AS T2 )
Feedback: Find all raws of distinct color code of reference colors instead of product id of product characteristics table .
Output: SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )
SQL: SELECT T1.cName FROM College AS T1 JOIN Player AS T2 JOIN Tryout AS T3 ON T1.cName = T3.cName AND T3.pID = T2.pID WHERE T2.pName LIKE "D%"
Feedback: replace "contains" with "equals".
Output: SELECT T1.cName FROM  tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID WHERE T2.pName LIKE 'D%'
SQL: SELECT T1.City FROM branch AS T1 EXCEPT SELECT T1.City FROM branch AS T1 JOIN purchase AS T2 ON T1.Branch_ID = T2.Branch_ID WHERE T2.Total_pounds > 100
Feedback: Need to make sure city have branches with members smaller than 100.
Output: SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100
SQL: SELECT T1.cName FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T1.enr > "FL" GROUP BY T2.cName HAVING Count ( * ) > = 1
Feedback: Make sure colleges is greater one or more colleges of state equals Florida .
Output: SELECT DISTINCT cName FROM college WHERE enr  >  (SELECT min(enr) FROM college WHERE state  =  'FL')
SQL: SELECT T2.Name FROM stadium AS T1 JOIN event AS T2 ON T1.ID = T2.Stadium_ID ORDER BY T1.Opening_year Desc LIMIT 1
Feedback: Replace opening year with year .
Output: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
SQL: SELECT Name FROM station ORDER BY Number_of_Platforms Desc LIMIT 1
Feedback: Need to find for the station with highest numbers of trains .
Output: SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM station
Feedback: use train table instead of station table
Output: SELECT count(*) FROM train
SQL: SELECT Marketing_Region_Name FROM Marketing_Regions GROUP BY Marketing_Region_Code ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Need to replace marketing regions table with drama workshop groups Table and marketing region name with marketing region code .
Output: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1
SQL: SELECT customer_details FROM Customers WHERE customer_details LIKE "Miss"
Feedback: Replace customer details with other details in both and customers table with residents table .
Output: SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
SQL: SELECT Count ( * ) FROM Ref_Payment_Methods
Feedback: Replace reference payment methods table with customers table .
Output: SELECT count(*) FROM CUSTOMERS
SQL: SELECT Avg ( active_from_date ) FROM Customer_Contact_Channels
Feedback: Find average difference of active to date to active from date .
Output: SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels
SQL: SELECT Count ( DISTINCT Headquarter ) FROM Manufacturers
Feedback: Need to find the number of distinct products manufacturers at different headquarter .
Output: SELECT count(DISTINCT T1.name) ,  T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.Headquarter
SQL: SELECT name , Nationality FROM swimmer WHERE meter_100 > 1
Feedback: Replace "meter 100 greater than 1" with "record's result equals Win"
Output: SELECT t1.name ,  t1.nationality FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win' GROUP BY t2.swimmer_id HAVING count(*)  >  1
SQL: SELECT Sum ( Revenue ) FROM Manufacturers WHERE Headquarter = "Austin"
Feedback: revenue should be more than revenue of any company which are situated in Austin .
Output: SELECT sum(revenue) FROM manufacturers WHERE revenue  >  (SELECT min(revenue) FROM manufacturers WHERE headquarter  =  'Austin')
SQL: SELECT Count ( * ) FROM Student AS T1 JOIN Dorm AS T2 JOIN Lives_in AS T3 ON T1.StuID = T3.stuid AND T3.dormid = T2.dormid WHERE T1.Sex = "Smith Hall" AND T2.gender = "F"
Feedback: There should be dorm name instead of sex and sex instead of gender .
Output: SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.dorm_name  =  'Smith Hall' AND T1.sex  =  'F'
SQL: SELECT LName FROM Student WHERE city_code = "M" OR Age < 20
Feedback: Find "Sex equals F or city code equals BAL"or"Sex equals M and age less than 20".
Output: SELECT lname FROM student WHERE sex  =  'F' AND city_code  =  'BAL' UNION SELECT lname FROM student WHERE sex  =  'M' AND age  <  20
SQL: SELECT Sum ( Revenue ) FROM Manufacturers WHERE Founder = "Andy"
Feedback: Remove "whose founder equals Andy" and make sure to find for any founder
Output: SELECT sum(revenue) ,  founder FROM manufacturers GROUP BY founder
SQL: SELECT address_content FROM Addresses WHERE country = "Gleasonmouth" AND state_province_county = "Arizona"
Feedback: Make sure "city equals East Julianaside , state province county equals" Texas or "city equals Gleasonmouth , state province county equals Arizona"
Output: SELECT address_content FROM addresses WHERE city  =  "East Julianaside" AND state_province_county  =  "Texas" UNION SELECT address_content FROM addresses WHERE city  =  "Gleasonmouth" AND state_province_county  =  "Arizona"
SQL: SELECT customer_name FROM Customers GROUP BY customer_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Should find number of rows of each value of customer id in customer orders table in step 1.
Output: SELECT t1.customer_name 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 GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1
SQL: SELECT Railway_ID , Builder FROM railway GROUP BY Railway_ID ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Replace railway table with train table in step 1.
Output: SELECT T2.Railway_ID ,  T1.Builder FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID ORDER BY COUNT(*) DESC LIMIT 1
SQL: SELECT T1.City_Town FROM Addresses AS T1 JOIN Clients AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T2.Address_ID HAVING Count ( * ) < = 1
Feedback: find customer id of customers table in step 2. make sure greater than or equals 1 in step 3 and city does not have performer .
Output: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID  =  T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID  =  T2.Address_ID
SQL: SELECT Avg ( product_price ) FROM Products
Feedback: Make sure product type code equals clothes .
Output: SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'
SQL: SELECT Count ( DISTINCT T1.state ) FROM College AS T1 WHERE T1.state NOT IN ( SELECT T2.cName FROM Tryout AS T2 WHERE T2.pPos = "goalie" )
Feedback: In step 1 also need to satisfies "pPos not equals mid" condition .
Output: SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie')
SQL: SELECT Name FROM Manufacturers WHERE Founder = "Creative Labs" INTERSECT SELECT Name FROM Manufacturers WHERE Founder = "Sony"
Feedback: Find products table in both step 1 and 2 instead of Manufacturers table , Replace founder with Manufacturers's name in step 1 and 2.
Output: SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  'Sony'
SQL: SELECT characteristic_name FROM Characteristics GROUP BY characteristic_type_code HAVING Count ( * ) > = 2
Feedback: Need to make sure value of characters present in products are two or more .
Output: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
SQL: SELECT Count ( * ) FROM Ref_Payment_Methods
Feedback: Replace reference payment methods table with bookings table .
Output: SELECT count(*) FROM BOOKINGS
SQL: SELECT Planned_Delivery_Date , Order_Date FROM Bookings
Feedback: Replace order date with actual delivery date .
Output: SELECT Planned_Delivery_Date ,  Actual_Delivery_Date FROM BOOKINGS
SQL: SELECT Railway_ID , Location FROM railway GROUP BY Railway_ID HAVING Count ( * ) > 1
Feedback: Replace railway table with train table .
Output: SELECT T2.Railway_ID ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID GROUP BY T2.Railway_ID HAVING COUNT(*)  >  1
SQL: SELECT pName FROM Player ORDER BY HS Desc
Feedback: Make sure yes card equals yes .
Output: SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC
SQL: SELECT Count ( * ) FROM Ref_Characteristic_Types
Feedback: products table instead of reference characteristic types table .
Output: SELECT count(*) FROM products
SQL: SELECT Speed FROM roller_coaster ORDER BY Height Desc LIMIT 1
Feedback: There should be length instead of height .
Output: SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1
SQL: SELECT DISTINCT payment_method_code FROM Invoices
Feedback: Also need to find total value of orders made through that methods .
Output: SELECT payment_method_code ,  count(*) FROM INVOICES GROUP BY payment_method_code
SQL: SELECT T2.dorm_name FROM Student AS T1 JOIN Dorm AS T2 JOIN Lives_in AS T3 ON T1.StuID = T3.stuid AND T3.dormid = T2.dormid WHERE T1.LName = "Smith"
Feedback: Replace dorm table and first name with dorm amenity table and amenity name respectively .
Output: SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid JOIN lives_in AS T4 ON T4.dormid  =  T1.dormid JOIN student AS T5 ON T5.stuid  =  T4.stuid WHERE T5.lname  =  'Smith'
SQL: SELECT DISTINCT Winery FROM wine WHERE Year > = 2000
Feedback: Use "Name" in place of "Winery" , and ( make sure)Year smaller than 2000 or greater than 2010.
Output: SELECT DISTINCT Name FROM WINE WHERE YEAR  <  2000 OR YEAR  >  2010
SQL: SELECT T1.state FROM College AS T1 INTERSECT SELECT T2.decision FROM Tryout AS T2
Feedback: In step 1 college name of corresponding states are(present ) in tryout table , in step 2 decision(should ) equals yes .
Output: SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes'
SQL: SELECT T1.characteristic_name FROM Characteristics AS T1 JOIN Products AS T2 JOIN Product_Characteristics AS T3 ON T1.characteristic_id = T3.characteristic_id AND T3.product_id = T2.product_id WHERE T2.product_name = "Herbs"
Feedback: Replace product characteristics , characteristic name and product name with reference product categories , unit of measure and product category code . Remove "in characteristics table and".
Output: SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"
SQL: SELECT product_name , typical_buying_price FROM Products WHERE product_description = "yellow"
Feedback: Also find typical selling price , Replace product description with color description .
Output: SELECT t1.product_name ,  t1.typical_buying_price ,  t1.typical_selling_price FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "yellow"
SQL: SELECT Count ( * ) FROM appellations WHERE Appelation = "Napa"
Feedback: It should be county instead of appelation .
Output: SELECT count(*) FROM APPELLATIONS WHERE County  =  "Napa"
SQL: SELECT T1.Title , T2.Company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T2.Company_name = "China"
Feedback: Also corresponds book club table . Need to find book title instead of 1st company name , Replace 2nd company name with incorporated in .
Output: SELECT T1.title ,  T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id  =  T2.movie_id JOIN book_club AS T3 ON T3.book_club_id  =  T2.book_club_id WHERE T2.incorporated_in  =  'China'
SQL: SELECT DISTINCT City FROM branch GROUP BY City HAVING Count ( * ) > = 100
Feedback: In step 1 , there should be membership amount in place of city .
Output: SELECT DISTINCT city FROM branch WHERE membership_amount  >=  100
SQL: SELECT Name FROM member GROUP BY Name ORDER BY Count ( * ) Desc LIMIT 3
Feedback: In step 1 , replace name in member table with membership amount of branch . In step 2 , substitute branch table for member table .
Output: SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3
SQL: SELECT Appelation FROM wine GROUP BY Appelation HAVING Count ( * ) < = 3
Feedback: There should be appellations's county instead of appelation in wine table .
Output: SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING count(*)  <=  3
SQL: SELECT Count ( * ) FROM swimmer
Feedback: Replace swimmer table with stadium table .
Output: SELECT count(*) FROM stadium
SQL: SELECT Order_ID FROM Invoices GROUP BY Product_ID ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Exchange product id and order id with each other in step 2
Output: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1
SQL: SELECT Count ( * ) FROM Products WHERE Price > 240 OR Price < 180
Feedback: "less than 240" needs to be replaced by "equals 180".
Output: SELECT count(*) FROM products WHERE price >= 180
SQL: SELECT product_id FROM Products GROUP BY product_id ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Replace products table with order items table in step 1.
Output: SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT Name , Count ( * ) FROM station GROUP BY Station_ID
Feedback: Should count total number of trains per station and station's name as well .
Output: SELECT T2.name ,  count(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id
SQL: SELECT customer_name FROM Customers WHERE payment_method_code = 2 INTERSECT SELECT customer_name FROM Customers WHERE payment_method_code > "Credit Card"
Feedback: Replace" 2" with "Credit Card"instep 1 , find only those customer who made greater than 2 orders in step 2.
Output: SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.payment_method_code  =  'Credit Card' GROUP BY T1.customer_id HAVING count(*)  >  2
SQL: SELECT Store_Phone , Store_Email_Address FROM Stores
Feedback: Replace stores with drama workshop groups and only find whose corresponding workshop group id is present in services table .
Output: SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID
SQL: SELECT Count ( * ) FROM College
Feedback: Need to find summation of enrollment .
Output: SELECT sum(enr) FROM College
SQL: SELECT T2.Title , T1.Author_or_Editor FROM book_club AS T1 JOIN movie AS T2 JOIN culture_company AS T3 ON T1.book_club_id = T3.book_club_id AND T3.movie_id = T2.movie_id WHERE T2.Year > 1989
Feedback: There should be book club's year instead of movie's year .
Output: SELECT book_title ,  author_or_editor FROM book_club WHERE YEAR  >  1989
SQL: SELECT state FROM College WHERE cName = "Charles"
Feedback: Need to find college name instead of player name .
Output: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName JOIN player AS T3 ON T2.pID  =  T3.pID WHERE T3.pName  =  'Charles'
SQL: SELECT cName FROM Tryout WHERE pPos = "mid"
Feedback: Need to make sure to find for player position equals mid and player position equals goal .
Output: SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid'
SQL: SELECT product_name FROM Products ORDER BY product_price Desc LIMIT 1
Feedback: Make sure product type code equals Hardware .
Output: SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1
SQL: SELECT name FROM stadium GROUP BY name ORDER BY Count ( * ) Desc LIMIT 1
Feedback: Need to substitute name in stadium table with swimmer id of record table in step 1.
Output: SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id  =  t2.id JOIN stadium AS t3 ON t3.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
SQL: SELECT T1.cName FROM College AS T1 JOIN Player AS T2 JOIN Tryout AS T3 ON T1.cName = T3.cName AND T3.pID = T2.pID ORDER BY T2.HS Desc LIMIT 3
Feedback: Make sure to find with descending order of player id instead of state in step 2.
Output: SELECT cName FROM college ORDER BY enr DESC LIMIT 3
SQL: SELECT T1.Area FROM appellations AS T1 JOIN wine AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Year < 2010 GROUP BY T1.Area ORDER BY Count ( * ) Desc LIMIT 1
Feedback: In step 3 , substitute area with appelation of wine .
Output: SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING T2.year  <  2010 ORDER BY count(*) DESC LIMIT 1
SQL: SELECT name FROM swimmer
Feedback: Also find id , nationality , meter 100 of swimmer table .
Output: SELECT * FROM swimmer
SQL: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = "IN" OR T2.Marketing_Region_Code = "CA"
Feedback: Only need to find for marketing region code equals CA in step 2.
Output: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Marketing_Region_Code  =  "CA"
SQL: SELECT Count ( * ) FROM Student
Feedback: Need to find for dorm table with student table .
Output: SELECT count(*) FROM dorm
SQL: SELECT Count ( * ) FROM Products WHERE product_name = "sesame"
Feedback: It should be product characteristics table instead of products table .
Output: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "sesame"
SQL: SELECT Founder FROM Manufacturers WHERE Founder = "Sony"
Feedback: Replace 2nd founder with name .
Output: SELECT founder FROM manufacturers WHERE name  =  'Sony'
SQL: SELECT country FROM Addresses GROUP BY country HAVING Count ( * ) > 4
Feedback: There should be different address content instead of number of rows in step 1.
Output: SELECT country FROM addresses GROUP BY country HAVING count(address_id)  >  4
SQL: SELECT Name FROM wine WHERE Year < "Brander"
Feedback: It should find for year less year of winery equals Brander .
Output: SELECT Name FROM WINE WHERE YEAR  <  (SELECT min(YEAR) FROM WINE WHERE Winery  =  "Brander")
SQL: SELECT dorm_name , student_capacity FROM Dorm ORDER BY dorm_name Asc LIMIT 1
Feedback: Make sure it have minimum number of amenities .
Output: SELECT T1.dorm_name ,  T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1
SQL: SELECT T1.customer_name , T1.date_became_customer FROM Customers AS T1 JOIN Customer_Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Delivered"
Feedback: Should find order date instead of date became customer in step 2.
Output: SELECT t1.customer_name ,  t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id WHERE order_status  =  "Delivered"
SQL: SELECT Count ( * ) FROM member
Feedback: Make sure to find distinct number of level .
Output: SELECT count(DISTINCT LEVEL) FROM member
SQL: SELECT Sex , Count ( * ) FROM Student WHERE Sex = "F" GROUP BY Sex
Feedback: In step 1 , find average age for both sex , in step 2 , find number of student whose age greater than step1 result .
Output: SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex
SQL: SELECT Name , Time FROM train ORDER BY Time Desc
Feedback: Make sure station's location equals London .
Output: SELECT T3.name ,  T3.time FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id WHERE T2.location  =  'London' ORDER BY T3.time DESC
SQL: SELECT DISTINCT Company_name FROM culture_company WHERE Type = "Alyson"
Feedback: There should be book club's publisher instead of type .
Output: SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id  =  T2.book_club_id WHERE T2.publisher  =  'Alyson'
SQL: SELECT Count ( DISTINCT T2.cName ) FROM Player AS T1 JOIN Tryout AS T2 ON T1.pID = T2.pID WHERE T1.pName = "mid" AND T2.pPos = "goalie"
Feedback: There should be player id instead of college name .
Output: SELECT COUNT(*) FROM (SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid')
SQL: SELECT Count ( * ) FROM Manufacturers AS T1 WHERE T1.Code NOT IN ( SELECT T2.Manufacturer FROM Products AS T2 )
Feedback: Need to find Manufacturers's name equals Sony in step 1 , Replace manufacturer table with products table and code with name in step 2.
Output: SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  'Sony')
SQL: SELECT customer_id , customer_details FROM Customers GROUP BY customer_id HAVING Count ( * ) > = 3
Feedback: Replace customers table with customer events table in step 1.
Output: SELECT T1.customer_id ,  T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  3
SQL: SELECT Customer_Event_ID , date_moved_in , date_moved_in FROM Customer_Events
Feedback: Remove second "date moved in" and instead find property id .
Output: SELECT customer_event_id ,  date_moved_in ,  property_id FROM customer_events
SQL: SELECT DISTINCT T2.product_name FROM Characteristics AS T1 JOIN Products AS T2 JOIN Product_Characteristics AS T3 ON T1.characteristic_id = T3.characteristic_id AND T3.product_id = T2.product_id WHERE T1.characteristic_data_type LIKE "warm"
Feedback: Need to find for characteristic name instead of characteristic data type .
Output: SELECT DISTINCT t1.product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t3.characteristic_name  =  "warm"
SQL: SELECT date_moved_in FROM Residents ORDER BY date_moved_out Asc LIMIT 1
Feedback: Should find with "largest value of date moved in instead of "smallest value of date moved out".
Output: SELECT max(date_moved_in) FROM Residents
SQL: SELECT Location FROM station EXCEPT SELECT Location FROM station GROUP BY Location HAVING Count ( * ) > = 15
Feedback: Instep 2 , there should be number of platforms instead of location .
Output: SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms  >=  15
SQL: SELECT Winery , Name FROM wine
Feedback: Need to find grape and appelation instead of winery and name .
Output: SELECT Grape ,  Appelation FROM WINE
SQL: SELECT customer_id , customer_name FROM Customers WHERE payment_method_code = "Credit Card" EXCEPT SELECT customer_id , customer_name FROM Customers WHERE payment_method_code = "WY"
Feedback: In step 1 , replace"payment method code equals Credit Card" with customer address contains WY state , in step 2 , replace "WY" with Credit Card .
Output: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
SQL: SELECT amenity_name FROM Dorm_amenity ORDER BY amenity_name Asc
Feedback: Make sure to find for dorm 's dorm name equals Anonymous Donor Hall , sort only alphabetically .
Output: SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid  =  T1.amenid JOIN dorm AS T3 ON T2.dormid  =  T3.dormid WHERE T3.dorm_name  =  'Anonymous Donor Hall' ORDER BY T1.amenity_name
SQL: SELECT Built , Location FROM railway
Feedback: Replace built with name , Make sure corresponding railway id for given location is present in train table .
Output: SELECT T2.Name ,  T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID  =  T2.Railway_ID
SQL: SELECT T1.cName FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T1.enr > 18000 GROUP BY T2.cName ORDER BY Count ( * ) Desc
Feedback: Replace descending with ascending instep 4.
Output: SELECT cName FROM College WHERE enr  >  18000 ORDER BY cName