context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_35315 ( "Year" real, "Event" text, "Skip" text, "Third" text, "Second" text, "Lead" text )
Which event shows Matt St. Louis in second and a skip of John Morris?
SELECT "Event" FROM table_35315 WHERE "Skip" = 'john morris' AND "Second" = 'matt st. louis'
wikisql
CREATE TABLE table_name_41 ( year INTEGER, venue VARCHAR, driver VARCHAR )
What was the most recent race at Kyalami with Keke Rosberg competing?
SELECT MAX(year) FROM table_name_41 WHERE venue = "kyalami" AND driver = "keke rosberg"
sql_create_context
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId ...
Top Algerian Comments on StackOverflow.
SELECT CONCAT('https://stackoverflow.com/questions/', c.PostId, '/#comment', c.Id, '_', c.PostId) AS link, c.Score, u.DisplayName, u.Reputation, c.Text FROM Comments AS c, Users AS u WHERE c.UserId = u.Id AND u.Location LIKE '%Algeria%' ORDER BY c.Score DESC
sede
CREATE TABLE table_name_59 ( team_from VARCHAR, pick__number VARCHAR )
Which Team has a Pick # of 148?
SELECT team_from FROM table_name_59 WHERE pick__number = 148
sql_create_context
CREATE TABLE table_50985 ( "Poll Year" text, "Winner" text, "Second" text, "Third" text, "Fourth" text, "Fifth" text, "Sixth" text, "Seventh" text, "Eighth" text, "Ninth" text, "Tenth" text )
WHAT IS THE SECOND WITH A TENTH OF DAN BLACK?
SELECT "Second" FROM table_50985 WHERE "Tenth" = 'dan black'
wikisql
CREATE TABLE table_name_83 ( position VARCHAR, drawn VARCHAR, difference VARCHAR, lost VARCHAR )
What position did the team finish in with a Difference of - 6, 3 losses, and over 4 draws?
SELECT COUNT(position) FROM table_name_83 WHERE difference = "- 6" AND lost = 3 AND drawn > 4
sql_create_context
CREATE TABLE table_70848 ( "Rider" text, "Matches" real, "Rides" real, "Bonus Pts" real, "Total Points" real )
What is the total for 34 matches with 111 rides, but no more than 15 bonus points?
SELECT AVG("Total Points") FROM table_70848 WHERE "Matches" = '34' AND "Rides" = '111' AND "Bonus Pts" > '15'
wikisql
CREATE TABLE table_204_755 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number )
which team was the last team that this team faced in the regular season ?
SELECT "opponent" FROM table_204_755 ORDER BY "date" DESC LIMIT 1
squall
CREATE TABLE table_9596 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" real, "Avg. Finish" real, "Winnings" text, "Position" text, "Team(s)" text )
what is the lowest top 5 when the year is after 1995, team(s) is #15 billy ballew motorsports, and starts is more than 4?
SELECT MIN("Top 5") FROM table_9596 WHERE "Year" > '1995' AND "Team(s)" = '#15 billy ballew motorsports' AND "Starts" > '4'
wikisql
CREATE TABLE table_name_31 ( bleeding_time VARCHAR, condition VARCHAR )
Which Bleeding time has a Condition of factor x deficiency as seen in amyloid purpura?
SELECT bleeding_time FROM table_name_31 WHERE condition = "factor x deficiency as seen in amyloid purpura"
sql_create_context
CREATE TABLE table_name_59 ( company VARCHAR, built VARCHAR, ship VARCHAR )
What company built the ship named excellent in 1998?
SELECT company FROM table_name_59 WHERE built = 1998 AND ship = "excellent"
sql_create_context
CREATE TABLE table_name_20 ( birthdate VARCHAR, name VARCHAR )
What is the Birthdate of raymond bonney?
SELECT birthdate FROM table_name_20 WHERE name = "raymond bonney"
sql_create_context
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...
Before I take CSP 100 , which other courses must I complete ?
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE table_30547 ( "#" text, "Player" text, "Country" text, "Score" text, "To par" text, "Winnings ($)" real, "After" real, "Before" real )
What is the to par for the winnings of 232500?
SELECT "To par" FROM table_30547 WHERE "Winnings ($)" = '232500'
wikisql
CREATE TABLE table_name_23 ( draw VARCHAR, lost VARCHAR, points VARCHAR )
What draw has a lost less than 6 with 28 as the points?
SELECT draw FROM table_name_23 WHERE lost < 6 AND points = 28
sql_create_context
CREATE TABLE table_19980 ( "No." real, "English name" text, "Bulgarian name" text, "Bulgarian name ( Transliteration )" text, "Old Bulgarian Names" text, "Old Bulgarian name (Transliteration)" text, "Old Bulgarian name - Meaning" text )
Name the old bulgarian name for number 4
SELECT "Old Bulgarian name - Meaning" FROM table_19980 WHERE "No." = '4'
wikisql
CREATE TABLE table_27565 ( "Facility" text, "Location" text, "Year Opened" text, "Major Facility" text, "Population Gender" text, "Capacity" real, "Custody Level(s)" text )
What is the custody level of the facility in Shelton?
SELECT "Custody Level(s)" FROM table_27565 WHERE "Location" = 'Shelton'
wikisql
CREATE TABLE procedures ( 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, formulary_drug_cd text, route text, drug_dose text ) ...
provide the number of patients whose year of birth is less than 2089 and lab test fluid is joint fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2089" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_name_60 ( yards INTEGER, sack VARCHAR, asst VARCHAR, totaltk VARCHAR )
What is the total of yards when asst. is 19, totaltk is 60 and sack is more than 0?
SELECT SUM(yards) FROM table_name_60 WHERE asst = 19 AND totaltk = 60 AND sack > 0
sql_create_context
CREATE TABLE table_test_30 ( "id" int, "ejection_fraction_ef" int, "multiple_long_bone_fractures" bool, "extracellular_volume_expansion" bool, "pregnancy_or_lactation" bool, "bleeding" int, "serum_potassium" float, "prosthetic_heart_valve" bool, "hbg" int, "anticoagulation" bool,...
high risk trauma or orthopedic patients who cannot receive anticoagulation because of increased bleeding risk, and have one or more of the following injury patterns: severe closed head injury ( gcs < 8 ) ; incomplete spinal cord injury with para or quadriplegia; complex pelvic fractures with associated long _ bone frac...
SELECT * FROM table_test_30 WHERE trauma = 1 OR orthopedic = 1 AND (anticoagulation = 0 OR bleeding = 0) AND (injury_patterns = 1 OR head_injury = 1 OR gcs < 8 OR (incomplete_spinal_cord_injury = 1 AND para = 1 OR quadriplegia = 1) OR (complex_pelvic_fractures = 1 AND associated_long_bone_fractures = 1) OR multiple_lon...
criteria2sql
CREATE TABLE table_30334 ( "No. in series" real, "Title" text, "Directed by" text, "Story & Storyboards by" text, "Original air date" text, "U.S. viewers (millions)" text )
How many different people directed the episode titled 'Fail Fish'?
SELECT COUNT("Directed by") FROM table_30334 WHERE "Title" = 'Fail Fish'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
在入院诊断疾病结果和出院诊断疾病结果的检测中医院3472324在2005年3月11号到2006年10月26号这段时间的医疗记录中有哪些不一样?
(SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '3472324' AND IN_HOSP_DATE BETWEEN '2005-03-11' AND '2006-10-26') EXCEPT (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '3472324' AND IN_HOSP_DATE BETWEEN '2005-03-11' AND '2006-10-26' AND IN_DIAG_DIS_CD = OUT_DIAG_DIS_CD)
css
CREATE TABLE table_71879 ( "Representative" text, "Title" text, "Presentation of Credentials" text, "Termination of Mission" text, "Appointed by" text )
What is the presentation of credentials date of ra l h. castro, who has a title of ambassador extraordinary and plenipotentiary?
SELECT "Presentation of Credentials" FROM table_71879 WHERE "Title" = 'ambassador extraordinary and plenipotentiary' AND "Representative" = 'raúl h. castro'
wikisql
CREATE TABLE table_78150 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the Home team score for the Away team of North Melbourne?
SELECT "Home team score" FROM table_78150 WHERE "Away team" = 'north melbourne'
wikisql
CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Club_ID_2 int, Score text ) CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tri...
List the types of competition and the number of competitions of each type in a bar chart, sort Y-axis in descending order.
SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_name_73 ( attendance VARCHAR, score VARCHAR )
in game that had a score of 7-6 what was the attendance?
SELECT attendance FROM table_name_73 WHERE score = "7-6"
sql_create_context
CREATE TABLE table_name_34 ( date VARCHAR, away_team VARCHAR )
What date was Grimsby Town the away team?
SELECT date FROM table_name_34 WHERE away_team = "grimsby town"
sql_create_context
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Attribute_Definitions ( attribute_id INTEGER, attribute_name VARCHAR(30), attribute_data_type VARCHAR(10) ) ...
What are the number of the names of catalog entries with level number 8?, sort by the Y in ascending.
SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY COUNT(catalog_entry_name)
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number,...
患者55593756的哪些编号的检验报告单对应的检验结果指标均不合格?
SELECT jybgb.BGDH FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '55593756' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO...
css
CREATE TABLE table_name_39 ( primary_military_speciality VARCHAR, code_name VARCHAR )
What is Moondancer's Primary Military Speciality?
SELECT primary_military_speciality FROM table_name_39 WHERE code_name = "moondancer"
sql_create_context
CREATE TABLE table_39559 ( "Paul McCartney" text, "Stuart" text, "McIntosh" text, "Whitten" text, "Linda McCartney" text )
Which McIntosh has a Stuart of bass, and a Linda McCartney of keyboards or drum?
SELECT "McIntosh" FROM table_39559 WHERE "Stuart" = 'bass' AND "Linda McCartney" = 'keyboards or drum'
wikisql
CREATE TABLE table_47774 ( "Name" text, "Built" text, "Listed" text, "Location" text, "Borough" text )
What is the name of the building listed on 1977-11-23?
SELECT "Name" FROM table_47774 WHERE "Listed" = '1977-11-23'
wikisql
CREATE TABLE table_76491 ( "Date" text, "Opponent" text, "Score" text, "Leading Scorer" text, "Attendance" real, "Record" text )
Which Score has an Opponent of @ houston, and a Record of 2-0?
SELECT "Score" FROM table_76491 WHERE "Opponent" = '@ houston' AND "Record" = '2-0'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( me...
how many times patient 009-8833 has received a antiretrovirals (hiv) procedure.
SELECT COUNT(*) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-8833')) AND treatment.treatmentname = 'antiretrovirals (hiv)'
eicu
CREATE TABLE allergy_type ( allergy text, allergytype text ) CREATE TABLE has_allergy ( stuid number, allergy text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text )
What are the student ids for students over 20 years old?
SELECT stuid FROM student WHERE age > 20
spider
CREATE TABLE assignedto ( scientist number, project text ) CREATE TABLE projects ( code text, name text, hours number ) CREATE TABLE scientists ( ssn number, name text )
What are the names of the scientists, and how many projects are each of them working on?
SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name
spider
CREATE TABLE table_11056278_3 ( fastest_lap VARCHAR, winning_driver VARCHAR )
Who had the fastest lap in the races won by Max Papis?
SELECT fastest_lap FROM table_11056278_3 WHERE winning_driver = "Max Papis"
sql_create_context
CREATE TABLE table_33741 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who is the home side when the away side score is 8.8 (56)?
SELECT "Home team" FROM table_33741 WHERE "Away team score" = '8.8 (56)'
wikisql
CREATE TABLE table_name_90 ( year VARCHAR, nation_of_citizenship VARCHAR, type_of_vehicle VARCHAR, racing_series VARCHAR )
What year has the vehicle of open wheel and a racing series of formula one with a Nation of citizenship in Germany.
SELECT year FROM table_name_90 WHERE type_of_vehicle = "open wheel" AND racing_series = "formula one" AND nation_of_citizenship = "germany"
sql_create_context
CREATE TABLE table_28738 ( "School" text, "Nickname" text, "Location" text, "Colors" text, "Join Date" real )
Name the most join date
SELECT MAX("Join Date") FROM table_28738
wikisql
CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE game ( ...
Bar chart x axis away team y axis the number of away team, and show by the X-axis in desc.
SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team ORDER BY Away_team DESC
nvbench
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, language text, religion text, ...
how many patients whose age is less than 41 and lab test fluid is joint fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_204_584 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number, "points" number )
how many points did emerson fittipaldi receive ?
SELECT "points" FROM table_204_584 WHERE "driver" = 'emerson fittipaldi'
squall
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
知不知道申请检验报告单89851265565的科室名称是啥?编码呢
SELECT SQKS, SQKSMC FROM jybgb WHERE BGDH = '89851265565'
css
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
what is the number of patients whose days of hospital stay is greater than 2 and lab test name is prostate specific antigen?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "2" AND lab.label = "Prostate Specific Antigen"
mimicsql_data
CREATE TABLE table_204_287 ( id number, "outcome" text, "no." number, "date" number, "championship" text, "surface" text, "opponent in the final" text, "score in the final" text )
who is at the top of the chart ?
SELECT "opponent in the final" FROM table_204_287 WHERE id = 1
squall
CREATE TABLE table_20918 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (millions)" text )
What episode titles have 20.94 million U.S. viewers?
SELECT "Title" FROM table_20918 WHERE "U.S. viewers (millions)" = '20.94'
wikisql
CREATE TABLE table_18806 ( "Rank by average" real, "Competition finish" real, "Couple" text, "Total" real, "Number of dances" real, "Average" text )
who danced 11 and finished at more than a 2.0
SELECT "Couple" FROM table_18806 WHERE "Number of dances" = '11' AND "Competition finish" > '2.0'
wikisql
CREATE TABLE table_38988 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What round on average was a defensive tackle selected?
SELECT AVG("Round") FROM table_38988 WHERE "Position" = 'defensive tackle'
wikisql
CREATE TABLE table_34451 ( "Position" real, "Club (City/Town)" text, "Games Played" real, "W-L-D" text, "Goals For/Against" text, "Points" real )
What is the position number of the club with more than 24 points and a w-l-d of 8-5-3?
SELECT COUNT("Position") FROM table_34451 WHERE "Points" > '24' AND "W-L-D" = '8-5-3'
wikisql
CREATE TABLE Ref_Shipping_Agents ( shipping_agent_code VARCHAR, shipping_agent_name VARCHAR )
What is the shipping agent code of shipping agent UPS?
SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = "UPS"
sql_create_context
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), ...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of job_id and the sum of department_id , and group by attribute job_id, rank by the total number from high to low.
SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) DESC
nvbench
CREATE TABLE table_12851 ( "Governorate" text, "Cereals" real, "Fruit Trees" real, "Olives" real, "Industrial crops" real, "Vegetables" real )
What is the sum of the cereals of the governorate with 20,753 vegetables and less than 123,304 fruit trees?
SELECT SUM("Cereals") FROM table_12851 WHERE "Vegetables" = '20,753' AND "Fruit Trees" < '123,304'
wikisql
CREATE TABLE table_203_459 ( id number, "township" text, "fips" number, "population\ncenter" text, "population" number, "population\ndensity\n/km2 (/sq mi)" text, "land area\nkm2 (sq mi)" text, "water area\nkm2 (sq mi)" text, "water %" text, "geographic coordinates" text )
after sedan , which township has the next highest population ?
SELECT "township" FROM table_203_459 WHERE "population" < (SELECT "population" FROM table_203_459 WHERE "township" = 'sedan') ORDER BY "population" DESC LIMIT 1
squall
CREATE TABLE table_7205 ( "Rank" real, "Name" text, "Span metres" real, "Span feet" real, "Material" text, "Year opened" real, "Location" text, "Country" text )
What is the sum of Year opened when the span feet is more than 1247, and the spam metres is 384?
SELECT SUM("Year opened") FROM table_7205 WHERE "Span feet" > '1247' AND "Span metres" = '384'
wikisql
CREATE TABLE table_2846320_4 ( streak VARCHAR, last_meeting VARCHAR )
what is the length where the time is 2009
SELECT streak FROM table_2846320_4 WHERE last_meeting = 2009
sql_create_context
CREATE TABLE table_42988 ( "Pos." text, "Player" text, "Team" text, "Height" text, "Weight" real )
What player weight 235?
SELECT "Player" FROM table_42988 WHERE "Weight" = '235'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a line chart about the change of manager_id over hire_date , order from low to high by the x-axis.
SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_13304 ( "Period" text, "Internet Explorer" text, "Firefox" text, "Safari" text, "Opera" text, "Netscape" text, "Other Mozilla" text )
What percentage of users were using Firefox during the period in which *0.77% were using Netscape?
SELECT "Firefox" FROM table_13304 WHERE "Netscape" = '*0.77%'
wikisql
CREATE TABLE table_17690 ( "Quattroporte IV" text, "Units Produced" real, "Production Period" text, "Engine Capacity" text, "Power" text, "Max Speed" text )
When were 668 units produced?
SELECT "Production Period" FROM table_17690 WHERE "Units Produced" = '668'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Select all questions with ONLY a specific tag..
SELECT Id AS "post_link" FROM Posts WHERE LOWER(Tags) = '<' + @Tag + '>'
sede
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
how many hours has it been since the first time in this hospital visit that patient 027-85328 has been diagnosed with atrial fibrillation - with rapid ventricular response?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328...
eicu
CREATE TABLE table_74308 ( "Track no." real, "Track" text, "Original Artist" text, "Soloist(s)" text, "Vocal Percussionist(s)" text, "Arranger(s)" text )
How many tracks have the title let love be your energy?
SELECT COUNT("Track no.") FROM table_74308 WHERE "Track" = 'Let Love Be Your Energy'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
哪些药品开给了患有疾病E68.873的病患他们的编号和名称叫什么?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.t_kc21_IN_DIAG_DIS_CD = 'E68.873'
css
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, language text, religion text, ...
specify ethnic origin of patient id 2560
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_79514 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How much Silver has a Rank of 1, and a Bronze smaller than 3?
SELECT SUM("Silver") FROM table_79514 WHERE "Rank" = '1' AND "Bronze" < '3'
wikisql
CREATE TABLE table_53344 ( "Race" text, "Circuit" text, "Date" text, "Pole position" text, "Fastest lap" text, "Winning driver" text, "Constructor" text, "Tyre" text, "Report" text )
What is the report status of Hockenheimring circuit?
SELECT "Report" FROM table_53344 WHERE "Circuit" = 'hockenheimring'
wikisql
CREATE TABLE table_name_98 ( record VARCHAR, visitor VARCHAR )
What was the record when chicago was the visiting team?
SELECT record FROM table_name_98 WHERE visitor = "chicago"
sql_create_context
CREATE TABLE table_40375 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
For the Tie number of 14 who was the away team?
SELECT "Away team" FROM table_40375 WHERE "Tie no" = '14'
wikisql
CREATE TABLE table_name_6 ( score VARCHAR, competition VARCHAR, result VARCHAR )
What is the score at the 2010 FIFA World Cup Qualification that results in a win?
SELECT score FROM table_name_6 WHERE competition = "2010 fifa world cup qualification" AND result = "win"
sql_create_context
CREATE TABLE table_name_56 ( date VARCHAR, road_team VARCHAR, game VARCHAR )
What is the date of game 3 with Boston as the road team?
SELECT date FROM table_name_56 WHERE road_team = "boston" AND game = "game 3"
sql_create_context
CREATE TABLE table_62292 ( "Outcome" text, "Date" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
What day was there a hard surface when the partner was Marc Gicquel?
SELECT "Date" FROM table_62292 WHERE "Surface" = 'hard' AND "Partner" = 'marc gicquel'
wikisql
CREATE TABLE table_72592 ( "Year" text, "Channel" text, "Play-by-play" text, "Color commentator(s)" text, "Courtside reporter" text, "Studio host" text, "Studio analysts" text )
Who are the studio analysts for the year 2008-09?
SELECT "Studio analysts" FROM table_72592 WHERE "Year" = '2008-09'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id num...
Top 250 users from BD.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, LastAccessDate FROM Users WHERE LOWER(Location) LIKE '%bangladesh%' OR LOWER(Location) LIKE '%bd%' ORDER BY Reputation DESC LIMIT 250
sede
CREATE TABLE table_62577 ( "Tie no" real, "Home team" text, "Score" text, "Away team" text, "Attendance" real )
Who was the Home team in Tie #23?
SELECT "Home team" FROM table_62577 WHERE "Tie no" = '23'
wikisql
CREATE TABLE table_22054 ( "# s Dam and GNIS query Link" real, "# s Lake and GNIS query Link" real, "# s Reservoir and GNIS query Link" real, "Borough or Census area" text, "Comment" text )
How many dams are there in the Lake and Peninsula area?
SELECT MAX("# s Dam and GNIS query Link") FROM table_22054 WHERE "Borough or Census area" = 'Lake and Peninsula'
wikisql
CREATE TABLE table_63628 ( "Rank" real, "Canton" text, "Highest point" text, "Highest elevation" text, "Lowest point" text, "Lowest elevation" text )
Wich rank is given to the Canton of Schaffhausen?
SELECT SUM("Rank") FROM table_63628 WHERE "Canton" = 'schaffhausen'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
编号为69886935的患者的检验报告单的报告日期在一四年六月十八日之前的住院就诊的流水号有哪些
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '69886935' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2014-06-18')
css
CREATE TABLE table_1915 ( "Township" text, "County" text, "Pop. (2010)" real, "Land ( sqmi )" text, "Water (sqmi)" text, "Latitude" text, "Longitude" text, "GEO ID" real, "ANSI code" real )
what is the latitude in the township where wate is 0.288
SELECT "Latitude" FROM table_1915 WHERE "Water (sqmi)" = '0.288'
wikisql
CREATE TABLE table_203_449 ( id number, "name" text, "lifetime" text, "nationality" text, "notable as" text, "notes" text )
who lived longer evelyn irons or arturo islas ?
SELECT "name" FROM table_203_449 WHERE "name" IN ('evelyn irons', 'arturo islas') ORDER BY "lifetime" - "lifetime" DESC LIMIT 1
squall
CREATE TABLE table_20799587_1 ( county VARCHAR, mccain_percentage VARCHAR )
In how many counties did McCain get 65.72% of the votes?
SELECT COUNT(county) FROM table_20799587_1 WHERE mccain_percentage = "65.72%"
sql_create_context
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 text, formulary_drug_cd text, ...
what is the death status and procedure for the patient id 3623?
SELECT demographic.expire_flag, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "3623"
mimicsql_data
CREATE TABLE table_10434 ( "Tie no" real, "Home team" text, "Score" text, "Away team" text, "Attendance" real )
what is the average tie no when the home team is stamford a.f.c.?
SELECT AVG("Tie no") FROM table_10434 WHERE "Home team" = 'stamford a.f.c.'
wikisql
CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255)...
Group and count details for the events using a bar chart.
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details
nvbench
CREATE TABLE table_name_7 ( byes INTEGER, losses VARCHAR, against VARCHAR )
Which Byes have Losses larger than 0, and an Against larger than 3049?
SELECT AVG(byes) FROM table_name_7 WHERE losses > 0 AND against > 3049
sql_create_context
CREATE TABLE table_28797906_3 ( average VARCHAR, wickets VARCHAR )
What is the average of all the wickets that were 27?
SELECT average FROM table_28797906_3 WHERE wickets = 27
sql_create_context
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_fli...
show me the round trip flights between PHOENIX and SALT LAKE CITY
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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SALT LAKE CITY' AND NOT fare.round_trip_cost IS NULL AND flight_fare.f...
atis
CREATE TABLE table_907 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Storyboarded by" text, "Original air date" text, "Production code" text )
When did the episode with season number 10b air for the first time?
SELECT "Original air date" FROM table_907 WHERE "No. in season" = '10b'
wikisql
CREATE TABLE table_48562 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text )
Which event had the record of 18 5 (1)?
SELECT "Event" FROM table_48562 WHERE "Record" = '18–5 (1)'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
select * from posts.
SELECT * FROM Posts
sede
CREATE TABLE table_3845 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Series" text )
What was the location and attendance when lebron james (10) had the high assists?
SELECT "Location Attendance" FROM table_3845 WHERE "High assists" = 'LeBron James (10)'
wikisql
CREATE TABLE table_19765685_2 ( defending_champion VARCHAR, country VARCHAR )
How many defending champs from thailand?
SELECT COUNT(defending_champion) FROM table_19765685_2 WHERE country = "Thailand"
sql_create_context
CREATE TABLE table_204_506 ( id number, "seasons" number, "team" text, "ch.wins" number, "promotions" number, "relegations" number )
what is the difference between the number of wins pallac . reggiana reggio emilia has had and the number of wins progresso castelmaggiore has had ?
SELECT ABS((SELECT "ch.wins" FROM table_204_506 WHERE "team" = 'pallac. reggiana reggio emilia') - (SELECT "ch.wins" FROM table_204_506 WHERE "team" = 'progresso castelmaggiore'))
squall
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
Give me a bar chart to compare the number of departments located in different cities.
SELECT CITY, COUNT(CITY) FROM locations GROUP BY CITY
nvbench
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text )
Compare the total number of different ranks using a bar graph.
SELECT Rank, COUNT(Rank) FROM captain GROUP BY Rank
nvbench
CREATE TABLE table_24313 ( "Episode" real, "Title" text, "Directed by" text, "Written by" text, "Originalairdate" text, "Viewing Figures (millions) Sourced by BARB ; includes ITV1 HD and ITV1 +1" text )
What is the episode number for 'case two (part 1)'?
SELECT "Episode" FROM table_24313 WHERE "Title" = 'Case Two (Part 1)'
wikisql
CREATE TABLE table_67392 ( "Member" text, "Party" text, "Electorate" text, "State" text, "Term in office" text )
Which Electorate is from vic, a labor party, and is David Charles a member of?
SELECT "Electorate" FROM table_67392 WHERE "State" = 'vic' AND "Party" = 'labor' AND "Member" = 'david charles'
wikisql
CREATE TABLE table_2706 ( "County" text, "Population" real, "Unemployment Rate" text, "Market Income Per Capita" text, "Poverty Rate" text, "Status" text )
What is the population in those place where the market income per capita is $17,362?
SELECT "Population" FROM table_2706 WHERE "Market Income Per Capita" = '$17,362'
wikisql
CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE competition ( Competition_ID int, Year real, ...
Bar chart x axis position y axis how many position, display from low to high by the the number of position.
SELECT Position, COUNT(Position) FROM player GROUP BY Position HAVING AVG(Points) >= 20 ORDER BY COUNT(Position)
nvbench
CREATE TABLE table_name_51 ( home_team VARCHAR, away_team VARCHAR )
Who was the home team that played against Armthorpe Welfare?
SELECT home_team FROM table_name_51 WHERE away_team = "armthorpe welfare"
sql_create_context