context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_34961 ( "Eruptions" text, "Country" text, "Location" text, "Year" real, "Volcanic Explosivity Index" text, "Fatalities" text )
Which Eruptions have a Location of pacific ring of fire, and a Volcanic Explosivity Index of 6, and a Country of peru?
SELECT "Eruptions" FROM table_34961 WHERE "Location" = 'pacific ring of fire' AND "Volcanic Explosivity Index" = '6' AND "Country" = 'peru'
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...
从2010年10月13日到2013年9月11日,在这段就诊结算时间内,病人凤清华所有的医疗就诊记录的编号列一下
SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '凤清华' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-10-13' AND '2013-09-11'
css
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE cost ( costid num...
what are the three most frequent drugs that were prescribed within 2 months to the patients of age 50s after having been diagnosed with cardiac arrest since 2101?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiac arrest' AND STRFTIME('%y', diagnosis.diagn...
eicu
CREATE TABLE table_28035004_1 ( variant VARCHAR, bodybuilder VARCHAR )
What is the variant when Alexander was the bodybuilder?
SELECT variant FROM table_28035004_1 WHERE bodybuilder = "Alexander"
sql_create_context
CREATE TABLE table_11391 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
How many laps are associated with a time of + 1:39.591?
SELECT "Laps" FROM table_11391 WHERE "Time/Retired" = '+ 1:39.591'
wikisql
CREATE TABLE table_name_77 ( goal_difference INTEGER, losses VARCHAR, points VARCHAR, club VARCHAR )
Which Goal Difference has 28 Points, and a Club of cd cartagena, more than 15 losses?
SELECT MAX(goal_difference) FROM table_name_77 WHERE points = 28 AND club = "cd cartagena" AND losses > 15
sql_create_context
CREATE TABLE table_38907 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
Who is the Visitor on march 16?
SELECT "Visitor" FROM table_38907 WHERE "Date" = 'march 16'
wikisql
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 ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
Get the number of patients who have a jehovah's witness religious background and have a creatinine kinase mb isoenzyme lab test.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.label = "Creatine Kinase, MB Isoenzyme"
mimicsql_data
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
fares and flights from BALTIMORE to PHILADELPHIA
SELECT DISTINCT fare.fare_id, flight.airline_code, 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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AI...
atis
CREATE TABLE table_name_60 ( date VARCHAR, opponent VARCHAR, score VARCHAR )
Which date has a Opponent of juan m naco, and a Score of 6 2, 4 6, 7 6 (7 3)?
SELECT date FROM table_name_60 WHERE opponent = "juan mónaco" AND score = "6–2, 4–6, 7–6 (7–3)"
sql_create_context
CREATE TABLE table_79402 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is Turkey's average Gold entry that also has a Bronze entry that is smaller than 2 and the Total is greater than 1?
SELECT AVG("Gold") FROM table_79402 WHERE "Bronze" < '2' AND "Nation" = 'turkey' AND "Total" > '1'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
graph of distribution of question view counts.
SELECT ViewCount / 100 AS Hundred_Views, COUNT(*) AS Nquestions FROM Posts WHERE PostTypeId = 1 GROUP BY ViewCount / 100 ORDER BY ViewCount / 100
sede
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, ...
患者43179204有哪些检验报告的结果指标全部正常?看看这些检验报告的单号
(SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '43179204' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ...
css
CREATE TABLE table_name_81 ( average INTEGER, city VARCHAR )
What is the Average of bergen, norway?
SELECT MIN(average) FROM table_name_81 WHERE city = "bergen, norway"
sql_create_context
CREATE TABLE table_19412902_1 ( clubs VARCHAR, group_stage VARCHAR, member_association VARCHAR )
which club in group stage 4 had member association iran
SELECT clubs FROM table_19412902_1 WHERE group_stage = 4 AND member_association = "Iran"
sql_create_context
CREATE TABLE table_27455 ( "Rank" real, "Rider" text, "Sat 29 May" text, "Mon 31 May" text, "Tues 1 June" text, "Wed 2 June" text, "Thurs 3 June" text, "Fri 4 June" text )
If Thursday 3 June is 20' 27.93 110.615mph, what are the names of the riders?
SELECT "Rider" FROM table_27455 WHERE "Thurs 3 June" = '20'' 27.93 110.615mph'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
根据不同的科室名字和入院的时候诊断出疾病的编码显示出医院9645673所有就诊记录中病人就诊时的平均年纪
SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '9645673' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.IN_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '96456...
css
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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
count the number of patients whose days of hospital stay is greater than 10 and procedure long title is (aorto)coronary bypass of two coronary arteries?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "10" AND procedures.long_title = "(Aorto)coronary bypass of two coronary arteries"
mimicsql_data
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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
count the number of patients whose admission location is clinic referral/premature and diagnoses icd9 code is 7069?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.icd9_code = "7069"
mimicsql_data
CREATE TABLE table_28192 ( "Metropolitan ring" text, "Localities" real, "Total" real, "Jews and others 1" real, "Thereof: Jews" real, "Arabs" real, "Population density (per km\u00b2)" text, "Annual Population growth rate" text )
What is the lowest jews and others 1 for the localities 11?
SELECT MIN("Jews and others 1") FROM table_28192 WHERE "Localities" = '11'
wikisql
CREATE TABLE table_name_49 ( starts INTEGER, year VARCHAR, avg_start VARCHAR )
What was the highest number of starts in 2007 when the average start was over 17.6?
SELECT MAX(starts) FROM table_name_49 WHERE year = 2007 AND avg_start > 17.6
sql_create_context
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...
count the number of patients whose drug name is promethazine hcl?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Promethazine HCl"
mimicsql_data
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW tex...
自2001-04-15起,截止到2006-05-09,医疗机构5651827开出的检验报告单的详细数量有多少
SELECT COUNT(*) FROM jybgb WHERE jybgb.YLJGDM = '5651827' AND jybgb.BGRQ BETWEEN '2001-04-15' AND '2006-05-09'
css
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
calculate the maximum days for which patients aged 79 years or more were hospitalized.
SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.age >= "79"
mimicsql_data
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, ...
User Rank and Hoarded Rep.
SELECT p.Id AS "user_link", p.Ranking, SUBSTRING(CAST(CAST(Ranking AS FLOAT) / Count * 100.00 AS TEXT), 1, 6) + '%' AS Percentile, Reputation, SUBSTRING(CAST(CAST(Reputation AS FLOAT) / Sum * 100.00 AS TEXT), 1, 6) + '%' AS "Hoarded rep" FROM (SELECT Id, ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS Ranking, Reputati...
sede
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 demographic ...
calculate the number of patients with item id 50983 who were provided phys referral/normal deli.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.itemid = "50983"
mimicsql_data
CREATE TABLE table_12752 ( "Season" real, "Winners" text, "Total wins" real, "Runners-up" text, "Third-place" text, "Number of clubs" real )
What is the sum of the number of clubs in seasons before 1992 with more than 3 total wins?
SELECT SUM("Number of clubs") FROM table_12752 WHERE "Season" < '1992' AND "Total wins" > '3'
wikisql
CREATE TABLE table_name_66 ( opponent VARCHAR, arena VARCHAR, date VARCHAR )
What is the Opponent at the Honda Center on March 29?
SELECT opponent FROM table_name_66 WHERE arena = "honda center" AND date = "march 29"
sql_create_context
CREATE TABLE table_name_19 ( against INTEGER, draw VARCHAR, played VARCHAR )
What is the total against with 1 draw and less than 8 played?
SELECT SUM(against) FROM table_name_19 WHERE draw = 1 AND played < 8
sql_create_context
CREATE TABLE table_32706 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text )
Which opponent had an attendance of 40,070?
SELECT "Opponent" FROM table_32706 WHERE "Attendance" = '40,070'
wikisql
CREATE TABLE table_69694 ( "Year" real, "Winners" text, "2nd place" text, "3rd place" text, "4th place" text )
Name the 3rd place with winners of weymouth wildcats and 4th place of boston barracudas
SELECT "3rd place" FROM table_69694 WHERE "Winners" = 'weymouth wildcats' AND "4th place" = 'boston barracudas'
wikisql
CREATE TABLE table_1341865_40 ( district VARCHAR, incumbent VARCHAR )
What district is incumbent albert w. johnson from?
SELECT district FROM table_1341865_40 WHERE incumbent = "Albert W. Johnson"
sql_create_context
CREATE TABLE table_74970 ( "Condition" text, "Prothrombin time" text, "Partial thromboplastin time" text, "Bleeding time" text, "Platelet count" text )
Which Condition has a Bleeding time of unaffected, and a Partial thromboplastin time of prolonged, and a Prothrombin time of unaffected?
SELECT "Condition" FROM table_74970 WHERE "Bleeding time" = 'unaffected' AND "Partial thromboplastin time" = 'prolonged' AND "Prothrombin time" = 'unaffected'
wikisql
CREATE TABLE table_test_29 ( "id" int, "bleeding" int, "left_ventricular_ejection_fraction_lvef" int, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "heart_disease" bool, "trauma" bool, "renal_disease" bool, "creatinine_clearance_cl" float, "hemorrhagic_stroke" ...
history of hemorrhagic stroke.
SELECT * FROM table_test_29 WHERE hemorrhagic_stroke = 1
criteria2sql
CREATE TABLE table_name_50 ( member VARCHAR, electorate VARCHAR )
Which member has an Electorate of kennedy?
SELECT member FROM table_name_50 WHERE electorate = "kennedy"
sql_create_context
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 who are still alive?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "0"
mimicsql_data
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGE...
Find the number of students who is older than 20 in each dorm Plot them as bar chart, I want to rank in ascending by the Y.
SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY COUNT(*)
nvbench
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...
名叫李向彤的病人所有检验结果指标记录中的检测方法在11年12月4日到21年12月17日内都有哪些?
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb....
css
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the sum of price , and group by attribute founder, order by the total number of price in desc please.
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) DESC
nvbench
CREATE TABLE table_19479 ( "Date Released" text, "Polling institute" text, "Socialist" text, "Social Democratic" text, "Peoples Party" text, "Green-Communist" text, "Left Bloc" text, "Lead" text )
How many percentages of Left Bloc correspond to a 32.1% Social Democratic?
SELECT COUNT("Left Bloc") FROM table_19479 WHERE "Social Democratic" = '32.1%'
wikisql
CREATE TABLE table_39471 ( "Name" text, "Type" text, "Year Built" real, "Where Built" text, "Initial Owners" text )
Where was something built earlier than 1858?
SELECT "Where Built" FROM table_39471 WHERE "Year Built" < '1858'
wikisql
CREATE TABLE table_39448 ( "PRINT NAME" text, "NICKNAME" text, "NUMBER OF COLORS" text, "FRAMED SIZE" text, "DATE COMPLETED" text )
What was the print name in 07/87?
SELECT "PRINT NAME" FROM table_39448 WHERE "DATE COMPLETED" = '07/87'
wikisql
CREATE TABLE table_name_4 ( date VARCHAR, score VARCHAR )
When did the Score of 195 (-21) happen?
SELECT date FROM table_name_4 WHERE score = "195 (-21)"
sql_create_context
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
病患凤香馨使用的药品均低于3461.35元一共有多少记载在次医疗记录上?编号当时都是多少?
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '凤香馨' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 3461.35) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '凤香馨' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUN...
css
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...
医疗机构3974649做项目165044266-n的检查记录有多少
SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_MED_SER_ORG_NO = '3974649' AND t_kc22.SOC_SRT_DIRE_CD = '165044266-n'
css
CREATE TABLE table_29271 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (in millions)" text )
How many viewer data were given for episode 'If at First You Don't Succeed, Lie, Lie Again'?
SELECT COUNT("U.S. viewers (in millions)") FROM table_29271 WHERE "Title" = 'If at First You Don''t Succeed, Lie, Lie Again'
wikisql
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text ) CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text )
What are the dates of birth of entrepreneurs with investor 'Simon Woodroffe' or 'Peter Jones', and count them by a line chart
SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones"
nvbench
CREATE TABLE table_204_486 ( id number, "name" text, "season(s)" text, "position(s)" text, "notes" text )
tell me the number of left fielders on the list .
SELECT COUNT(*) FROM table_204_486 WHERE "position(s)" = 'left fielder'
squall
CREATE TABLE table_name_20 ( loss VARCHAR, opponent VARCHAR )
What was the loss from the coyotes as opponents?
SELECT loss FROM table_name_20 WHERE opponent = "coyotes"
sql_create_context
CREATE TABLE table_name_30 ( position VARCHAR, year VARCHAR, player VARCHAR )
What was the position of Greg Fredlund in years after 2008?
SELECT position FROM table_name_30 WHERE year > 2008 AND player = "greg fredlund"
sql_create_context
CREATE TABLE table_name_90 ( mountain_range VARCHAR, region VARCHAR, mountain_peak VARCHAR )
what is the mountain range when the region is british columbia and mountain pea is mount edziza?
SELECT mountain_range FROM table_name_90 WHERE region = "british columbia" AND mountain_peak = "mount edziza"
sql_create_context
CREATE TABLE table_51672 ( "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 Home team from South Melbourne?
SELECT "Home team score" FROM table_51672 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE table_name_50 ( number VARCHAR, language VARCHAR )
How many speak german?
SELECT number FROM table_name_50 WHERE language = "german"
sql_create_context
CREATE TABLE table_name_97 ( to_par VARCHAR, score VARCHAR )
Which To par has a Score of 70-73-80-68=291?
SELECT to_par FROM table_name_97 WHERE score = 70 - 73 - 80 - 68 = 291
sql_create_context
CREATE TABLE table_name_58 ( score VARCHAR, opponent VARCHAR, date VARCHAR )
What's the score for opponent @ Tigers on July 24?
SELECT score FROM table_name_58 WHERE opponent = "@ tigers" AND date = "july 24"
sql_create_context
CREATE TABLE table_13086 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real )
What Number of electorates (2009) has a District of mathura, and a Name of mant?
SELECT MIN("Number of electorates (2009)") FROM table_13086 WHERE "District" = 'mathura' AND "Name" = 'mant'
wikisql
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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
what is maximum age of patients whose ethnicity is white - russian and days of hospital stay is 27?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay = "27"
mimicsql_data
CREATE TABLE table_name_74 ( established VARCHAR, institution VARCHAR )
What is the year established of North Jersey Phoenix?
SELECT established FROM table_name_74 WHERE institution = "north jersey phoenix"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
what drug was patient 002-70965 prescribed for within the same hospital visit after being diagnosed with post spinal surgery - lumbar until 08/2102?
SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
eicu
CREATE TABLE table_name_74 ( attendance INTEGER, date VARCHAR )
What was the attendance for the game on August 16?
SELECT SUM(attendance) FROM table_name_74 WHERE date = "august 16"
sql_create_context
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructo...
Emily Mahan , does he teach any upper-level courses ?
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...
advising
CREATE TABLE table_4051 ( "Year" real, "Host Nation(s)" text, "Final Venue" text, "Winner" text, "Result" text, "Runner-up" text )
What was the final venue whene England hasted the competition and the runner-up record is [[|]] 4 points and the winner record is [[|]] 6 points?
SELECT "Final Venue" FROM table_4051 WHERE "Host Nation(s)" = 'England' AND "Runner-up" = '[[|]] 4 points' AND "Winner" = '[[|]] 6 points'
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...
依科室和出院诊断名字的差异找出医院0781537所有的记录里患者年龄的平均数
SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0781537' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM
css
CREATE TABLE table_name_19 ( mascot VARCHAR, year_joined VARCHAR, school VARCHAR )
what is the mascot for moores hill that joined later than 1952?
SELECT mascot FROM table_name_19 WHERE year_joined > 1952 AND school = "moores hill"
sql_create_context
CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE professor ( emp_num number, dept_code text, prof_office text, prof_extension text, prof_high_degree text ) CREATE TABLE course (...
Which department has the most professors with a Ph.D.?
SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_203_345 ( id number, "name" text, "party" text, "took office" number, "left office" number )
when did the first provincial representative for gilbert plains take office ?
SELECT MIN("took office") FROM table_203_345
squall
CREATE TABLE table_2160 ( "Election" text, "# of candidates nominated" real, "# of seats won" real, "# of total votes" real, "% of popular vote" text, "result" text )
Name the most number of total votes for election for 1878
SELECT MAX("# of total votes") FROM table_2160 WHERE "Election" = '1878'
wikisql
CREATE TABLE table_11413 ( "Name" text, "Builder" text, "Type" text, "Date" real, "Works number" real )
What is the total work number of Gowrie after 1875?
SELECT SUM("Works number") FROM table_11413 WHERE "Date" > '1875' AND "Name" = 'gowrie'
wikisql
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Draw a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Road, and sort bars in ascending order.
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home
nvbench
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
what are the top four most common surgeries of patients of age 20s this year?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B...
mimic_iii
CREATE TABLE table_78930 ( "Elector" text, "Place of birth" text, "Cardinalatial title" text, "Elevated" text, "Elevator" text )
Who is the Elector with a Cardinalatial title of Priest of S. Sabina and Archbishop of Reims?
SELECT "Elector" FROM table_78930 WHERE "Cardinalatial title" = 'priest of s. sabina and archbishop of reims'
wikisql
CREATE TABLE election ( Election_ID int, Representative_ID int, Date text, Votes real, Vote_Percent real, Seats real, Place real ) CREATE TABLE representative ( Representative_ID int, Name text, State text, Party text, Lifespan text )
Show vote_percent from each date, could you show y axis from high to low order please?
SELECT Date, Vote_Percent FROM election ORDER BY Vote_Percent DESC
nvbench
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimme...
Give me the comparison about the average of ID over the Nationality , and group by attribute Nationality by a bar chart, and list from low to high by the Y.
SELECT Nationality, AVG(ID) FROM swimmer GROUP BY Nationality ORDER BY AVG(ID)
nvbench
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, h...
what are the five most commonly given diagnoses for patients who have received esophagogastroduodenoscopy - with biopsy previously within 2 months until 2102?
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'esophagogastroduodenoscopy - with biopsy...
eicu
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
Show me about the distribution of Sex and the amount of Sex , and group by attribute Sex in a bar chart, and I want to list total number from low to high order please.
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex)
nvbench
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...
医疗就诊91538093313中大病支出金额有多少
SELECT ILL_PAY FROM t_kc24 WHERE MED_CLINIC_ID = '91538093313'
css
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
查一下水宏茂这位患者就诊结算日期在2008年1月30日到2008年6月28日内的所有医疗就诊记录编号,列出这些编号
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '水宏茂' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2008-01-30' AND '2008-06-28'
css
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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
how many patients were admitted before the year 2103 and underwent procedure under icd9 code 93?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2103" AND procedures.icd9_code = "93"
mimicsql_data
CREATE TABLE table_31785 ( "Year" text, "Men's Singles" text, "Women's Singles" text, "Men's Doubles" text, "Women's Doubles" text, "Mixed Doubles" text )
Who played men's doubles in 2012?
SELECT "Men's Doubles" FROM table_31785 WHERE "Year" = '2012'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejecti...
Illuminator badge users by reputation.
SELECT b.UserId AS "user_link", u.Reputation, b.Date FROM Badges AS b LEFT JOIN Users AS u ON u.Id = b.UserId WHERE b.Name = 'Illuminator' ORDER BY u.Reputation, u.DisplayName
sede
CREATE TABLE table_name_67 ( year INTEGER, event VARCHAR, venue VARCHAR )
What's the highest Year for the Venue of Santiago De Chile and the Event of 800 m?
SELECT MAX(year) FROM table_name_67 WHERE event = "800 m" AND venue = "santiago de chile"
sql_create_context
CREATE TABLE table_16812 ( "Series" real, "Year" text, "Winner" text, "Runner-up" text, "Third place" text, "Fourth place" text, "Fifth place" text, "Sixth place" text, "Host" text )
How many fourth places were there in 2003?
SELECT COUNT("Fourth place") FROM table_16812 WHERE "Year" = '2003'
wikisql
CREATE TABLE table_name_8 ( school VARCHAR, year_left VARCHAR, mascot VARCHAR )
Which School has a Year Left of 1966, and a Mascot of indians?
SELECT school FROM table_name_8 WHERE year_left = 1966 AND mascot = "indians"
sql_create_context
CREATE TABLE table_61328 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
which Surface has Opponents in the final of mark edmondson sherwood stewart, and a Tournament of dallas , u.s.?
SELECT "Surface" FROM table_61328 WHERE "Opponents in the final" = 'mark edmondson sherwood stewart' AND "Tournament" = 'dallas , u.s.'
wikisql
CREATE TABLE table_name_63 ( location VARCHAR, rank_final VARCHAR )
What is the Location of the Competition with a Rank-Final of 10?
SELECT location FROM table_name_63 WHERE rank_final = "10"
sql_create_context
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, ...
list flights from TAMPA to CINCINNATI after 1500
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 (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND flight.departure_time > 1500 AND flight.to_airport = AIRPORT_SERVICE_1.ai...
atis
CREATE TABLE table_55189 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
Who was the visiting team on April 8 where more than 19,141 were in attendance?
SELECT "Visitor" FROM table_55189 WHERE "Attendance" > '19,141' AND "Date" = 'april 8'
wikisql
CREATE TABLE table_72744 ( "Former kingdom" text, "Province" text, "Hangul" text, "Hanja" text, "Capital" text, "Modern equivalent" text )
The hanja is for what capital?
SELECT "Capital" FROM table_72744 WHERE "Hanja" = '尙州'
wikisql
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
列出医院5211360所有医疗就诊记录中患者的平均年龄是多少?保留平均年龄大于10岁的记录并且要根据不同的科室名称和出院诊断疾病名称
SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5211360' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM HAVING AVG(gwyjzb.PERSON_AGE) > 10 UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb...
css
CREATE TABLE table_64943 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What lane has a time of 24.83 and a heat less than 11?
SELECT SUM("Lane") FROM table_64943 WHERE "Time" = '24.83' AND "Heat" < '11'
wikisql
CREATE TABLE table_name_2 ( bronze VARCHAR, sport VARCHAR, total VARCHAR, gold VARCHAR )
When athletics has a total more than 2 and 0 gold, what is the total number of bronze?
SELECT COUNT(bronze) FROM table_name_2 WHERE total > 2 AND gold = 0 AND sport = "athletics"
sql_create_context
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
列出章雅柔在医院0809864看病的记录里办理出院手续的科室名字有肝胆科的记录
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '章雅柔' AND hz_info.YLJGDM = '0809864' AND wdmzjzjlb.CYKSMC LIKE '%肝胆科%' UNION SELECT * FROM person_info JOIN ...
css
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
名叫彭书萱的病人在被门诊诊断为疾病U20.085的时候茶碱的结果定量及其单位都是什么?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ...
css
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, show me about the distribution of name and revenue , and group by attribute name in a bar chart, display in descending by the bars.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostTypes ( Id number, Name text ) C...
List tags per question number.
SELECT DISTINCT PostId FROM PostTags ORDER BY PostId LIMIT 10
sede
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE intakeoutput ( in...
what did patient 027-154299 first get as intake today?
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-154299')) AND intakeoutput.cellpath LIKE '%intake%' AND ...
eicu
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), ...
How many students are in each department Visualize by bar chart, and display X from high to low order.
SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE DESC
nvbench
CREATE TABLE table_2661 ( "Performance comparison" text, "78 Fury" text, "78 Monaco" text, "79 St. Regis" text, "80 St. Regis" text, "81 St. Regis" text )
What is every performance comparison when 80 St. Regis is 360?
SELECT "Performance comparison" FROM table_2661 WHERE "80 St. Regis" = '360'
wikisql
CREATE TABLE table_76288 ( "Year" real, "Category" text, "President" text, "Nominee" text, "Film or Television Series or Miniseries" text, "Result" text )
What was the result of Frank Langella?
SELECT "Result" FROM table_76288 WHERE "Nominee" = 'frank langella'
wikisql
CREATE TABLE table_name_18 ( round VARCHAR, winning_manufacturer VARCHAR, circuit VARCHAR )
What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring?
SELECT COUNT(round) FROM table_name_18 WHERE winning_manufacturer = "mercedes-benz" AND circuit = "hockenheimring"
sql_create_context