niryuu/sni-each-converted huggingface dataset:
find the first_name, last_name of customer table with smallest value of create_date
Output: SELECT first_name , last_name FROM customer ORDER BY create_date Asc LIMIT 1
find the average price_in_dollars and the maximum price_in_pounds in Catalog_Contents table
Output: SELECT Avg ( price_in_dollars ) , Max ( price_in_pounds ) FROM Catalog_Contents
Step 1: find the Track_ID of race table for which Class equals GT.
Step 2: find the track's Name of track table whose Track_ID not one of the results of step 1
Output: SELECT T1.Name FROM track AS T1 WHERE T1.Track_ID NOT IN ( SELECT T2.Track_ID FROM race AS T2 WHERE T2.Class = "GT" )
Step 1: find the StuID of Student table for which Age equals 18.
Step 2: find the StuID of Student table for which Age equals 20.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT StuID FROM Student WHERE Age = 18 INTERSECT SELECT StuID FROM Student WHERE Age = 20
find the number of rows in captain table
Output: SELECT Count ( * ) FROM captain
find the average Price in wine table whose State not equals Sonoma
Output: SELECT Avg ( Price ) FROM wine WHERE State ! = "Sonoma"
Step 1: For each row in Catalog_Structure table, find corresponding rows in Catalogs table and in Catalog_Contents table.
Step 2: find catalog_name, date_of_publication of the results of step 1 whose price_in_pounds greater than 5
Output: SELECT T1.catalog_name , T1.date_of_publication FROM Catalogs AS T1 JOIN Catalog_Structure AS T2 ON T1.catalog_id = T2.catalog_id JOIN Catalog_Contents AS T3 ON T2.catalog_level_number = T3.catalog_level_number WHERE T3.price_in_pounds > 5
Step 1: For each row in affected_region table, find corresponding rows in storm table and in region table.
Step 2: find Name of the results of step 1 whose Region_code equals Denmark
Output: SELECT T1.Name FROM storm AS T1 JOIN region AS T2 JOIN affected_region AS T3 ON T1.Storm_ID = T3.Storm_ID AND T3.Region_id = T2.Region_id WHERE T2.Region_code = "Denmark"
find the title of course table
Output: SELECT title FROM course
find the number of rows in Addresses table whose city equals Lake Geovannyton
Output: SELECT Count ( * ) FROM Addresses WHERE city = "Lake Geovannyton"
Step 1: For each row in Suppliers table, find the corresponding rows in Product_Suppliers table.
Step 2: for each value of supplier_name in the results of step 1, calculate average total_value_purchased.
Step 3: show each value of supplier_name in the results of step 1 along with the average total_value_purchased with largest value in the results of step 2
Output: SELECT T1.supplier_name , Avg ( T2.total_value_purchased ) FROM Suppliers AS T1 JOIN Product_Suppliers AS T2 ON T1.supplier_id = T2.supplier_id GROUP BY T1.supplier_name ORDER BY Avg ( T2.total_value_purchased ) Desc LIMIT 1
find the number of rows in Physician table whose Name equals John Dorian
Output: SELECT Count ( * ) FROM Physician WHERE Name = "John Dorian"
Step 1: find the number of rows of each value of film_id in film table.
Step 2: find title, film_id of film table with largest value in the results of step 1
Output: SELECT title , film_id FROM film GROUP BY film_id ORDER BY Count ( * ) Desc LIMIT 1
find the number of rows in Customers table whose other_customer_details equals Second time
Output: SELECT Count ( * ) FROM Customers WHERE other_customer_details = "Second time"
Step 1: find the city of Addresses table.
Step 2: find the city of Addresses table.
Step 3: show the rows that are in the results of step 1 but not in the results of step 2
Output: SELECT city FROM Addresses EXCEPT SELECT city FROM Addresses
Step 1: For each row in country table, find the corresponding rows in roller_coaster table.
Step 2: find country's Name, Area, Population of the results of step 1 whose Speed greater than 60.
Step 3: find country's Name, Area, Population of the results of step 1 whose Speed equals 55.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T2.Name , T2.Area , T2.Population FROM roller_coaster AS T1 JOIN country AS T2 ON T1.Country_ID = T2.Country_ID WHERE T1.Speed > 60 INTERSECT SELECT T2.Name , T2.Area , T2.Population FROM roller_coaster AS T1 JOIN country AS T2 ON T1.Country_ID = T2.Country_ID WHERE T1.Speed = 55
find the minimum Order_Quantity, the maximum Order_Quantity and the average Order_Quantity in Invoice_Items table
Output: SELECT Min ( Order_Quantity ) , Max ( Order_Quantity ) , Avg ( Order_Quantity ) FROM Invoice_Items
find the average strength in Player_Attributes table
Output: SELECT Avg ( strength ) FROM Player_Attributes
find the summation of Budgeted in budget table whose Year equals Glenn
Output: SELECT Sum ( Budgeted ) FROM budget WHERE Year = "Glenn"
Step 1: For each row in aircraft table, find the corresponding rows in flight table.
Step 2: find name of the results of step 1 whose flno contains 99
Output: SELECT T2.name FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid WHERE T1.flno LIKE 99
Step 1: For each row in wrestler table, find the corresponding rows in Elimination table.
Step 2: find without repetition Name of the results of step 1 whose Team not equals Tokyo , Japan
Output: SELECT DISTINCT T1.Name FROM wrestler AS T1 JOIN Elimination AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID WHERE T2.Team ! = "Tokyo , Japan"
find the number of rows in country table whose country equals Australia
Output: SELECT Count ( * ) FROM country WHERE country = "Australia"
Step 1: For each row in enzyme table, find the corresponding rows in medicine_enzyme_interaction table.
Step 2: find interaction_type of the results of step 1 whose name equals ALA synthase and Porphyria equals Aripiprazole
Output: SELECT T2.interaction_type FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id WHERE T1.name = "ALA synthase" AND T1.Porphyria = "Aripiprazole"
Step 1: For each row in Player table, find the corresponding rows in Player_Attributes table.
Step 2: find player_name of the results of step 1 whose overall_rating less than 90.
Step 3: find player_name of the results of step 1 whose overall_rating less than 85.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T2.player_name FROM Player_Attributes AS T1 JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.overall_rating < 90 INTERSECT SELECT T2.player_name FROM Player_Attributes AS T1 JOIN Player AS T2 ON T1.player_fifa_api_id = T2.player_fifa_api_id WHERE T1.overall_rating < 85
find the Name of Physician table
Output: SELECT Name FROM Physician
Step 1: For each row in course table, find the corresponding rows in section table.
Step 2: find the  building in the results of step 1 whose dept_name equals Psychology ordered ascending by title
Output: SELECT T2.building , T2.room_number , T2.year FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = "Psychology" ORDER BY T1.title Asc
find the Draft_Class, Season of match_season table for which Position equals Defender
Output: SELECT Draft_Class , Season FROM match_season WHERE Position = "Defender"
Step 1: find the number of rows of each value of catalog_name in Catalogs table.
Step 2: find catalog_name of Catalogs table with largest value in the results of step 1
Output: SELECT catalog_name FROM Catalogs GROUP BY catalog_name ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the cName of College table for which state equals AZ.
Step 2: find cName of College table whose enr greater than 15000 and state equals LA.
Step 3: show the rows that are in any of the results of step 1 or the results of step 2
Output: SELECT cName FROM College WHERE state = "AZ" UNION SELECT cName FROM College WHERE enr > 15000 AND state = "LA"
Step 1: For each row in course table, find the corresponding rows in section table.
Step 2: find title of the results of step 1 whose semester equals Differential Geometry
Output: SELECT T1.title FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T2.semester = "Differential Geometry"
find the Position of player table for which Points greater than 20
Output: SELECT Position FROM player WHERE Points > 20
find the number of rows in Dorm table whose gender equals M
Output: SELECT Count ( * ) FROM Dorm WHERE gender = "M"
Step 1: find the Name of wine table for which Grape equals Red.
Step 2: find the Name of wine table for which Price greater than 50.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT Name FROM wine WHERE Grape = "Red" INTERSECT SELECT Name FROM wine WHERE Price > 50
find the rows of player table for which Player contains English
Output: SELECT * FROM player WHERE Player LIKE "English"
find the average followers in user_profiles table
Output: SELECT Avg ( followers ) FROM user_profiles
Step 1: find the number of rows of each value of Name in Physician table.
Step 2: find Name in Physician table whose corresponding value in step 1 is greater than 1
Output: SELECT Name FROM Physician GROUP BY Name HAVING Count ( * ) > 1
find the product_name, typical_selling_price, product_description of Products table for which product_category_code equals Herbs
Output: SELECT product_name , typical_selling_price , product_description FROM Products WHERE product_category_code = "Herbs"
Step 1: find the number of rows of each value of staff_id in Staff table.
Step 2: find staff_id, staff_name of Staff table with smallest value in the results of step 1
Output: SELECT staff_id , staff_name FROM Staff GROUP BY staff_id ORDER BY Count ( * ) Asc LIMIT 1
find the id, market_share of browser table with smallest value of market_share
Output: SELECT id , market_share FROM browser ORDER BY market_share Asc LIMIT 1
Step 1: find the average Enrollment in university table.
Step 2: find the Nickname of university table whose Enrollment less than the results of step 1
Output: SELECT Nickname FROM university WHERE Enrollment < ( SELECT Avg ( Enrollment ) FROM university )
Step 1: find the City of branch table for which Open_year greater than 100.
Step 2: find the City of branch table for which Open_year less than 2001.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT City FROM branch WHERE Open_year > 100 INTERSECT SELECT City FROM branch WHERE Open_year < 2001
Step 1: For each row in channel table, find the corresponding rows in broadcast table.
Step 2: find Name of the results of step 1 ordered ascending by Time_of_day
Output: SELECT T1.Name FROM channel AS T1 JOIN broadcast AS T2 ON T1.Channel_ID = T2.Channel_ID ORDER BY T2.Time_of_day Asc
find the maximum Silver and the minimum Gold in club_rank table
Output: SELECT Max ( Silver ) , Min ( Gold ) FROM club_rank
find the number of rows in Physician table
Output: SELECT Count ( * ) FROM Physician
Step 1: For each row in Invoices table, find the corresponding rows in Invoice_Items table.
Step 2: find the average Invoice_Items's Order_Quantity in the results of step 1 whose payment_method_code equals MasterCard
Output: SELECT Avg ( T2.Order_Quantity ) FROM Invoices AS T1 JOIN Invoice_Items AS T2 ON T1.Invoice_ID = T2.Invoice_ID WHERE T1.payment_method_code = "MasterCard"
Step 1: For each row in Ref_Characteristic_Types table, find the corresponding rows in Characteristics table.
Step 2: find the number of rows in the results of step 1 whose characteristic_name equals white or characteristic_type_description equals hot
Output: SELECT Count ( * ) FROM Ref_Characteristic_Types AS T1 JOIN Characteristics AS T2 ON T1.characteristic_type_code = T2.characteristic_type_code WHERE T2.characteristic_name = "white" OR T1.characteristic_type_description = "hot"
find Name of Products table whose Price greater than 150 or Manufacturer less than 5
Output: SELECT Name FROM Products WHERE Price > 150 OR Manufacturer < 5
find without repetition the city of Addresses table
Output: SELECT DISTINCT city FROM Addresses
Step 1: For each row in Prescribes table, find corresponding rows in Physician table and in Medication table.
Step 2: find Physician's Name of the results of step 1 whose Medication's Name equals Procrastin-X
Output: SELECT T1.Name FROM Physician AS T1 JOIN Medication AS T2 JOIN Prescribes AS T3 ON T1.EmployeeID = T3.Physician AND T3.Medication = T2.Code WHERE T2.Name = "Procrastin-X"
Step 1: For each row in Tryout table, find corresponding rows in College table and in Player table.
Step 2: find pName, College's cName of the results of step 1
Output: SELECT T2.pName , T1.cName FROM College AS T1 JOIN Player AS T2 JOIN Tryout AS T3 ON T1.cName = T3.cName AND T3.pID = T2.pID
Step 1: For each row in aircraft table, find the corresponding rows in flight table.
Step 2: find name of the results of step 1 whose origin equals John Williams
Output: SELECT T2.name FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid WHERE T1.origin = "John Williams"
find the id, name, Porphyria of enzyme table ordered descending by Porphyria
Output: SELECT id , name , Porphyria FROM enzyme ORDER BY Porphyria Desc
find the staff_name of Staff table
Output: SELECT staff_name FROM Staff
Step 1: For each row in Appointment table, find corresponding rows in Physician table and in Nurse table.
Step 2: find without repetition Nurse's Name of the results of step 1 ordered ascending by Physician's Name
Output: SELECT DISTINCT T2.Name FROM Physician AS T1 JOIN Nurse AS T2 JOIN Appointment AS T3 ON T1.EmployeeID = T3.Physician AND T3.PrepNurse = T2.EmployeeID ORDER BY T1.Name Asc
find the number of rows in Artist table whose Name equals Metallica
Output: SELECT Count ( * ) FROM Artist WHERE Name = "Metallica"
Step 1: find the number of rows of each value of catalog_name in Catalogs table.
Step 2: find date_of_publication in Catalogs table whose corresponding value in step 1 is greater than 1
Output: SELECT date_of_publication FROM Catalogs GROUP BY catalog_name HAVING Count ( * ) > 1
Step 1: For each row in stadium table, find the corresponding rows in game table.
Step 2: find the number of rows of each value of stadium_id in the results of step 1.
Step 3: find stadium's id, name of step 1 results with largest value in the results of step 2
Output: SELECT T1.id , T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T2.stadium_id ORDER BY Count ( * ) Desc LIMIT 1
find the number of rows in Institution table whose Type equals Private or Founded greater than 1880
Output: SELECT Count ( * ) FROM Institution WHERE Type = "Private" OR Founded > 1880
find the protein_name, common_name of protein table
Output: SELECT protein_name , common_name FROM protein
Step 1: find the number of rows of each value of id in medicine table.
Step 2: find id, Trade_Name in medicine table whose corresponding value in step 1 is greater than or equals 3
Output: SELECT id , Trade_Name FROM medicine GROUP BY id HAVING Count ( * ) > = 3
Step 1: find the rows in employee table whose salary greater than 5000.
Step 2: find each value of name, name in the results of step 1 ordered descending by number of rows that correspond of each value.
Step 3: only show the first row of the results
Output: SELECT name , name FROM employee WHERE salary > 5000 GROUP BY name ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the Channel_ID of broadcast table.
Step 2: find the Name of channel table whose channel's Channel_ID not one of the results of step 1
Output: SELECT T1.Name FROM channel AS T1 WHERE T1.Channel_ID NOT IN ( SELECT T2.Channel_ID FROM broadcast AS T2 )
Step 1: For each row in School table, find the corresponding rows in budget table.
Step 2: find School_name of the results of step 1 whose total_budget_percent_budgeted greater than 100 or Enrollment greater than 10
Output: SELECT T1.School_name FROM School AS T1 JOIN budget AS T2 ON T1.School_id = T2.School_id WHERE T2.total_budget_percent_budgeted > 100 OR T1.Enrollment > 10
find the number of rows in flight table whose distance greater than 2000
Output: SELECT Count ( * ) FROM flight WHERE distance > 2000
Step 1: For each row in instructor table, find the corresponding rows in teaches table.
Step 2: find instructor's ID of the results of step 1 whose year not equals 2010
Output: SELECT T1.ID FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T2.year ! = 2010
find the Winery, Name, Score of wine table for which Score greater than 93 ordered ascending by Score
Output: SELECT Winery , Name , Score FROM wine WHERE Score > 93 ORDER BY Score Asc
find the number of rows in takes table whose year equals 2010
Output: SELECT Count ( * ) FROM takes WHERE year = 2010
find each value of year in takes table along with the number of the corresponding rows to each value
Output: SELECT Count ( * ) , year FROM takes GROUP BY year
find the number of rows in repair table
Output: SELECT Count ( * ) FROM repair
Step 1: find rows in Student table whose Sex equals M.
Step 2: find each value of city_code the results of step 1 along with the average Age of the corresponding rows to each value
Output: SELECT Avg ( Age ) , city_code FROM Student WHERE Sex = "M" GROUP BY city_code
find the name of stadium table for which Country equals Australia
Output: SELECT name FROM stadium WHERE Country = "Australia"
Step 1: For each row in party table, find the corresponding rows in election table.
Step 2: for each value of District in the results of step 1, calculate number of rows.
Step 3: show each value of District in the results of step 1 along with the number of rows with largest value in the results of step 2
Output: SELECT T1.Attorney_General , Count ( * ) FROM party AS T1 JOIN election AS T2 ON T1.Party_ID = T2.Party GROUP BY T2.District ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the number of rows of each value of candidate_id in Candidate_Assessments table.
Step 2: find candidate_id of Candidate_Assessments table with largest value in the results of step 1
Output: SELECT candidate_id FROM Candidate_Assessments GROUP BY candidate_id ORDER BY Count ( * ) Desc LIMIT 1
find the name, salary of instructor table for which dept_name equals Math
Output: SELECT name , salary FROM instructor WHERE dept_name = "Math"
Step 1: For each row in Ref_Shipping_Agents table, find the corresponding rows in Documents table.
Step 2: for each value of Documents's shipping_agent_code in the results of step 1, calculate number of rows.
Step 3: show each value of Documents's shipping_agent_code in the results of step 1 along with the number of rows with largest value in the results of step 2
Output: SELECT T1.shipping_agent_name , Count ( * ) FROM Ref_Shipping_Agents AS T1 JOIN Documents AS T2 ON T1.shipping_agent_code = T2.shipping_agent_code GROUP BY T2.shipping_agent_code ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the Name of member table for which Hometown equals Louisville ,  Kentucky.
Step 2: find the Name of member table for which Hometown equals Hiram ,  Georgia.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT Name FROM member WHERE Hometown = "Louisville ,  Kentucky" INTERSECT SELECT Name FROM member WHERE Hometown = "Hiram ,  Georgia"
find the catalog_entry_name, height of Catalog_Contents table for which price_in_euros greater than 700
Output: SELECT catalog_entry_name , height FROM Catalog_Contents WHERE price_in_euros > 700
Step 1: For each row in Physician table, find the corresponding rows in Appointment table.
Step 2: find the number of rows of each value of Physician in the results of step 1.
Step 3: find SSN of step 1 results with smallest value in the results of step 2
Output: SELECT T1.SSN FROM Physician AS T1 JOIN Appointment AS T2 ON T1.EmployeeID = T2.Physician GROUP BY T2.Physician ORDER BY Count ( * ) Asc LIMIT 1
find the number of rows in mission table
Output: SELECT Count ( * ) FROM mission
Step 1: find the number of rows of each value of product_id in Product_Suppliers table.
Step 2: find product_id of Product_Suppliers table ordered descending by the results of step 1.
Step 3: only show the first 3 rows of the results
Output: SELECT product_id FROM Product_Suppliers GROUP BY product_id ORDER BY Count ( * ) Desc LIMIT 3
Step 1: For each row in School table, find the corresponding rows in endowment table.
Step 2: find School_name, Location, donator_name of the results of step 1
Output: SELECT T1.School_name , T1.Location , T2.donator_name FROM School AS T1 JOIN endowment AS T2 ON T1.School_id = T2.School_id
find the id of Player table for which height equals or between 180 and 190
Output: SELECT id FROM Player WHERE height BETWEEN 190 AND 180
Step 1: find the number of rows of each value of Award in musical table.
Step 2: find Award in musical table whose corresponding value in step 1 is greater than 2
Output: SELECT Award FROM musical GROUP BY Award HAVING Count ( * ) > 2
find each value of Manufacturer in Products table along with the number of the corresponding rows to each value
Output: SELECT Count ( * ) , Manufacturer FROM Products GROUP BY Manufacturer
find the number of rows in enzyme table whose Porphyria not equals No
Output: SELECT Count ( * ) FROM enzyme WHERE Porphyria ! = "No"
Step 1: For each row in Department_Stores table, find corresponding rows in Department_Store_Chain table and in Departments table.
Step 2: find department_name, store_name of the results of step 1 whose dept_store_chain_name equals marketing.
Step 3: find department_name, store_name of the results of step 1 whose dept_store_chain_name equals managing.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T3.department_name , T2.store_name FROM Department_Store_Chain AS T1 JOIN Department_Stores AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id AND T1.dept_store_chain_id = T2.dept_store_chain_id JOIN Departments AS T3 ON T2.dept_store_id = T3.dept_store_id WHERE T1.dept_store_chain_name = "marketing" INTERSECT SELECT T3.department_name , T2.store_name FROM Department_Store_Chain AS T1 JOIN Department_Stores AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id AND T1.dept_store_chain_id = T2.dept_store_chain_id JOIN Departments AS T3 ON T2.dept_store_id = T3.dept_store_id WHERE T1.dept_store_chain_name = "managing"
Step 1: find the number of rows of each value of Award in musical table.
Step 2: find Nominee of musical table with largest value in the results of step 1
Output: SELECT Nominee FROM musical GROUP BY Award ORDER BY Count ( * ) Desc LIMIT 1
Step 1: For each row in races table, find corresponding rows in circuits table and in lapTimes table.
Step 2: find the average lap in the results of step 1 whose country equals Monaco Grand Prix and country equals 2008
Output: SELECT Avg ( T3.lap ) FROM circuits AS T1 JOIN races AS T2 ON T1.circuitId = T2.circuitId JOIN lapTimes AS T3 ON T2.raceId = T3.raceId WHERE T1.country = 2008 AND T1.country = "Monaco Grand Prix"
Step 1: For each row in Products table, find the corresponding rows in Complaints table.
Step 2: find the number of rows of each value of Complaints's product_id in the results of step 1.
Step 3: find product_name of step 1 results with smallest value in the results of step 2
Output: SELECT T1.product_name FROM Products AS T1 JOIN Complaints AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id ORDER BY Count ( * ) Asc LIMIT 1
find the summation of total in invoices table whose billing_city equals Chicago
Output: SELECT Sum ( total ) FROM invoices WHERE billing_city = "Chicago"
find each value of AllergyType in Allergy_Type table along with the number of the corresponding rows to each value
Output: SELECT AllergyType , Count ( * ) FROM Allergy_Type GROUP BY AllergyType
find the number of rows in company table
Output: SELECT Count ( * ) FROM company
Step 1: for each value of name in genres table, calculate number of rows.
Step 2: show each value of name in genres table along with the corresponding number of rows ordered descending by the results of step 1.
Step 3: only show the first 5 rows of the results
Output: SELECT name , Count ( * ) FROM genres GROUP BY name ORDER BY Count ( * ) Desc LIMIT 5
Step 1: For each row in Policies table, find corresponding rows in Customers table and in Claim_Headers table.
Step 2: find the summation of Amount_Claimed of each value of Customers's Customer_ID in the results of step 1.
Step 3: find Customer_Details of the results of step 1 with largest value in the results of step 2
Output: SELECT T1.Customer_Details FROM Customers AS T1 JOIN Policies AS T2 ON T1.Customer_ID = T2.Customer_ID JOIN Claim_Headers AS T3 ON T2.Policy_ID = T3.Policy_ID GROUP BY T1.Customer_ID ORDER BY Sum ( T3.Amount_Claimed ) Desc LIMIT 1
find the milliseconds of tracks table
Output: SELECT milliseconds FROM tracks
find the title of albums table ordered ascending by title
Output: SELECT title FROM albums ORDER BY title Asc
find the summation of duration and the summation of duration in trip table whose bike_id equals 636
Output: SELECT Sum ( duration ) , Sum ( duration ) FROM trip WHERE bike_id = 636
find the average long and the average long in station table whose city equals San Jose
Output: SELECT Avg ( long ) , Avg ( long ) FROM station WHERE city = "San Jose"
find the Rank, Market_Value, Profits_billion of company table for which Sales_billion equals Banking ordered ascending by Sales_billion
Output: SELECT Rank , Market_Value , Profits_billion FROM company WHERE Sales_billion = "Banking" ORDER BY Sales_billion Asc
Step 1: find the rows in weather table whose zip_code equals 94107.
Step 2: find each value of zip_code in the results of step 1 ordered descending by number of rows that correspond of each value.
Step 3: only show the first 3 rows of the results
Output: SELECT zip_code FROM weather WHERE zip_code = 94107 GROUP BY zip_code ORDER BY Count ( * ) Desc LIMIT 3
find the average Age in Student table whose Sex equals F and Sex equals F
Output: SELECT Avg ( Age ) FROM Student WHERE Sex = "F" AND Sex = "F"
find each value of Pilot_name in pilot table along with the number of the corresponding rows to each value
Output: SELECT Pilot_name , Count ( * ) FROM pilot GROUP BY Pilot_name
Step 1: For each row in Claim_Headers table, find the corresponding rows in Claims_Processing_Stages table.
Step 2: find Claim_Status_Description of the results of step 1 whose Claim_Status_Code equals Open
Output: SELECT T2.Claim_Status_Description FROM Claim_Headers AS T1 JOIN Claims_Processing_Stages AS T2 WHERE T1.Claim_Status_Code = "Open"
Step 1: find the start_date of trip table.
Step 2: find the start_date of trip table for which zip_code equals 94107.
Step 3: show the rows that are in the results of step 1 but not in the results of step 2
Output: SELECT start_date FROM trip EXCEPT SELECT start_date FROM trip WHERE zip_code = 94107
find the number of rows in aircraft table
Output: SELECT Count ( * ) FROM aircraft
Step 1: For each row in station table, find the corresponding rows in trip table.
Step 2: find the average duration in the results of step 1 whose city not equals Palo Alto
Output: SELECT Avg ( T2.duration ) FROM station AS T1 JOIN trip AS T2 WHERE T1.city ! = "Palo Alto"
Step 1: find the average min_humidity of each value of zip_code in weather table.
Step 2: find zip_code of weather table with smallest value in the results of step 1
Output: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY Avg ( min_humidity ) Asc LIMIT 1
find the name, city, long of station table with smallest value of long
Output: SELECT name , city , long FROM station ORDER BY long Asc LIMIT 1
Step 1: For each row in employees table, find the corresponding rows in customers table.
Step 2: find title, employees's phone, hire_date of the results of step 1 whose employees's first_name equals Nancy and customers's last_name equals Edwards
Output: SELECT T1.title , T1.phone , T1.hire_date FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id WHERE T1.first_name = "Nancy" AND T2.last_name = "Edwards"
find each value of custid in ACCOUNTS table along with the number of the corresponding rows to each value
Output: SELECT name , Count ( * ) FROM ACCOUNTS GROUP BY custid
Step 1: For each row in status table, find the corresponding rows in trip table.
Step 2: find start_date of the results of step 1 whose zip_code equals 94107 and time not equals Fog
Output: SELECT T2.start_date FROM status AS T1 JOIN trip AS T2 WHERE T2.zip_code = 94107 AND T1.time ! = "Fog"
Step 1: find the Company, Main_Industry of company table.
Step 2: find the Company, Main_Industry of company table.
Step 3: show the rows that are in the results of step 1 but not in the results of step 2
Output: SELECT Company , Main_Industry FROM company EXCEPT SELECT Company , Main_Industry FROM company
Step 1: For each row in Rooms table, find the corresponding rows in Reservations table.
Step 2: find roomName, LastName, CheckIn of the results of step 1 with largest value of Rate
Output: SELECT T1.roomName , T2.LastName , T2.CheckIn FROM Rooms AS T1 JOIN Reservations AS T2 ON T1.RoomId = T2.Room ORDER BY T2.Rate Desc LIMIT 1
Step 1: For each row in station table, find the corresponding rows in status table.
Step 2: find the average bikes_available of each value of station_id in the results of step 1.
Step 3: find name, id in the results of step 1 whose corresponding value in step 2 is greater than 14
Output: SELECT T1.name , T1.id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id GROUP BY T2.station_id HAVING Avg ( T2.bikes_available ) > 14
Step 1: find name of station table whose long less than -121.90178200000001 and city equals San Jose.
Step 2: find name of station table whose long greater than 10 and city equals San Jose.
Step 3: show the rows that are in any of the results of step 1 or the results of step 2
Output: SELECT name FROM station WHERE long < -121.90178200000001 AND city = "San Jose" UNION SELECT name FROM station WHERE long > 10 AND city = "San Jose"
find the minimum Company, the maximum Market_Value and the average Market_Value in company table
Output: SELECT Min ( Company ) , Max ( Market_Value ) , Avg ( Market_Value ) FROM company
Step 1: For each row in station table, find the corresponding rows in trip table.
Step 2: only keep the results of step 1 whose start_date equals 8/%.
Step 3: find the number of rows of each value of start_station_id in the results of step 2.
Step 4: find name, start_station_id of the results of step 2 with largest value in the results of step 3
Output: SELECT T1.name , T2.start_station_id FROM station AS T1 JOIN trip AS T2 WHERE T2.start_date = "8/%" GROUP BY T2.start_station_id ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the roomName of Rooms table for which basePrice less than 2.
Step 2: find the roomName of Rooms table for which basePrice greater than 160.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT roomName FROM Rooms WHERE basePrice < 2 INTERSECT SELECT roomName FROM Rooms WHERE basePrice > 160
Step 1: find the name of tracks table.
Step 2: find the name of tracks table.
Step 3: show the rows that are in the results of step 1 but not in the results of step 2
Output: SELECT name FROM tracks EXCEPT SELECT name FROM tracks
Step 1: For each row in people table, find the corresponding rows in candidate table.
Step 2: find Name, Sex of the results of step 1 with largest value of Unsure_rate
Output: SELECT T2.Name , T2.Sex FROM candidate AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Unsure_rate Desc LIMIT 1
Step 1: For each row in Policies table, find corresponding rows in Customers table and in Claim_Headers table.
Step 2: find Customer_Details of the results of step 1 whose Claim_Status_Code equals Deputy
Output: SELECT T1.Customer_Details FROM Customers AS T1 JOIN Policies AS T2 ON T1.Customer_ID = T2.Customer_ID JOIN Claim_Headers AS T3 ON T2.Policy_ID = T3.Policy_ID WHERE T3.Claim_Status_Code = "Deputy"
find the first_name, last_name of employees table
Output: SELECT first_name , last_name FROM employees
Step 1: find the number of rows of each value of Sex in Student table.
Step 2: find Sex of Student table with largest value in the results of step 1
Output: SELECT Sex FROM Student GROUP BY Sex ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the average min_sea_level_pressure_inches of each value of zip_code in weather table.
Step 2: find zip_code in weather table whose corresponding value in step 1 is less than 10
Output: SELECT zip_code FROM weather GROUP BY zip_code HAVING Avg ( min_sea_level_pressure_inches ) < 10
find each value of Sex in Student table along with the number of the corresponding rows to each value
Output: SELECT Sex , Count ( * ) FROM Student GROUP BY Sex
find the start_date, duration of trip table with smallest value of duration
Output: SELECT start_date , duration FROM trip ORDER BY duration Asc LIMIT 1
Step 1: find the number of rows of each value of bike_id in trip table.
Step 2: find bike_id of trip table with largest value in the results of step 1
Output: SELECT bike_id FROM trip GROUP BY bike_id ORDER BY Count ( * ) Desc LIMIT 1
find the number of rows in sqlite_sequence table whose seq equals Billy Cobham
Output: SELECT Count ( * ) FROM sqlite_sequence WHERE seq = "Billy Cobham"
find the Major of Student table for which Age greater than 20
Output: SELECT Major FROM Student WHERE Age > 20
find the average Age and the maximum Age in artist table whose Country equals United States
Output: SELECT Avg ( Age ) , Max ( Age ) FROM artist WHERE Country = "United States"
find without repetition Fname, city_code of Student table whose Sex equals Milk or Sex equals Cat
Output: SELECT DISTINCT Fname , city_code FROM Student WHERE Sex = "Cat" OR Sex = "Milk"
Step 1: For each row in ACCOUNTS table, find the corresponding rows in SAVINGS table.
Step 2: find name of the results of step 1 whose balance greater than 200000
Output: SELECT T1.name FROM ACCOUNTS AS T1 JOIN SAVINGS AS T2 ON T1.custid = T2.custid WHERE T2.balance > 200000
find the Dependent_name of dependent table
Output: SELECT Dependent_name FROM dependent
find the Major of Student table with smallest value of Age
Output: SELECT Major FROM Student ORDER BY Age Asc LIMIT 1
Step 1: For each row in people table, find the corresponding rows in candidate table.
Step 2: find Name of the results of step 1 whose Unsure_rate less than 0.2
Output: SELECT T2.Name FROM candidate AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Unsure_rate < 0.2
Step 1: For each row in Has_Allergy table, find corresponding rows in Allergy_Type table and in Student table.
Step 2: find Fname, Sex of the results of step 1 whose Allergy_Type's Allergy equals Cat and AllergyType equals Milk
Output: SELECT T3.Fname , T3.Sex FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T2.StuID = T3.StuID WHERE T1.Allergy = "Cat" AND T1.AllergyType = "Milk"
find the custid, name of ACCOUNTS table for which name less than Brown
Output: SELECT custid , name FROM ACCOUNTS WHERE name < "Brown"
find the title of albums table
Output: SELECT title FROM albums
find the number of rows in ACCOUNTS table
Output: SELECT Count ( * ) FROM ACCOUNTS
Step 1: For each row in genres table, find the corresponding rows in tracks table.
Step 2: find tracks's name of the results of step 1 whose genres's name equals Rock
Output: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"
find each value of zip_code in trip table along with the number of the corresponding rows to each value
Output: SELECT Count ( * ) , zip_code FROM trip GROUP BY zip_code
find the number of rows in Reservations table whose LastName equals ROY
Output: SELECT Count ( * ) FROM Reservations WHERE LastName = "ROY"
Step 1: For each row in ACCOUNTS table, find the corresponding rows in SAVINGS table.
Step 2: find name, balance of the results of step 1 ordered descending by balance
Output: SELECT T1.name , T2.balance FROM ACCOUNTS AS T1 JOIN SAVINGS AS T2 ON T1.custid = T2.custid ORDER BY T2.balance Desc
find the start_date of trip table with largest value of duration
Output: SELECT start_date FROM trip ORDER BY duration Desc LIMIT 1
Step 1: find the maximum Oppose_rate in candidate table.
Step 2: For each row in people table, find the corresponding rows in candidate table.
Step 3: find Name in the results of step 2 whose Unsure_rate less than the results of step 1
Output: SELECT T2.Name FROM candidate AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Unsure_rate < ( SELECT Max ( T1.Oppose_rate ) FROM candidate AS T1 )
Step 1: For each row in representative table, find the corresponding rows in election table.
Step 2: find each value of Representative_ID in the results of step 1 along with the number of the corresponding rows to each value
Output: SELECT T2.Name , Count ( * ) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID GROUP BY T1.Representative_ID
Step 1: For each row in genres table, find the corresponding rows in tracks table.
Step 2: find tracks's name of the results of step 1 whose genres's name equals Rock or genres's name equals MPEG audio file
Output: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "MPEG audio file" OR T1.name = "Rock"
Step 1: For each row in genres table, find the corresponding rows in tracks table.
Step 2: find tracks's name of the results of step 1 whose genres's name equals Movies.
Step 3: find tracks's name of the results of step 1 whose genres's name equals Music.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Movies" INTERSECT SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Music"
find the Fname, LName of Student table for which Sex equals F
Output: SELECT Fname , LName FROM Student WHERE Sex = "F"
Step 1: For each row in genres table, find the corresponding rows in tracks table.
Step 2: find the summation of milliseconds of each value of genre_id in the results of step 1.
Step 3: find genres's name in the results of step 1 whose corresponding value in step 2 is greater than 100
Output: SELECT T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T2.genre_id HAVING Sum ( T2.milliseconds ) > 100
find start_date of trip table whose duration greater than 60 and duration greater than 384
Output: SELECT start_date FROM trip WHERE duration > 384 AND duration > 60
Step 1: For each row in albums table, find the corresponding rows in tracks table.
Step 2: find title of the results of step 1 whose name contains Led
Output: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id WHERE T2.name LIKE "Led"
Step 1: find the name of station table.
Step 2: For each row in station table, find the corresponding rows in trip table.
Step 3: find name of the results of step 2 whose city equals Palo Alto and duration greater than 100.
Step 4: show the rows that are in the results of step 1 but not in the results of step 3
Output: SELECT T1.name FROM station AS T1 EXCEPT SELECT T1.name FROM station AS T1 JOIN trip AS T2 WHERE T1.city = "Palo Alto" AND T2.duration > 100
Step 1: For each row in people table, find the corresponding rows in candidate table.
Step 2: find Name, Sex of the results of step 1 whose Oppose_rate greater than 0.43
Output: SELECT T2.Name , T2.Sex FROM candidate AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Oppose_rate > 0.43
Step 1: For each row in tracks table, find corresponding rows in albums table and in media_types table.
Step 2: find title of the results of step 1 whose media_types's name equals Balls to the Wall
Output: SELECT T1.title FROM albums AS T1 JOIN media_types AS T2 JOIN tracks AS T3 ON T1.id = T3.album_id AND T3.media_type_id = T2.id WHERE T2.name = "Balls to the Wall"
find the Company, Sales_billion of company table with largest value of Sales_billion
Output: SELECT Company , Sales_billion FROM company ORDER BY Sales_billion Desc LIMIT 1
Step 1: find the number of rows of each value of Major in Student table.
Step 2: find Major in Student table whose corresponding value in step 1 is greater than or equals 2
Output: SELECT Major FROM Student GROUP BY Major HAVING Count ( * ) > = 2
find each value of zip_code in weather table along with the number of the corresponding rows to each value
Output: SELECT zip_code , Count ( * ) FROM weather GROUP BY zip_code
Step 1: For each row in Rooms table, find the corresponding rows in Reservations table.
Step 2: find decor of the results of step 1 whose CheckIn equals TRACHSEL and LastName equals SELBIG.
Step 3: find decor of the results of step 1 whose FirstName equals 2010-09-21 and LastName equals DAMIEN.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T1.decor FROM Rooms AS T1 JOIN Reservations AS T2 ON T1.RoomId = T2.Room WHERE T2.CheckIn = "TRACHSEL" AND T2.LastName = "SELBIG" INTERSECT SELECT T1.decor FROM Rooms AS T1 JOIN Reservations AS T2 ON T1.RoomId = T2.Room WHERE T2.FirstName = "2010-09-21" AND T2.LastName = "DAMIEN"
Step 1: For each row in Rooms table, find the corresponding rows in Reservations table.
Step 2: find roomName, decor of the results of step 1 whose basePrice greater than 160 and Adults greater than 2
Output: SELECT T1.roomName , T1.decor FROM Rooms AS T1 JOIN Reservations AS T2 ON T1.RoomId = T2.Room WHERE T1.basePrice > 160 AND T2.Adults > 2
Step 1: For each row in station_company table, find corresponding rows in company table and in gas_station table.
Step 2: find Location, Representative_Name of the results of step 1 ordered descending by Market_Value.
Step 3: only show the first 3 rows of the results
Output: SELECT T2.Location , T2.Representative_Name FROM company AS T1 JOIN gas_station AS T2 JOIN station_company AS T3 ON T1.Company_ID = T3.Company_ID AND T3.Station_ID = T2.Station_ID ORDER BY T1.Market_Value Desc LIMIT 3
find the number of rows in trip table whose start_date equals Mountain View and end_date equals Palo Alto
Output: SELECT Count ( * ) FROM trip WHERE start_date = "Mountain View" AND end_date = "Palo Alto"
find each value of billing_state in invoices table along with the number of the corresponding rows to each value
Output: SELECT billing_state , Count ( * ) FROM invoices GROUP BY billing_state
Step 1: find the number of rows of each value of Claim_Outcome_Code in Claims_Processing table.
Step 2: find Claim_Outcome_Code of Claims_Processing table with largest value in the results of step 1
Output: SELECT Claim_Outcome_Code FROM Claims_Processing GROUP BY Claim_Outcome_Code ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the id of station table for which long greater than 37.4.
Step 2: For each row in station table, find the corresponding rows in status table.
Step 3: find station_id of the results of step 2 whose long less than 7.
Step 4: show the rows that are in both the results of step 1 and the results of step 3
Output: SELECT T1.id FROM station AS T1 WHERE T1.long > 37.4 INTERSECT SELECT T2.station_id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.long < 7
Step 1: find the number of rows of each value of Major in Student table.
Step 2: find StuID in Student table whose corresponding value in step 1 is greater than 2
Output: SELECT StuID FROM Student GROUP BY Major HAVING Count ( * ) > 2
Step 1: For each row in employees table, find the corresponding rows in customers table.
Step 2: find without repetition employees's first_name of the results of step 1 whose customers's first_name equals Eduardo and customers's last_name equals Martins
Output: SELECT DISTINCT T1.first_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id WHERE T2.first_name = "Eduardo" AND T2.last_name = "Martins"
find the zip_code, min_dew_point_f of weather table for which min_visibility_miles greater than 80
Output: SELECT zip_code , min_dew_point_f FROM weather WHERE min_visibility_miles > 80
find each value of zip_code in trip table along with the average duration of the corresponding rows to each value
Output: SELECT Avg ( duration ) , start_date FROM trip GROUP BY zip_code
Step 1: For each row in ACCOUNTS table, find the corresponding rows in SAVINGS table.
Step 2: find rows, balance of the results of step 1 whose name equals Brown
Output: SELECT * , T2.balance FROM ACCOUNTS AS T1 JOIN SAVINGS AS T2 ON T1.custid = T2.custid WHERE T1.name = "Brown"
Step 1: For each row in Customers table, find the corresponding rows in Policies table.
Step 2: find Customer_Details of the results of step 1 with largest value of End_Date
Output: SELECT T1.Customer_Details FROM Customers AS T1 JOIN Policies AS T2 ON T1.Customer_ID = T2.Customer_ID ORDER BY T2.End_Date Desc LIMIT 1
Step 1: find the min_temperature_f of weather table for which zip_code equals 94107 ordered descending by min_temperature_f.
Step 2: only show the first 3 rows of the results
Output: SELECT min_temperature_f FROM weather WHERE zip_code = 94107 ORDER BY min_temperature_f Desc LIMIT 3
Step 1: find the roomName, decor of Rooms table for which basePrice greater than 2.
Step 2: find the roomName, decor of Rooms table for which basePrice greater than 160.
Step 3: show the rows that are in any of the results of step 1 or the results of step 2
Output: SELECT roomName , decor FROM Rooms WHERE basePrice > 2 UNION SELECT roomName , decor FROM Rooms WHERE basePrice > 160
Step 1: find the LName, Age of Student table for which Sex equals Milk.
Step 2: find the LName, Age of Student table for which Sex equals Cat.
Step 3: show the rows that are in both the results of step 1 and the results of step 2
Output: SELECT LName , Age FROM Student WHERE Sex = "Milk" INTERSECT SELECT LName , Age FROM Student WHERE Sex = "Cat"
find the number of rows in exhibition table whose Year greater than 2005 or Year greater than 2004
Output: SELECT Count ( * ) FROM exhibition WHERE Year > 2004 OR Year > 2005
find Name of people table whose Height greater than 200 or Height greater than 190
Output: SELECT Name FROM people WHERE Height > 190 OR Height > 200
find the number of rows in Rooms table
Output: SELECT Count ( * ) FROM Rooms
Step 1: For each row in Rooms table, find the corresponding rows in Reservations table.
Step 2: find the number of rows of each value of Room in the results of step 1.
Step 3: find decor of step 1 results with largest value in the results of step 2
Output: SELECT T1.decor FROM Rooms AS T1 JOIN Reservations AS T2 ON T1.RoomId = T2.Room GROUP BY T2.Room ORDER BY Count ( * ) Desc LIMIT 1
Step 1: find the Fname, Sex of Student table.
Step 2: For each row in Has_Allergy table, find corresponding rows in Allergy_Type table and in Student table.
Step 3: find Fname, Sex of the results of step 2 whose Allergy_Type's Allergy equals Cat.
Step 4: show the rows that are in the results of step 1 but not in the results of step 3
Output: SELECT T1.Fname , T1.Sex FROM Student AS T1 EXCEPT SELECT T1.Fname , T1.Sex FROM Allergy_Type AS T2 JOIN Has_Allergy AS T3 ON T2.Allergy = T3.Allergy JOIN Student AS T1 ON T3.StuID = T1.StuID WHERE T2.Allergy = "Cat"
Step 1: For each row in station table, find the corresponding rows in trip table.
Step 2: find the number of rows of each value of start_station_id in the results of step 1.
Step 3: find name, start_station_name of step 1 results ordered ascending by the results of step 2.
Step 4: only show the first 3 rows of the results
Output: SELECT T1.name , T2.start_station_name FROM station AS T1 JOIN trip AS T2 GROUP BY T2.start_station_id ORDER BY Count ( * ) Asc LIMIT 3
find the Company of company table
Output: SELECT Company FROM company
find without repetition the Participant_ID of Participants_in_Events table
Output: SELECT DISTINCT Participant_ID FROM Participants_in_Events
Step 1: find the rows of Allergy_Type table.
Step 2: find the StuID of Student table.
Step 3: show the rows that are in the results of step 1 but not in the results of step 2
Output: SELECT * FROM Allergy_Type AS T1 EXCEPT SELECT T2.StuID FROM Student AS T2
Step 1: For each row in sqlite_sequence table, find the corresponding rows in albums table.
Step 2: find title of the results of step 1 whose seq contains Led
Output: SELECT T2.title FROM sqlite_sequence AS T1 JOIN albums AS T2 WHERE T1.seq LIKE "Led"
find the start_station_id of trip table with smallest value of duration
Output: SELECT start_station_id FROM trip ORDER BY duration Asc LIMIT 1
find each value of name in genres table along with the number of the corresponding rows to each value
Output: SELECT name , Count ( * ) FROM genres GROUP BY name