sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What is the name of the medication used for the patient staying in room 111? | SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111 |
What is the name of the tallest building? | SELECT name FROM building ORDER BY height_feet DESC LIMIT 1 |
What is the long for the player with under 30 carries and 0 yards? | SELECT long FROM table_name_78 WHERE car < 30 AND yards = "0" |
For teams that won exactly 15, how many points were scored? | SELECT points FROM table_27293285_6 WHERE won = "15" |
Who is the player from Sweden from a round after 3? | SELECT player FROM table_name_77 WHERE nationality = "sweden" AND round > 3 |
What is the earliest year that the building in sonnemannstraße/rückertstraße, ostend was built with a height larger than 185 meters? | SELECT MIN(year_built) FROM table_name_26 WHERE location = "sonnemannstraße/rückertstraße, ostend" AND height__m_ > 185 |
In language where Wednesday is বুধবার budhbar, what is Thursday? | SELECT thursday_guru__jupiter_ FROM table_1277350_3 WHERE wednesday_budha__mercury_ = "বুধবার Budhbar" |
Find the total amount of bonus given in all the evaluations. | SELECT sum(bonus) FROM evaluation |
Among all the shipments to Florida, what is the percentage of the shipment to Jacksonville? | SELECT CAST(SUM(CASE WHEN T2.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Florida' |
I want to know advisor with the most number of students | SELECT advisor FROM Student GROUP BY advisor ORDER BY count ( * ) DESC LIMIT 1 |
Find the papers which have "Olin Shivers" as an author. | SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t1.fname = "Olin" AND t1.lname = "Shivers" |
What duration is listed for Christian de la Fuente? | SELECT duration FROM table_11210576_3 WHERE actor = "Christian de la Fuente" |
Name the number of first elected for phil crane | SELECT COUNT(first_elected) FROM table_1341672_14 WHERE incumbent = "Phil Crane" |
When were there less than 1 point with a cosworth v8 engine in jolly club switzerland? | SELECT year FROM table_name_73 WHERE points < 1 AND engine = "cosworth v8" AND entrant = "jolly club switzerland" |
What year was the last European Grand Prix held in Spain? | SELECT T1.year FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" order by T1.year desc limit 1 |
What is the path of solution of "spinachLexer.mT__55" method? | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'spinachLexer.mT__55' |
WHich representative has the lowest votes? | SELECT representative_id from election order by votes asc limit 1 |
What is the name of the movie that is rated by most of times? | SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1 |
Mention the status of payment of student 299. | SELECT bool FROM no_payment_due WHERE name = 'student299' |
when was the premiere when a 3.3 millions of North American watched the episode whose writer was Rob Wright? | SELECT original_air_date FROM table_21313498_1 WHERE us_viewers__millions_ = "3.3" AND written_by = "Rob Wright" |
What was the number of murders the year forcible rapes were at 166? | SELECT murder FROM table_25271777_1 WHERE forcible_rape = 166 |
Which kind of policy type was chosen by the most customers? | SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1 |
What are the maximum scores the team Boston Red Stockings got when the team won in postseason? | SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'; |
How many ends lost when shot % is 88 and ends won are 31? | SELECT COUNT(ends_lost) FROM table_name_72 WHERE shot_pct = 88 AND ends_won = 31 |
What's the version that has a 20.0 mbit/s downstream rate? | SELECT version FROM table_name_81 WHERE downstream_rate = "20.0 mbit/s" |
What college did the player who was drafted by Calgary go to? | SELECT college FROM table_28059992_6 WHERE cfl_team = "Calgary" |
How many times was the high assists earl watson (5) and the date of the game was december 2? | SELECT COUNT(score) FROM table_11964154_7 WHERE high_assists = "Earl Watson (5)" AND date = "December 2" |
How many games is collingwood the home side? | SELECT COUNT(crowd) FROM table_name_4 WHERE home_team = "collingwood" |
List all the customers with name containing the word 'Group'. | SELECT T FROM ( SELECT IIF(`Customer Names` LIKE '%Group%', `Customer Names`, NULL) AS T FROM Customers ) WHERE T IS NOT NULL |
Name the venue for staines town | SELECT venue FROM table_name_43 WHERE opponent = "staines town" |
Give the review of the restaurant located in Ocean St., Santa Cruz. | SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'santa cruz' AND T1.street_name = 'ocean st' |
WHAT ARE THEIR NAMES? | SELECT name FROM instructor WHERE id NOT IN ( SELECT id FROM teaches ) |
How many captains are there younger than 50 in each rank? | SELECT count ( * ) , rank FROM captain WHERE age < 50 GROUP BY rank |
Great! How about the lowest salary? | SELECT T1.name FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg ( T2.salary ) ASC LIMIT 1 |
what is the name of the employee that supported the most number of customers? | SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count ( * ) DESC LIMIT 1 |
What was the host city of the 8th edition in the the host country of Croatia? | SELECT host_city FROM table_26669939_1 WHERE host_country = "Croatia" AND edition = "8th" |
how much years old is Anna Powierza ? | SELECT T1.Age FROM editor AS T1 where T1.Name = "Anna Powierza" |
Show all official native languages that contain the word "English". | SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%" |
What is the Match with Points that are 24? | SELECT match FROM table_name_11 WHERE points = 24 |
what is the date when the round is sf? | SELECT date FROM table_name_52 WHERE round = "sf" |
What is the pick # when the new jersey devils is the nhl team? | SELECT pick__number FROM table_2897457_3 WHERE nhl_team = "New Jersey Devils" |
What is Date, when Against is "22"? | SELECT date FROM table_name_87 WHERE against = 22 |
What is the lowest Game, when High Assists is "Maurice Williams (8)"? | SELECT MIN(game) FROM table_name_11 WHERE high_assists = "maurice williams (8)" |
what is the competition when the score is 2-1? | SELECT competition FROM table_name_28 WHERE score = "2-1" |
What was the date of appointment for javier aguirre's replacement? | SELECT date_of_appointment FROM table_name_53 WHERE outgoing_manager = "javier aguirre" |
What about events that had failure for their event details? | SELECT T1.service_type_code FROM services AS T1 JOIN EVENTS AS T2 ON T1.service_id = T2.service_id WHERE T2.event_details = 'Fail' |
What is the name of the competition with opponents of Sv Werder Bremen and a score of 1-2? | SELECT competition FROM table_name_37 WHERE opponents = "sv werder bremen" AND score = "1-2" |
What date did the player from Santo André debut? | SELECT date_joined FROM table_name_27 WHERE from__club_ = "santo andré" |
What is the ICAO with commenced operations before 1989? | SELECT icao FROM table_name_2 WHERE commenced_operations < 1989 |
If the just cents is 84.46, what is the just ratio? | SELECT just_ratio FROM table_18955077_1 WHERE just__cents_ = "84.46" |
What is the catalog of the release from January 23, 2002? | SELECT catalog FROM table_name_59 WHERE date = "january 23, 2002" |
How many orders were there? | SELECT count ( DISTINCT order_id ) FROM order_items |
What is the L2 cache for the processor with a 750MHz frequency? | SELECT l2_cache FROM table_name_93 WHERE frequency = "750mhz" |
What is 1996 Grand Slam Tournament if 1994 is LQ and 1992 is 3R? | SELECT 1996 FROM table_name_4 WHERE 1994 = "lq" AND 1992 = "3r" |
How many courses does the student with the highest GPA this semester take? | SELECT COUNT(course_id) FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student ) ) |
What was the away team's score at windy hill? | SELECT away_team AS score FROM table_name_71 WHERE venue = "windy hill" |
How much does the most recent treatment cost? | SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1 |
What kind of free practice is there with a Ford RS2 engine +? | SELECT free_practice_driver_s_ FROM table_name_8 WHERE engine_† = "ford rs2" |
Out of those 6 people, how many of them are female? | SELECT count ( * ) FROM people WHERE weight > 85 AND Sex = "F" |
how many times is the jewel malachite? | SELECT COUNT(birthday) FROM table_26615633_1 WHERE jewel = "Malachite" |
which channel are highest rating percent on the table | SELECT name from channel where rating_in_percent = ( select max ( rating_in_percent ) from channel ) |
What is the reserved for the constituency of 192? | SELECT reserved_for___sc___st__none_ FROM table_name_34 WHERE constituency_number = "192" |
Give me all their model names and ram mib | SELECT Model_name,RAM_MiB FROM chip_model WHERE model_name NOT IN ( SELECT chip_model FROM phone ) |
How many trains are there that run in the east direction? | SELECT COUNT(id) FROM trains WHERE direction = 'east' |
Who is the Visitor on april 8? | SELECT visitor FROM table_name_94 WHERE date = "april 8" |
What is the location code that has the largest number of documents? | SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count ( * ) DESC LIMIT 1 |
What was the score for Game 3? | SELECT score FROM table_name_18 WHERE game = 3 |
List the cities which have more than one airport and number of airports. | SELECT city , count(*) FROM airports GROUP BY city HAVING count(*) > 1 |
What was the surface when the result was 6–7 (6–7) , 7–6 (9–7) , 6–7 (4–7) , 7–5, 3–6? | SELECT surface FROM table_name_82 WHERE result = "6–7 (6–7) , 7–6 (9–7) , 6–7 (4–7) , 7–5, 3–6" |
What are the names of the songs whose rating is below the rating of all songs in English? | SELECT song_name FROM song WHERE rating < (SELECT MIN(rating) FROM song WHERE languages = 'english') |
In cities that do not implement daylight savings, what is the total number of cities? | SELECT COUNT(T1.area_code) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.daylight_savings = 'No' |
Who advises student 1004? | SELECT Advisor FROM Student WHERE StuID = 1004 |
What's the number of electorates for constituency number 56? | SELECT SUM(number_of_electorates__2009_) FROM table_name_56 WHERE constituency_number = "56" |
What is the team 2 for team 1 of Valletta? | SELECT team_2 FROM table_name_60 WHERE team_1 = "valletta" |
Identify by papers title those in which conferences have been published that do not have a website.. | SELECT T2.Title FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.HomePage = '' AND T2.Title <> '' |
Among students registered for the most difficult course, list the students' full names who got grade A. | SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.grade = 'A' ORDER BY T3.diff DESC LIMIT 1 |
How man teams have a writer named harry angus? | SELECT COUNT(name_of_team_song) FROM table_28243323_1 WHERE writer_composer = "Harry Angus" |
Which Total has a Player of matt ruth? | SELECT total FROM table_name_40 WHERE player = "matt ruth" |
What is the name of the city that already served as host more than once? | The names in English or Hanzi? | English, please. | SELECT t1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY t2.Host_City HAVING count ( * ) > 1 |
What is the home team score when st kilda is the away team? | SELECT home_team AS score FROM table_name_51 WHERE away_team = "st kilda" |
How many towns exist on the government area with a surface of 110 square kilometers? | SELECT MIN(towns) FROM table_23685890_2 WHERE land_area__km²_ = "110" |
When was the Hopperstad Stavkyrkje built? | SELECT year_built FROM table_name_83 WHERE church_name = "hopperstad stavkyrkje" |
What is the highest cable ranking? | SELECT MAX(cable_rank) FROM table_24399615_6 |
List the buildings that have an institution and their street address. | SELECT name, street_address FROM building WHERE building_id IN ( SELECT building_id FROM institution ) |
What are the names of customers who have both savings and checking accounts? | SELECT cust_name FROM customer WHERE acc_type = 'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type = 'checking' |
What is the product ID of the most frequently ordered item on invoices? | SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 |
Name the final score for week 5 | SELECT final_score FROM table_24126606_2 WHERE week = 5 |
Which district has both stores with less than 3000 products and stores with more than 10000 products? | SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000 |
What is the torque formula for the 1.6 Duratec ti-vct model/engine? | SELECT torque__nm__rpm FROM table_1212189_1 WHERE model_engine = "1.6 Duratec Ti-VCT" |
What was the stadium that held that game after week 15? | SELECT stadium FROM table_name_28 WHERE week > 15 |
how many party with candidates being john m. vorys (r) 61.5% jacob f. myers (d) 38.5% | SELECT COUNT(party) FROM table_1342013_34 WHERE candidates = "John M. Vorys (R) 61.5% Jacob F. Myers (D) 38.5%" |
List out city name of businesses which have medium length of review. | SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_length = 'Medium' |
What original air date has 5.85 u.s. viewers (million)? | SELECT original_air_date FROM table_27117365_1 WHERE us_viewers__million_ = "5.85" |
What was the average election year that has less than 136 deputies, and 1,560,753 votes received? | SELECT AVG(election_date) FROM table_name_86 WHERE number_of_deputies < 136 AND number_of_votes_received = "1,560,753" |
I want the plaid cymru for Polling organisation/client of yougov/itv wales for 4 may 2011 | SELECT plaid_cymru FROM table_name_77 WHERE polling_organisation_client = "yougov/itv wales" AND date_s__conducted = "4 may 2011" |
Which state has a royal house of Ying? | SELECT state FROM table_name_66 WHERE royal_house = "ying" |
What is the largest amount of top division titles featuring the tammeka club? | SELECT MAX(top_division_titles) FROM table_name_56 WHERE club = "tammeka" |
Which To par has a Place of t6, and a Player of nick faldo? | SELECT to_par FROM table_name_56 WHERE place = "t6" AND player = "nick faldo" |
Can you add their genders into the table please? | select artist_name, gender from artist where artist_name in ( SELECT DISTINCT artist_name FROM artist WHERE country = "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 7 ) |
What Haydon had a 33 Ben-Tahir? | SELECT haydon FROM table_name_68 WHERE ben_tahir = "33" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.