instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
how many patients whose insurance is private and admission location is transfer from hosp/extram? | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" |
has patient 013-29301 undergone a stress ulcer prophylaxis - esomeprazole procedure in this year? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean num... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-29301')) AND treatment.treatmentname = 'stress ulcer prophylaxis - esome... |
what was the race time in 2004 ? | CREATE TABLE table_204_604 (id number,"year" number,"date" text,"driver" text,"team" text,"manufacturer" text,"race distance\nlaps" number,"race distance\nmiles (km)" text,"race time" text,"average speed\n(mph)" number,"report" text) | SELECT "race time" FROM table_204_604 WHERE "year" = 2004 |
What is the average year with Nathan Robertson Gail Emms in mixed doubles? | CREATE TABLE table_name_71 (year INTEGER,mixed_doubles VARCHAR) | SELECT AVG(year) FROM table_name_71 WHERE mixed_doubles = "nathan robertson gail emms" |
Where was the game on Thursday, April 29, and they played the Chicago Cubs? | CREATE TABLE table_name_84 (site VARCHAR,opponent VARCHAR,date VARCHAR) | SELECT site FROM table_name_84 WHERE opponent = "chicago cubs" AND date = "thursday, april 29" |
What is the record for the game when the Dallas Mavericks was the home team? | CREATE TABLE table_name_24 (record VARCHAR,home VARCHAR) | SELECT record FROM table_name_24 WHERE home = "dallas mavericks" |
Which Game has a Score of 122 125? | CREATE TABLE table_45800 ("Game" real,"Date" text,"Team" text,"Score" text,"Record" text,"Streak" text) | SELECT "Game" FROM table_45800 WHERE "Score" = '122–125' |
What is the Margin, when Date is 19 July 2008 (Round 19)? | CREATE TABLE table_8790 ("Margin" real,"Score" text,"Winning Team" text,"Losing Team" text,"Venue" text,"Date" text) | SELECT "Margin" FROM table_8790 WHERE "Date" = '19 july 2008 (round 19)' |
What is the surface of the match when the outcome was runner-up, and a Score of julia g rges polona hercog? | CREATE TABLE table_68456 ("Outcome" text,"Date" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Surface" FROM table_68456 WHERE "Outcome" = 'runner-up' AND "Score" = 'julia görges polona hercog' |
Where is the venue with more than 245 runs? | CREATE TABLE table_name_71 (venue VARCHAR,runs VARCHAR) | SELECT venue FROM table_name_71 WHERE runs = "245" |
What is the Length, when the Name is Himos? | CREATE TABLE table_66933 ("Stage" text,"Time (EEST)" text,"Name" text,"Length" text,"Winner" text,"Time" text,"Avg. spd." text,"Rally leader" text) | SELECT "Length" FROM table_66933 WHERE "Name" = 'himos' |
What is the highest year premiered for the TV2 network when main present is yvind mund? | CREATE TABLE table_26680 ("Region/Country" text,"Local name" text,"Main presenter" text,"Network" text,"Year premiered" real) | SELECT MAX("Year premiered") FROM table_26680 WHERE "Network" = 'TV2' AND "Main presenter" = 'Øyvind Mund' |
what were the four most frequently taken lab tests until 1 year ago for patients with age 30s? | CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)C... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 30 AND 39) AND DATETIME(labevents.chartti... |
When davao city is the home or representative town or province and clash 2010 is the edition how many ages are there? | CREATE TABLE table_19061741_3 (age VARCHAR,edition VARCHAR,home_or_representative_town_or_province VARCHAR) | SELECT COUNT(age) FROM table_19061741_3 WHERE edition = "Clash 2010" AND home_or_representative_town_or_province = "Davao City" |
In the week of what was the runner-up Pat Du Pr ? | CREATE TABLE table_31101 ("Week of" text,"Tournament" text,"Champion" text,"Runner-up" text,"Semifinalists" text,"Quarterfinalists" text) | SELECT "Week of" FROM table_31101 WHERE "Runner-up" = 'Pat Du Pré' |
What are the names and type codes of products? | CREATE TABLE assets (asset_id number,other_details text)CREATE TABLE products_in_events (product_in_event_id number,event_id number,product_id number)CREATE TABLE agreements (document_id number,event_id number)CREATE TABLE events (event_id number,address_id number,channel_id number,event_type_code text,finance_id numbe... | SELECT product_name, product_type_code FROM products |
How many people tuned in to the finale on May 16, 2007? | CREATE TABLE table_name_27 (viewers__in_millions_ VARCHAR,finale VARCHAR) | SELECT COUNT(viewers__in_millions_) FROM table_name_27 WHERE finale = "may 16, 2007" |
in the previous month when did patient 51177 last receive the ptt test? | CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE labevents (row_id numbe... | SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'ptt') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51177) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURRENT_TI... |
How many laps did Ricardo Zonta have? | CREATE TABLE table_name_69 (laps INTEGER,driver VARCHAR) | SELECT SUM(laps) FROM table_name_69 WHERE driver = "ricardo zonta" |
what is the name of procedure patient 005-4044 has been given two or more times in the first hospital visit? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... |
How many competitions for each country?, and list by the Y-axis from high to low. | CREATE TABLE club (Club_ID int,name text,Region text,Start_year text)CREATE TABLE competition_result (Competition_ID int,Club_ID_1 int,Club_ID_2 int,Score text)CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE club_rank (Rank real,Club_ID int... | SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY COUNT(Country) DESC |
Who directed An Egg Scramble? | CREATE TABLE table_name_53 (director VARCHAR,title VARCHAR) | SELECT director FROM table_name_53 WHERE title = "an egg scramble" |
what is the party with the incumbent jim demint? | CREATE TABLE table_1341423_40 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_1341423_40 WHERE incumbent = "Jim DeMint" |
During the game at Candlestick Park, who was the visiting team? | CREATE TABLE table_name_99 (visiting_team VARCHAR,stadium VARCHAR) | SELECT visiting_team FROM table_name_99 WHERE stadium = "candlestick park" |
what is the result when the category is best sound design? | CREATE TABLE table_62312 ("Year" real,"Award Ceremony" text,"Category" text,"Nominee" text,"Result" text) | SELECT "Result" FROM table_62312 WHERE "Category" = 'best sound design' |
display the first and last name, department, city, and state province for each employee. | CREATE TABLE locations (city VARCHAR,state_province VARCHAR,location_id VARCHAR)CREATE TABLE departments (department_name VARCHAR,department_id VARCHAR,location_id VARCHAR)CREATE TABLE employees (first_name VARCHAR,last_name VARCHAR,department_id VARCHAR) | SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id |
Give me a bar graph showing the total number of different product names. | CREATE TABLE Parties (Party_ID INTEGER,Party_Details VARCHAR(255))CREATE TABLE Parties_in_Events (Party_ID INTEGER,Event_ID INTEGER,Role_Code CHAR(15))CREATE TABLE Channels (Channel_ID INTEGER,Other_Details VARCHAR(255))CREATE TABLE Finances (Finance_ID INTEGER,Other_Details VARCHAR(255))CREATE TABLE Addresses (Address... | SELECT Product_Name, COUNT(Product_Name) FROM Products GROUP BY Product_Name |
what are the five most frequently input events during a year before? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE intakeoutput (intakeoutputid number,patientunits... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY intakeoutput.celllabel) AS ... |
What is the weight of the player from pvk jadran club? | CREATE TABLE table_36486 ("Name v t e" text,"Pos." text,"Height" text,"Weight" text,"Club" text) | SELECT "Weight" FROM table_36486 WHERE "Club" = 'pvk jadran' |
Which the highest Bronze of czech republic with a Total smaller than 4? | CREATE TABLE table_14272 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Bronze") FROM table_14272 WHERE "Nation" = 'czech republic' AND "Total" < '4' |
which nationality had the most notable poets ? | CREATE TABLE table_204_698 (id number,"name" text,"lifetime" text,"nationality" text,"notable as" text,"notes" text) | SELECT "nationality" FROM table_204_698 WHERE "notable as" = 'poet' GROUP BY "nationality" ORDER BY COUNT(*) DESC LIMIT 1 |
What was 2002, when 2011 was, 'atp masters series'? | CREATE TABLE table_42286 ("Tournament" text,"1998" text,"1999" text,"2000" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2002" FROM table_42286 WHERE "2011" = 'atp masters series' |
Are there any upper level courses taught by Julia Sonnevend ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project va... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.ins... |
what is the country when the player is bill nary? | CREATE TABLE table_49972 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" real,"Money ($)" text) | SELECT "Country" FROM table_49972 WHERE "Player" = 'bill nary' |
What is the episode # when the guests were julie nixon eisenhower and david eisenhower? | CREATE TABLE table_28004 ("Episode #" real,"The W\u00f8rd" text,"Guest" text,"Introductory phrase" text,"Original airdate" text,"Production code" real) | SELECT MIN("Episode #") FROM table_28004 WHERE "Guest" = 'Julie Nixon Eisenhower and David Eisenhower' |
Which country did Johanna Klum presented the show? | CREATE TABLE table_27004 ("Country" text,"Local title" text,"Presenter(s)" text,"Judges" text,"Channel" text,"Series" text) | SELECT "Country" FROM table_27004 WHERE "Presenter(s)" = 'Johanna Klum' |
What is the position for the player with cfl team Winnipeg blue bombers? | CREATE TABLE table_16315 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "Position" FROM table_16315 WHERE "CFL Team" = 'Winnipeg Blue Bombers' |
If the population density is 7,447.32, what is the population total number? | CREATE TABLE table_232458_1 (population__2010_census_ VARCHAR,pop_density__per_km²_ VARCHAR) | SELECT COUNT(population__2010_census_) FROM table_232458_1 WHERE pop_density__per_km²_ = "7,447.32" |
Can you tell me the highest Lost that has the Pool/Round of pool 2, and the Played smaller than 6? | CREATE TABLE table_8390 ("Season" text,"Pool/Round" text,"Played" real,"Drawn" real,"Lost" real,"Bonus" text,"Points" real) | SELECT MAX("Lost") FROM table_8390 WHERE "Pool/Round" = 'pool 2' AND "Played" < '6' |
find the number of players whose points are lower than 30 in each position. | CREATE TABLE player (POSITION VARCHAR,points INTEGER) | SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION |
list airports | CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airline (airline_code varchar,ai... | SELECT DISTINCT airport_code FROM airport |
how many patients whose procedure long title is excision or destruction of other lesion or tissue of heart, open approach and lab test fluid is pleural? | 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 text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Excision or destruction of other lesion or tissue of heart, open approach" AND lab.fluid = "Pleural" |
What is the total number of Round with a Method of submission (ankle lock), a Location of tokyo, japan, and a Record of 13-5-2? | CREATE TABLE table_13208 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Round" real,"Time" text,"Location" text) | SELECT SUM("Round") FROM table_13208 WHERE "Method" = 'submission (ankle lock)' AND "Location" = 'tokyo, japan' AND "Record" = '13-5-2' |
Which branding has the callsign of DXGH? | CREATE TABLE table_28794440_1 (branding VARCHAR,callsign VARCHAR) | SELECT branding FROM table_28794440_1 WHERE callsign = "DXGH" |
Which Name has a Position smaller than 2? | CREATE TABLE table_43756 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real) | SELECT "Name" FROM table_43756 WHERE "Position" < '2' |
what is the Moldovans number when there are 14,200 Ukrainians? | CREATE TABLE table_name_81 (moldovans VARCHAR,ukrainians VARCHAR) | SELECT moldovans FROM table_name_81 WHERE ukrainians = "14,200" |
Plot how many country by grouped by country as a bar graph, show X from high to low order. | CREATE TABLE round (Round_ID int,Member_ID int,Decoration_Theme text,Rank_in_Round int)CREATE TABLE member (Member_ID int,Name text,Country text,College_ID int)CREATE TABLE college (College_ID int,Name text,Leader_Name text,College_Location text) | SELECT Country, COUNT(Country) FROM member GROUP BY Country ORDER BY Country DESC |
How many settlements have as their cyrillic name and other names ? | CREATE TABLE table_2562572_27 (settlement VARCHAR,cyrillic_name_other_names VARCHAR) | SELECT settlement FROM table_2562572_27 WHERE cyrillic_name_other_names = "Панонија" |
Where is the school whose students are nicknamed Panthers located? | CREATE TABLE table_1971074_1 (location VARCHAR,nickname VARCHAR) | SELECT location FROM table_1971074_1 WHERE nickname = "Panthers" |
what is the subtrate for enzyme ala dehydratase | CREATE TABLE table_22222 ("Enzyme" text,"Location" text,"Substrate" text,"Product" text,"Chromosome" text,"EC" text,"OMIM" real,"Porphyria" text) | SELECT "Substrate" FROM table_22222 WHERE "Enzyme" = 'ALA dehydratase' |
What was the date of airing for episodes with ratings under 10.1 and production number of 96 5-09? | CREATE TABLE table_40565 ("Episode number Production number" text,"Title" text,"Original airing" text,"Rating" real,"Share" real,"18-49" real,"Total viewers (in millions)" real,"Rank per week" text) | SELECT "Original airing" FROM table_40565 WHERE "Rating" < '10.1' AND "Episode number Production number" = '96 5-09' |
what is th area where the municipaity is labrador? | CREATE TABLE table_21161 ("Municipality" text,"Income Class" text,"District" text,"Population (2010)" real,"Area (km\u00b2)" real) | SELECT "Area (km\u00b2)" FROM table_21161 WHERE "Municipality" = 'Labrador' |
Visualize a bar chart about the distribution of date_address_to and the sum of monthly_rental , and group by attribute other_details and bin date_address_to by time. | CREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR(10),incident_type_description VARCHAR(80))CREATE TABLE Teachers (teacher_id INTEGER,address_id INTEGER,first_name VARCHAR(80),middle_name VARCHAR(80),last_name VARCHAR(80),gender VARCHAR(1),cell_mobile_number VARCHAR(40),email_address VARCHAR(40),other_details ... | SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC |
What is the highest rank of an athlete from Switzerland in a heat larger than 3? | CREATE TABLE table_name_54 (rank INTEGER,heat VARCHAR,nationality VARCHAR) | SELECT MAX(rank) FROM table_name_54 WHERE heat > 3 AND nationality = "switzerland" |
What was the winning time for the winning horse, Kentucky ii? | CREATE TABLE table_75690 ("Year" real,"Winner" text,"Jockey" text,"Trainer" text,"Owner" text,"Distance (Miles)" text,"Time" text) | SELECT "Time" FROM table_75690 WHERE "Winner" = 'kentucky ii' |
At what latitude can you find the diameter (km) of 500.0? | CREATE TABLE table_21076 ("Name" text,"Latitude" text,"Longitude" text,"Diameter (km)" text,"Year named" real,"Name origin" text) | SELECT "Latitude" FROM table_21076 WHERE "Diameter (km)" = '500.0' |
Which weightlifter, who had a bodyweight of less than 136.16 and a clean and jerk larger than 135, had the highest Total? | CREATE TABLE table_51386 ("Name" text,"Bodyweight" real,"Snatch" real,"Clean & jerk" real,"Total (kg)" real) | SELECT MAX("Total (kg)") FROM table_51386 WHERE "Bodyweight" < '136.16' AND "Clean & jerk" > '135' |
When is Northern Ireland the opponent? | CREATE TABLE table_name_55 (date VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_55 WHERE opponent = "northern ireland" |
How many people attended the May 28 game? | CREATE TABLE table_name_99 (attendance VARCHAR,date VARCHAR) | SELECT attendance FROM table_name_99 WHERE date = "may 28" |
How many yards for the player with over 0 TDs and an average of 2.9? | CREATE TABLE table_57992 ("Player" text,"Car." real,"Yards" real,"Avg." real,"TD's" real,"Long" real) | SELECT MIN("Yards") FROM table_57992 WHERE "TD's" > '0' AND "Avg." = '2.9' |
When steve holland is the writer what is the air date? | CREATE TABLE table_3817 ("No. in series" text,"No. in season" text,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (millions)" text) | SELECT "Original air date" FROM table_3817 WHERE "Written by" = 'Steve Holland' |
which artists won in 2008 and 2009 respectively ? | CREATE TABLE table_204_655 (id number,"year" number,"winner" text,"album" text,"other finalists" text) | SELECT "winner" FROM table_204_655 WHERE "year" IN (2008, 2009) |
Which Province has a City of hiroshima? | CREATE TABLE table_name_61 (province VARCHAR,city VARCHAR) | SELECT province FROM table_name_61 WHERE city = "hiroshima" |
Which Player has a To par of +9? | CREATE TABLE table_46261 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Player" FROM table_46261 WHERE "To par" = '+9' |
For those employees who did not have any job in the past, a line chart shows the trend of department_id over hire_date . | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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,... | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
how many persons got the fourth position when the regional was shikoku? | CREATE TABLE table_24515 ("Regional" text,"Champions" text,"Runners-up" text,"Third place" text,"Fourth place" text) | SELECT COUNT("Fourth place") FROM table_24515 WHERE "Regional" = 'Shikoku' |
What Championship has a Date of 26 may 1986? | CREATE TABLE table_58983 ("Outcome" text,"Date" text,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Championship" FROM table_58983 WHERE "Date" = '26 may 1986' |
A line chart shows the trend of the amount of date_address_to over date_address_to , and group by attribute date_address_to. | CREATE TABLE Students (student_id INTEGER,address_id INTEGER,first_name VARCHAR(80),middle_name VARCHAR(40),last_name VARCHAR(40),cell_mobile_number VARCHAR(40),email_address VARCHAR(40),date_first_rental DATETIME,date_left_university DATETIME,other_student_details VARCHAR(255))CREATE TABLE Student_Addresses (student_i... | SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY date_address_to ORDER BY monthly_rental DESC |
Which driver drove car Wolf WR3? | CREATE TABLE table_4637 ("Round" real,"Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning car" text) | SELECT "Winning driver" FROM table_4637 WHERE "Winning car" = 'wolf wr3' |
Who won the womens singles event the year that Jonas Lyduch won? | CREATE TABLE table_12163387_1 (womens_singles VARCHAR,mens_singles VARCHAR) | SELECT womens_singles FROM table_12163387_1 WHERE mens_singles = "Jonas Lyduch" |
what is the maximum aircraft movements with international passengers being 21002260 | CREATE TABLE table_19021 ("Rank" real,"Airport" text,"Total Passengers" real,"% Change 2005/2006" text,"International Passengers" real,"Domestic Passengers" real,"Transit Passengers" real,"Aircraft Movements" real,"Freight (Metric Tonnes)" real) | SELECT MAX("Aircraft Movements") FROM table_19021 WHERE "International Passengers" = '21002260' |
how many patients who had an urgent admission type were prescribed the drug with drug code clot10? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.formulary_drug_cd = "CLOT10" |
what is the venue when the runner-up is 20,000, the champion (average in final) is phil taylor (109.35)? | CREATE TABLE table_name_86 (venue VARCHAR,runner_up VARCHAR,champion__average_in_final_ VARCHAR) | SELECT venue FROM table_name_86 WHERE runner_up = "£20,000" AND champion__average_in_final_ = "phil taylor (109.35)" |
Which tournament has a 2013 of 1r, and a 2012 of 1r? | CREATE TABLE table_76429 ("Tournament" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text) | SELECT "Tournament" FROM table_76429 WHERE "2013" = '1r' AND "2012" = '1r' |
What is the name of the episode in which Jenn is eliminated? | CREATE TABLE table_72320 ("Episode title" text,"Air date" text,"Reward" text,"Immunity" text,"Eliminated" text,"Vote" text,"Finish" text) | SELECT "Episode title" FROM table_72320 WHERE "Eliminated" = 'Jenn' |
What party was the winner in the district Maryland 6? | CREATE TABLE table_1341453_22 (party VARCHAR,district VARCHAR) | SELECT party FROM table_1341453_22 WHERE district = "Maryland 6" |
Name the santee sisseton for wi h a | CREATE TABLE table_72620 ("English gloss" text,"Santee-Sisseton" text,"Yankton-Yanktonai" text,"Northern Lakota" text,"Southern Lakota" text) | SELECT "Santee-Sisseton" FROM table_72620 WHERE "Yankton-Yanktonai" = 'wičháša' |
What type has a date of 1 june? | CREATE TABLE table_57195 ("Date" text,"Course" text,"Distance" text,"Type" text,"Winner" text) | SELECT "Type" FROM table_57195 WHERE "Date" = '1 june' |
What was the score when the way team was Wrexham? | CREATE TABLE table_name_12 (score VARCHAR,away_team VARCHAR) | SELECT score FROM table_name_12 WHERE away_team = "wrexham" |
Tell me the highest PI GP with pick # greater than 159 and reg GP more than 0 | CREATE TABLE table_56848 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real) | SELECT MAX("Pl GP") FROM table_56848 WHERE "Pick #" > '159' AND "Reg GP" > '0' |
What year was the role nan taylor, alias of nan ellis, aka mrs. andrews and directed by William keighley? | CREATE TABLE table_51408 ("Year" real,"Film" text,"Role" text,"Leading Man" text,"Director" text) | SELECT SUM("Year") FROM table_51408 WHERE "Role" = 'nan taylor, alias of nan ellis, aka mrs. andrews' AND "Director" = 'william keighley' |
What years did Omar Sneed play? | CREATE TABLE table_42618 ("Name" text,"Position" text,"Number" real,"School/Club Team" text,"Season" text,"Acquisition via" text) | SELECT "Season" FROM table_42618 WHERE "Name" = 'omar sneed' |
How many catches does hh dippenaar have? | CREATE TABLE table_54705 ("Catches" text,"Player" text,"Versus" text,"Venue" text,"Date" text) | SELECT "Catches" FROM table_54705 WHERE "Player" = 'hh dippenaar' |
What is the id and trade name of the medicines can interact with at least 3 enzymes, rank by the Trade_Name in asc please. | CREATE TABLE medicine_enzyme_interaction (enzyme_id int,medicine_id int,interaction_type text)CREATE TABLE enzyme (id int,name text,Location text,Product text,Chromosome text,OMIM int,Porphyria text)CREATE TABLE medicine (id int,name text,Trade_Name text,FDA_approved text) | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY Trade_Name |
what was the only event that she participated in the vault ? | CREATE TABLE table_204_975 (id number,"year" number,"competition" text,"location" text,"event" text,"final-rank" text,"final-score" number,"qualifying rank" number,"qualifying score" number) | SELECT "competition" FROM table_204_975 WHERE "event" = 'vault' |
What is the highest birth/2013 when the death/2012 is 14,1? | CREATE TABLE table_25703_1 (birth_2013 INTEGER,death_2012 VARCHAR) | SELECT MAX(birth_2013) FROM table_25703_1 WHERE death_2012 = "14,1" |
What is the dates where Hillcrest Reserve is the home grounds? | CREATE TABLE table_18752986_1 (first_season VARCHAR,home_ground_s_ VARCHAR) | SELECT first_season FROM table_18752986_1 WHERE home_ground_s_ = "Hillcrest Reserve" |
count the number of patients whose lab test abnormal status is abnormal and lab test name is triiodothyronine (t3). | 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 (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "abnormal" AND lab.label = "Triiodothyronine (T3)" |
show me the cheapest fares from SAN DIEGO to MIAMI one way | CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_n... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN DIEGO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci... |
When Fred Funk had a to par of E, what was the score? | CREATE TABLE table_45066 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Score" FROM table_45066 WHERE "To par" = 'e' AND "Player" = 'fred funk' |
Count of posts by week. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number... | WITH Raw AS (SELECT DATEADD(dd, 7 * FLOOR(DATEDIFF(day, '1970-01-05', CreationDate) / 7), '1970-01-05') AS PostWeek, Id FROM Posts) SELECT PostWeek, COUNT(*) AS Count FROM Raw GROUP BY PostWeek ORDER BY PostWeek |
What is Round, when Record is '4-1'? | CREATE TABLE table_47484 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text,"Location" text) | SELECT "Round" FROM table_47484 WHERE "Record" = '4-1' |
What is the density of yushan county? | CREATE TABLE table_617 ("English Name" text,"Simplified" text,"Traditional" text,"Pinyin" text,"Area" real,"Population" real,"Density" real) | SELECT COUNT("Density") FROM table_617 WHERE "English Name" = 'Yushan County' |
What were the results for the district oklahoma 5? | CREATE TABLE table_18126 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Results" text,"Candidates" text) | SELECT "Results" FROM table_18126 WHERE "District" = 'Oklahoma 5' |
What 100 yard Backstroke has a 100 yard Freestyle of helen yee (sierra vista)? | CREATE TABLE table_59615 ("Combined" text,"50 yard Freestyle" text,"100 yard Freestyle" text,"200 yard Freestyle" text,"500 yard Freestyle" text,"100 yard Backstroke" text,"100 yard Butterfly" text) | SELECT "100 yard Backstroke" FROM table_59615 WHERE "100 yard Freestyle" = 'helen yee (sierra vista)' |
In which location did the Meca World Vale Tudo 6 event happen? | CREATE TABLE table_name_84 (location VARCHAR,event VARCHAR) | SELECT location FROM table_name_84 WHERE event = "meca world vale tudo 6" |
Which player has a total of 8 (24)? | CREATE TABLE table_13722 ("Name" text,"Years" text,"A-League" text,"Finals" text,"Total" text,"Games per goal" real) | SELECT "Name" FROM table_13722 WHERE "Total" = '8 (24)' |
What is the production number for the episode directed by Robert McKimson named Mice Follies? | CREATE TABLE table_79553 ("Title" text,"Series" text,"Director" text,"Production Number" real,"Release date" text) | SELECT COUNT("Production Number") FROM table_79553 WHERE "Director" = 'robert mckimson' AND "Title" = 'mice follies' |
Which opponent has an attendance of 17,015? | CREATE TABLE table_38058 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Opponent" FROM table_38058 WHERE "Attendance" = '17,015' |
What is the country of the Representative that left office as incumbent? | CREATE TABLE table_41065 ("Name" text,"Born-Died" text,"Took Office" text,"Left Office" text,"Country" text) | SELECT "Country" FROM table_41065 WHERE "Left Office" = 'incumbent' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.