answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT team FROM table_17802778_1 WHERE average_speed__mph_ = "138.14"
What team(s) enjoyed an average spped (mph) of 138.14?
CREATE TABLE table_17802778_1 (team VARCHAR, average_speed__mph_ VARCHAR)
SELECT "Circuit" FROM table_16753 WHERE "Race Name" = 'VI Rhein-Pokalrennen'
What circuit is the Vi Rhein-Pokalrennen race in?
CREATE TABLE table_16753 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
SELECT decision FROM table_name_96 WHERE visitor = "new jersey"
What is the decision when new jersey was away?
CREATE TABLE table_name_96 (decision VARCHAR, visitor VARCHAR)
SELECT laps FROM table_17802778_1 WHERE year = 2001
How many laps recorded in 2001?
CREATE TABLE table_17802778_1 (laps VARCHAR, year VARCHAR)
SELECT "2012" FROM table_61447 WHERE "Tournament" = 'hamburg masters'
What is the 2012 of the hamburg masters?
CREATE TABLE table_61447 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT scale FROM table_name_90 WHERE name = "ura index"
What is URA Index scale?
CREATE TABLE table_name_90 (scale VARCHAR, name VARCHAR)
SELECT team FROM table_17802778_1 WHERE year = 2003
What team(s) were in 2003?
CREATE TABLE table_17802778_1 (team VARCHAR, year VARCHAR)
SELECT manner_of_departure FROM table_29414946_3 WHERE outgoing_manager = "Geninho"
Why did Geninho leave as manager?
CREATE TABLE table_29414946_3 ( manner_of_departure VARCHAR, outgoing_manager VARCHAR )
SELECT scale FROM table_name_8 WHERE word__number < 4 AND name = "sv_health"
What is the scale of sv_health with a word number smaller than 4?
CREATE TABLE table_name_8 (scale VARCHAR, word__number VARCHAR, name VARCHAR)
SELECT average_speed__mph_ FROM table_17802778_1 WHERE race_time = "1:45:00"
What was the average speed (mph) for the racer who finished in 1:45:00?
CREATE TABLE table_17802778_1 (average_speed__mph_ VARCHAR, race_time VARCHAR)
SELECT T1.SALARY, T1.DEPARTMENT_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID
Show the department id and their salary using a scatter chart.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNT...
SELECT team FROM table_name_55 WHERE sport = "tennis" AND nation_of_citizenship = "united states"
Which tennis team is from the United States?
CREATE TABLE table_name_55 (team VARCHAR, sport VARCHAR, nation_of_citizenship VARCHAR)
SELECT miles__km_ FROM table_17802778_1 WHERE race_time = "1:05:33"
How many total miles recorded for the racer who finished in 1:05:33?
CREATE TABLE table_17802778_1 (miles__km_ VARCHAR, race_time VARCHAR)
SELECT AVG("C/W 15+") FROM table_46413 WHERE "18 to 19" = '132' AND "65 to 69" > '1,869'
what is the average c/w 15+ when 18 to 19 is 132 and 65 to 69 is more than 1,869?
CREATE TABLE table_46413 ( "C/W 15+" real, "Oblast\\Age" text, "15 to 17" real, "18 to 19" text, "20 to 24" real, "25 to 29" real, "30 to 34" real, "35 to 39" real, "40 to 44" real, "45 to 49" real, "50 to 54" real, "55 to 59" real, "60 to 64" real, "65 to 69" rea...
SELECT nation_of_citizenship FROM table_name_12 WHERE year_of_award > 2011
What is the nation of citizenship for athletes later than 2011 year of award?
CREATE TABLE table_name_12 (nation_of_citizenship VARCHAR, year_of_award INTEGER)
SELECT title FROM table_17810099_3 WHERE episode__number = "21a"
what was the title of the episode 21a?
CREATE TABLE table_17810099_3 (title VARCHAR, episode__number VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.fluid = "Ascites"
give me the number of patients whose primary disease is newborn and lab test fluid is ascites?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT constructor FROM table_name_62 WHERE grid < 5 AND driver = "michael schumacher"
What Constructor did Michael Schumacher have with a Grid smaller than 5?
CREATE TABLE table_name_62 (constructor VARCHAR, grid VARCHAR, driver VARCHAR)
SELECT writer_s_ FROM table_17810099_3 WHERE episode__number = "14"
who wrote episode 14?
CREATE TABLE table_17810099_3 (writer_s_ VARCHAR, episode__number VARCHAR)
SELECT "Loss" FROM table_68892 WHERE "Record" = '14-19'
Name the loss with record of 14-19
CREATE TABLE table_68892 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text )
SELECT driver FROM table_name_66 WHERE time_retired = "+1 lap"
Which driver has a Time/Retired of +1 lap?
CREATE TABLE table_name_66 (driver VARCHAR, time_retired VARCHAR)
SELECT COUNT(e_greenberg) FROM table_17820556_4 WHERE county = "Morris"
Who many votes did E. Greenberg receive in Morris County?
CREATE TABLE table_17820556_4 (e_greenberg VARCHAR, county VARCHAR)
SELECT "Pictorials" FROM table_1300 WHERE "Interview subject" = 'Steve Jobs'
Name the pictorials when the interview subject is steve jobs
CREATE TABLE table_1300 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text )
SELECT apparatus FROM table_name_38 WHERE score_final > 17.75
Which apparatus had a final score that was more than 17.75?
CREATE TABLE table_name_38 (apparatus VARCHAR, score_final INTEGER)
SELECT precincts FROM table_17820556_4 WHERE g_hager = "19 (20%)"
How many precincts are in the county where G. Hager received 19 (20%) votes?
CREATE TABLE table_17820556_4 (precincts VARCHAR, g_hager VARCHAR)
SELECT current_club FROM table_12962773_16 WHERE height = "1.97"
What club does the player who is 1.97 m tall play for?
CREATE TABLE table_12962773_16 ( current_club VARCHAR, height VARCHAR )
SELECT competition_description FROM table_name_46 WHERE apparatus = "ribbon"
Which competition description's apparatus was ribbon?
CREATE TABLE table_name_46 (competition_description VARCHAR, apparatus VARCHAR)
SELECT COUNT(slope_length) FROM table_17814458_1 WHERE elevation_groundstation = 1966
Name the slope length for 1966 groundstation
CREATE TABLE table_17814458_1 (slope_length VARCHAR, elevation_groundstation VARCHAR)
SELECT "1990\u20131991 Team" FROM table_43067 WHERE "Birthplace" = 'new york'
What is the 1990 1991 Team when the Birthplace shows as new york?
CREATE TABLE table_43067 ( "Position" text, "Jersey #" real, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "1990\u20131991 Team" text )
SELECT score_qualifying FROM table_name_94 WHERE apparatus = "hoop"
Which Qualifying score had hoop as an apparatus?
CREATE TABLE table_name_94 (score_qualifying VARCHAR, apparatus VARCHAR)
SELECT name_or_route FROM table_17814458_1 WHERE slope_length = 336
Name the name or route for slope length being 336
CREATE TABLE table_17814458_1 (name_or_route VARCHAR, slope_length VARCHAR)
SELECT MIN("Wins") FROM table_14409 WHERE "Points" = '90' AND "Year" < '1994'
What is the lowest win number of the competitor who had 90 points before 1994?
CREATE TABLE table_14409 ( "Year" real, "Team" text, "Wins" real, "Points" real, "Championship Finish" text )
SELECT COUNT(score_qualifying) FROM table_name_7 WHERE score_final = 16.625
What is the sum of qualifying scores when the final score is 16.625?
CREATE TABLE table_name_7 (score_qualifying VARCHAR, score_final VARCHAR)
SELECT MIN(slope_length) FROM table_17814458_1 WHERE type = "gondola"
Name the slope length for gondola
CREATE TABLE table_17814458_1 (slope_length INTEGER, type VARCHAR)
SELECT MAX(overall) FROM table_name_31 WHERE college = "idaho" AND round < 1
Which highest overall has a College of idaho, and a Round smaller than 1?
CREATE TABLE table_name_31 ( overall INTEGER, college VARCHAR, round VARCHAR )
SELECT date FROM table_name_20 WHERE venue = "princes park"
When was the game played at Princes Park?
CREATE TABLE table_name_20 (date VARCHAR, venue VARCHAR)
SELECT MIN(capacity_in_persons_hour) FROM table_17814458_1 WHERE construction_year_s_ = "1983"
Name the least capacity for persons hour for 1983
CREATE TABLE table_17814458_1 (capacity_in_persons_hour INTEGER, construction_year_s_ VARCHAR)
SELECT "Apps" FROM table_69071 WHERE "Country" = 'uzbekistan' AND "Season" = '2003'
How many apps does Uzbekistan have in 2003?
CREATE TABLE table_69071 ( "Season" text, "Team" text, "Country" text, "Division" text, "Apps" real, "Goals" real )
SELECT home_team AS score FROM table_name_88 WHERE home_team = "melbourne"
What did Melbourne score as the home team?
CREATE TABLE table_name_88 (home_team VARCHAR)
SELECT COUNT(new_entries_this_round) FROM table_17814838_1 WHERE round = "Fourth round Proper"
How many categories of new entries this round are there for the fourth round proper?
CREATE TABLE table_17814838_1 (new_entries_this_round VARCHAR, round VARCHAR)
SELECT attendance FROM table_name_24 WHERE game_site = "fedex field" AND week = 3
What is the attendance that has fedex field as the game site with 3 as the week?
CREATE TABLE table_name_24 ( attendance VARCHAR, game_site VARCHAR, week VARCHAR )
SELECT position FROM table_name_40 WHERE high_school = "malvern prep"
What position does the player from malvern prep play?
CREATE TABLE table_name_40 (position VARCHAR, high_school VARCHAR)
SELECT COUNT(runner_up) FROM table_178242_7 WHERE international_destination = "Japan"
How many runner-ups were there when the show went to Japan?
CREATE TABLE table_178242_7 (runner_up VARCHAR, international_destination VARCHAR)
SELECT name, distance FROM aircraft
What are the names and distances for all airplanes. Visualize by bar chart.
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, ...
SELECT team FROM table_name_44 WHERE points > 572 AND games > 29
What team scored more than 572 points and had more than 29 games?
CREATE TABLE table_name_44 (team VARCHAR, points VARCHAR, games VARCHAR)
SELECT COUNT(winner) FROM table_178242_7 WHERE runner_up = "Regina"
How many won the prize when Regina was the runner-up?
CREATE TABLE table_178242_7 (winner VARCHAR, runner_up VARCHAR)
SELECT Builder, COUNT(*) FROM railway GROUP BY Builder ORDER BY Builder
Show different builders of railways, along with the corresponding number of railways using each builder Show bar chart, and display x-axis in asc order.
CREATE TABLE railway_manage ( Railway_ID int, Manager_ID int, From_Year text ) CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, ...
SELECT MIN(games) FROM table_name_88 WHERE rank > 1 AND name = "luis scola"
What is the least amount of games for Luis scola with a rank greater than 1?
CREATE TABLE table_name_88 (games INTEGER, rank VARCHAR, name VARCHAR)
SELECT season FROM table_178242_7 WHERE the_mole = "Milouska"
Which season is it when Milouska was the show's mole ?
CREATE TABLE table_178242_7 (season VARCHAR, the_mole VARCHAR)
SELECT school FROM table_name_18 WHERE year_left = 1966
what is the school that left in 1966?
CREATE TABLE table_name_18 ( school VARCHAR, year_left VARCHAR )
SELECT identity FROM table_name_48 WHERE builder = "brighton works"
What is the identity of the brighton works built train?
CREATE TABLE table_name_48 (identity VARCHAR, builder VARCHAR)
SELECT actor_required FROM table_17827271_1 WHERE actor_in_original_production = "Robert Austin"
What were the requirements for the role played by Robert Austin in the original production?
CREATE TABLE table_17827271_1 (actor_required VARCHAR, actor_in_original_production VARCHAR)
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
What is the easiest class I can do to meet the MDE requirement ?
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT attendance FROM table_name_76 WHERE date = "may 13"
What was the attendance on May 13?
CREATE TABLE table_name_76 (attendance VARCHAR, date VARCHAR)
SELECT actor_in_original_production FROM table_17827271_1 WHERE actor_required = "Female, older"
What actor played the "female, older" role in the original production?
CREATE TABLE table_17827271_1 (actor_in_original_production VARCHAR, actor_required VARCHAR)
SELECT Manager_Name, COUNT(Manager_Name) FROM gas_station GROUP BY Manager_Name ORDER BY Manager_Name DESC
Show the number of gas stations for each manager in a bar chart, and I want to show by the X in desc.
CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Pr...
SELECT MAX(quantity) FROM table_name_84 WHERE ptrd_nos = "3, 15"
What is the highest Quantity for PTRD Nos. 3, 15?
CREATE TABLE table_name_84 (quantity INTEGER, ptrd_nos VARCHAR)
SELECT flatspin FROM table_17827271_1 WHERE actor_in_original_production = "Robert Austin"
What FlatSpin actor played the same role as Robert Austin?
CREATE TABLE table_17827271_1 (flatspin VARCHAR, actor_in_original_production VARCHAR)
SELECT "Metric value" FROM table_38003 WHERE "Unit" = 'dolia'
What Metric value has a Unit of dolia?
CREATE TABLE table_38003 ( "Unit" text, "Russian" text, "Ratio" text, "Metric value" text, "Avoirdupois value" text )
SELECT COUNT(hosted) FROM table_name_85 WHERE average = 27 OFFSET 638
How many were hosted whene the average attendance was 27,638?
CREATE TABLE table_name_85 (hosted VARCHAR, average VARCHAR)
SELECT COUNT(roleplay) FROM table_17827271_1 WHERE actor_required = "Male, younger"
How many RolePlay actors played the role requiring a "male, younger" actor?
CREATE TABLE table_17827271_1 (roleplay VARCHAR, actor_required VARCHAR)
SELECT pick FROM table_name_91 WHERE college = "west virginia"
What is the pick for West Virginia college?
CREATE TABLE table_name_91 ( pick VARCHAR, college VARCHAR )
SELECT MIN(last_year) FROM table_name_87 WHERE hosted > 176
What is the lowest attendance last year when more than 176 were hosted?
CREATE TABLE table_name_87 (last_year INTEGER, hosted INTEGER)
SELECT COUNT(roleplay) FROM table_17827271_1 WHERE flatspin = "Tracy Taylor"
How many RolePlay actors played the same role as FlatSpin's Tracy Taylor?
CREATE TABLE table_17827271_1 (roleplay VARCHAR, flatspin VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 1400 AND flight.departure_time >= 1000) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flig...
flights from DENVER to BALTIMORE between 1000 and 1400
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE restriction ( restriction_c...
SELECT COUNT(1990) FROM table_name_49 WHERE 1970 < 10 OFFSET 522
How many 1990 growth numbers had less than 10,522 in 1970?
CREATE TABLE table_name_49 (Id VARCHAR)
SELECT roleplay FROM table_17827271_1 WHERE actor_in_original_production = "Alison Pargeter"
What RolePlay actor played the same role Alison Pargeter played in the original production?
CREATE TABLE table_17827271_1 (roleplay VARCHAR, actor_in_original_production VARCHAR)
SELECT MIN("Field goals") FROM table_75195 WHERE "Touchdowns" = '4' AND "Extra points" < '9'
What is the smallest number of field goals for players with 4 touchdowns and less than 9 extra points?
CREATE TABLE table_75195 ( "Player" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
SELECT MIN(1980) FROM table_name_61 WHERE 1970 = 2 OFFSET 610
Which is the lowest 1980 growth that had 2,610 in 1970?
CREATE TABLE table_name_61 (Id VARCHAR)
SELECT church_name FROM table_178381_1 WHERE location_of_the_church = "Stavang"
What's the name of the church in Stavang?
CREATE TABLE table_178381_1 (church_name VARCHAR, location_of_the_church VARCHAR)
SELECT "album" FROM table_204_438 ORDER BY "us dance" DESC LIMIT 1
which album was the next one to end up on the us dance list after new jack city ?
CREATE TABLE table_204_438 ( id number, "year" number, "title" text, "album" text, "us r&b" number, "us pop" number, "us dance" number )
SELECT MAX(laps) FROM table_name_3 WHERE grid < 4 AND time_retired = "+ 1 lap"
What is the high lap total that has a grid of less than 4 and a Time/Retired of + 1 lap?
CREATE TABLE table_name_3 (laps INTEGER, grid VARCHAR, time_retired VARCHAR)
SELECT sub_parish__sokn_ FROM table_178381_1 WHERE location_of_the_church = "Eikefjord"
What's the sub-parish (sokn) of Eikefjord?
CREATE TABLE table_178381_1 (sub_parish__sokn_ VARCHAR, location_of_the_church VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admityear < "2120"
what is the number of divorced patients who were admitted before 2120?
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(laps) FROM table_name_62 WHERE time_retired = "+ 1:25.475"
How many laps associated with a Time/Retired of + 1:25.475?
CREATE TABLE table_name_62 (laps VARCHAR, time_retired VARCHAR)
SELECT COUNT(location_of_the_church) FROM table_178381_1 WHERE year_built = "1957" AND church_name = "Askrova bedehuskapell"
On how many locations is there a church named Askrova Bedehuskapell, built in 1957?
CREATE TABLE table_178381_1 (location_of_the_church VARCHAR, year_built VARCHAR, church_name VARCHAR)
SELECT AVG("Round") FROM table_79550 WHERE "Player" = 'dan chicoine' AND "Pick" > '23'
Which Round has a Player of dan chicoine, and a Pick larger than 23?
CREATE TABLE table_79550 ( "Round" real, "Pick" real, "Player" text, "Nationality" text, "College/junior/club team" text )
SELECT home_team AS score FROM table_name_76 WHERE venue = "princes park"
What was the home teams score when the VFL played Princes Park?
CREATE TABLE table_name_76 (home_team VARCHAR, venue VARCHAR)
SELECT parish__prestegjeld_ FROM table_178381_1 WHERE church_name = "Askrova bedehuskapell"
In what parish is the Askrova Bedehuskapell church?
CREATE TABLE table_178381_1 (parish__prestegjeld_ VARCHAR, church_name VARCHAR)
SELECT institution FROM table_1974782_1 WHERE location = "Worcester, Massachusetts"
What school is located in Worcester, Massachusetts?
CREATE TABLE table_1974782_1 ( institution VARCHAR, location VARCHAR )
SELECT away_team AS score FROM table_name_99 WHERE home_team = "geelong"
What was the opponents score when Geelong played as home team?
CREATE TABLE table_name_99 (away_team VARCHAR, home_team VARCHAR)
SELECT channel FROM table_178242_1 WHERE host_s_ = "Art Rooijakkers"
Which channel has the host Art Rooijakkers?
CREATE TABLE table_178242_1 (channel VARCHAR, host_s_ VARCHAR)
SELECT AVG("Round") FROM table_47469 WHERE "Opponent" = 'sam sotello'
How many rounds did the match last with Sam Sotello as the opponent?
CREATE TABLE table_47469 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text )
SELECT home_team AS score FROM table_name_80 WHERE venue = "kardinia park"
What was the home teams score when the VFL played at Kardinia Park?
CREATE TABLE table_name_80 (home_team VARCHAR, venue VARCHAR)
SELECT premiere___aired FROM table_178242_1 WHERE channel = "VIER"
When did the program air on Vier?
CREATE TABLE table_178242_1 (premiere___aired VARCHAR, channel VARCHAR)
SELECT height_from_sea_level_in_meters FROM table_1430913_1 WHERE category = "Picturesque and trekking_route"
picturesque and trekking route is the category what is the height from sea level in meters?
CREATE TABLE table_1430913_1 ( height_from_sea_level_in_meters VARCHAR, category VARCHAR )
SELECT date FROM table_name_70 WHERE away_team = "fitzroy"
When did Fitzroy play as the away team?
CREATE TABLE table_name_70 (date VARCHAR, away_team VARCHAR)
SELECT name FROM table_178242_1 WHERE channel = "Nederland 3" AND premiere___aired = "17 May 2008 – 21 June 2008"
What is the title that aired from 17 may 2008 – 21 june 2008 on Nederland 3?
CREATE TABLE table_178242_1 (name VARCHAR, channel VARCHAR, premiere___aired VARCHAR)
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'sodiu')
what are the prices for sodiu?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE prescription...
SELECT AVG(goals) FROM table_name_13 WHERE apps = 234 AND rank < 8
What is the average number of goals of the player with 234 apps and a rank above 8?
CREATE TABLE table_name_13 (goals INTEGER, apps VARCHAR, rank VARCHAR)
SELECT seasons FROM table_178242_1 WHERE country___region = "Poland"
How many seasons did the show run in Poland?
CREATE TABLE table_178242_1 (seasons VARCHAR, country___region VARCHAR)
SELECT DISTINCT advance_purchase, application, maximum_stay, minimum_stay, no_discounts, restriction_code, saturday_stay_required, stopovers FROM restriction WHERE restriction_code = 'AP/55'
what is restriction AP/55
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( d...
SELECT AVG(avg_game) FROM table_name_51 WHERE goals = 97 AND rank < 7
What is the average avg/game of the player with 97 goals and a rank above 7?
CREATE TABLE table_name_51 (avg_game INTEGER, goals VARCHAR, rank VARCHAR)
SELECT current_stock FROM table_17839_1 WHERE avg_trips_per_mile__×1000_ = 4744
When 4744 is the avg. trips per mile (x1000) what is the current stock?
CREATE TABLE table_17839_1 (current_stock VARCHAR, avg_trips_per_mile__×1000_ VARCHAR)
SELECT Id AS "post_link", SUBSTRING(Body, STR_POSITION(Body, 'me too') - 15, 45) AS "occurrence" FROM Posts WHERE PostTypeId = 2 AND (Body LIKE 'me too%' OR Body LIKE '% me too%') AND NOT Body LIKE '%affects me too%' AND NOT Body LIKE '%fixed it%' AND NOT Body LIKE '%resolved%'
Find 'me too' (so-called) answers. Finds the answers to questions that appear to be the 'me too' style of answers that contribute absolutely nothiing to the question and should either be removed or converted to a comment by a mod.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE T...
SELECT MAX(won__pg_) FROM table_name_85 WHERE goals_conceded__gc_ < 21 AND played__pj_ < 18
What is the highest number of games won where less than 21 games were conceded and less than 18 games were actually played?
CREATE TABLE table_name_85 (won__pg_ INTEGER, goals_conceded__gc_ VARCHAR, played__pj_ VARCHAR)
SELECT future_stock FROM table_17839_1 WHERE map_colour = "Green"
When green is the map colour what is the future stock?
CREATE TABLE table_17839_1 (future_stock VARCHAR, map_colour VARCHAR)
SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
For each distinct test result, find the number of students who got the result.
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARC...
SELECT AVG(goals_conceded__gc_) FROM table_name_80 WHERE goals_scored__gf_ > 19 AND points__pts_ = 31 AND draw__pe_ > 7
What is the average number of goals conceded where more than 19 goals were scored, the team had 31 points, and more than 7 draws?
CREATE TABLE table_name_80 (goals_conceded__gc_ INTEGER, draw__pe_ VARCHAR, goals_scored__gf_ VARCHAR, points__pts_ VARCHAR)
SELECT COUNT(avg_trips_per_mile__) AS ×1000_ FROM table_17839_1 WHERE map_colour = "Turquoise"
When turquoise is the map colour how many avg. trips per mile (×1000) are there?
CREATE TABLE table_17839_1 (avg_trips_per_mile__ VARCHAR, map_colour VARCHAR)