niryuu/sni-each-converted huggingface dataset:
Step 1: For each row in genre table, find corresponding rows in artist table and in song table.
Step 2: find song_name of the results of step 1 whose preferred_genre equals modern or g_name equals english
Output: SELECT T3.song_name FROM genre AS T1 JOIN artist AS T2 ON T1.g_name = T2.preferred_genre JOIN song AS T3 ON T1.g_name = T3.genre_is WHERE T2.preferred_genre = "modern" OR T1.g_name = "english"
Step 1: For each row in Appointment table, find corresponding rows in Physician table and in Nurse table.
Step 2: find without repetition Physician's Name of the results of step 1 ordered ascending by Nurse's Name
Output: SELECT DISTINCT T1.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 T2.Name Asc
find JOB_TITLE, MIN_SALARY, MAX_SALARY of jobs table whose MAX_SALARY greater than 12000 and MAX_SALARY less than or equals 18000
Output: SELECT JOB_TITLE , MIN_SALARY , MAX_SALARY FROM jobs WHERE MAX_SALARY > 18000 AND MAX_SALARY < = 12000
Step 1: For each row in files table, find the corresponding rows in song table.
Step 2: find files's artist_name of the results of step 1 whose resolution less than 1000
Output: SELECT T1.artist_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 1000
find the average Total_Cattle in farm table whose Total_Horses greater than 5000
Output: SELECT Avg ( Total_Cattle ) FROM farm WHERE Total_Horses > 5000
Step 1: find the date, mean_temperature_f, max_wind_Speed_mph of weather table ordered descending by max_gust_speed_mph.
Step 2: only show the first 3 rows of the results
Output: SELECT date , mean_temperature_f , max_wind_Speed_mph FROM weather ORDER BY max_gust_speed_mph Desc LIMIT 3
Step 1: For each row in Person table, find the corresponding rows in PersonFriend table.
Step 2: find Person's name, age of the results of step 1 whose friend equals Dan.
Step 3: find the Person's name, age of Person table for which job equals Alice.
Step 4: show the rows that are in both the results of step 2 and the results of step 3
Output: SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = "Dan" INTERSECT SELECT T1.name , T1.age FROM Person AS T1 WHERE T1.job = "Alice"
Step 1: find the number of rows of each value of City in city table.
Step 2: find City of city table with largest value in the results of step 1
Output: SELECT City FROM city GROUP BY City ORDER BY Count ( * ) Desc LIMIT 1
Step 1: For each row in Customer_Addresses table, find corresponding rows in Addresses table and in Customers table.
Step 2: find address_details of the results of step 1 whose customer_name equals 10
Output: SELECT T1.address_details FROM Addresses AS T1 JOIN Customers AS T2 JOIN Customer_Addresses AS T3 ON T1.address_id = T3.address_id AND T3.customer_id = T2.customer_id WHERE T2.customer_name = 10