context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_24404 ( "Team name" text, "Races" real, "Won" real, "RR1 Pts." real, "RR2 Pts." real, "RR3 Pts." real, "RR4 Pts." text, "Total Pts." real, "Ranking" real )
When 3 is the rr1 points what is won score?
SELECT "Won" FROM table_24404 WHERE "RR1 Pts." = '3'
wikisql
CREATE TABLE table_23558 ( "#" real, "Sanskrit" text, "Malayalam name \u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02" text, "Tamil name \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" text, "Telugu name \u0c24\u0c46\u0c32\u0c41\u0c17\u0c41" text, "Kannada name \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" text, "Western star name"...
what is kannada name of tamil name anusham
SELECT "Kannada name \u0c95\u0ca8\u0ccd\u0ca8\u0ca1" FROM table_23558 WHERE "Tamil name \u0ba4\u0bae\u0bbf\u0bb4\u0bcd" = 'Anusham அனுஷம்'
wikisql
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...
负责11994027078患者门诊就诊的首诊医生还有其他所有接诊医生的工号是啥啊?
SELECT txmzjzjlb.ZZYSGH, txmzjzjlb.QTJZYSGH FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '11994027078' UNION SELECT ftxmzjzjlb.ZZYSGH, ftxmzjzjlb.QTJZYSGH FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '11994027078'
css
CREATE TABLE table_49960 ( "Institution" text, "Location" text, "Nickname" text, "Enrollment" text, "Established" real )
What is the year established of North Jersey Phoenix?
SELECT "Established" FROM table_49960 WHERE "Institution" = 'north jersey phoenix'
wikisql
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, ...
Show the name of each county along with the corresponding number of delegates from that county Plot them as bar chart, display bar from high to low order.
SELECT County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY T1.County_Id ORDER BY County_name DESC
nvbench
CREATE TABLE zyb ( 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...
这个患者92143985以前有什么疾病吗?
SELECT qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '92143985' UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '92143985' UNION SELECT zyb.IN_DIAG_DIS_CD, zyb.IN_DIAG_DIS_NM FROM zyb WHERE zyb.PERSON_ID = '92143985' UNION SELECT mzb.IN_DIAG_DIS_CD, mzb.IN_DIAG...
css
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" ...
increased risk of bleeding complications:bleeding diathesis, thrombocytopenia ( platelet count < 100000 / mm3 ) , oral anticoagulant therapy ( inr > 1.6 ) , uncontrolled hypertension ( systolic blood pressure > 200 mmhg ) , major bleeding, trauma or surgery within the last 30 days
SELECT * FROM table_test_29 WHERE bleeding = 1 OR (bleeding = 1 OR thrombocytopenia = 1 OR platelet_count < 100000 OR oral_anticoagulant_therapy = 1 OR inr > 1.6 OR hypertension = 1 OR systolic_blood_pressure_sbp > 200 OR bleeding = 1 OR trauma = 1 OR surgery = 1)
criteria2sql
CREATE TABLE parking_fines ( council_tax_id VARCHAR, cmi_cross_ref_id VARCHAR )
List the council tax ids and their related cmi cross references of all the parking fines.
SELECT council_tax_id, cmi_cross_ref_id FROM parking_fines
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
calculate the maximum age of patients with hypoxia on self-pay
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.diagnosis = "HYPOXIA"
mimicsql_data
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...
Return a bar chart about the distribution of ACC_Regular_Season and School_ID , and sort in descending by the bars.
SELECT ACC_Regular_Season, School_ID FROM basketball_match ORDER BY ACC_Regular_Season DESC
nvbench
CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
在2003年9月3日到2003年10月12日间患者53577732全部检验报告单的审核日期都是几月几号?
SELECT jybgb.SHSJ 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 = '53577732' AND jybgb.BGRQ BETWEEN '2003-09-03' AND '2003-...
css
CREATE TABLE table_57688 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
Which Constructor has the goodwood circuit?
SELECT "Constructor" FROM table_57688 WHERE "Circuit" = 'goodwood'
wikisql
CREATE TABLE table_name_32 ( muzzle_velocity VARCHAR, cartridge VARCHAR )
What is the muzzle velocity for the .38 long colt cartridge?
SELECT muzzle_velocity FROM table_name_32 WHERE cartridge = ".38 long colt"
sql_create_context
CREATE TABLE race ( Race_ID int, Name text, Class text, Date text, Track_ID text ) CREATE TABLE track ( Track_ID int, Name text, Location text, Seating real, Year_Opened real )
Show the name of track and the number of races in each track by a bar chart, and list Y in descending order.
SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_43743 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real )
What is Time, when Laps is 22, and when Grid is 15?
SELECT "Time" FROM table_43743 WHERE "Laps" = '22' AND "Grid" = '15'
wikisql
CREATE TABLE table_24302700_2 ( event_1_medley VARCHAR, event_3_squat_lift VARCHAR )
What was the result in the event 1 medley for the man with a 4 (6 in 31.85s) in the event 3 squat lift?
SELECT event_1_medley FROM table_24302700_2 WHERE event_3_squat_lift = "4 (6 in 31.85s)"
sql_create_context
CREATE TABLE gyb ( 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...
被医疗就诊17535786353患者的总医疗费花销是多少?
SELECT qtb.MED_AMOUT FROM qtb WHERE qtb.MED_CLINIC_ID = '17535786353' UNION SELECT gyb.MED_AMOUT FROM gyb WHERE gyb.MED_CLINIC_ID = '17535786353' UNION SELECT zyb.MED_AMOUT FROM zyb WHERE zyb.MED_CLINIC_ID = '17535786353' UNION SELECT mzb.MED_AMOUT FROM mzb WHERE mzb.MED_CLINIC_ID = '17535786353'
css
CREATE TABLE table_51966 ( "Component" text, "Integrated" text, "Allied-Related" text, "Allied-Unrelated" text, "Holding" text )
What is the holding of the customers?
SELECT "Holding" FROM table_51966 WHERE "Component" = 'customers'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
have acetaminophen, 50 ml vial : dextrose 50 % iv soln, or acetaminophen (tylenol) tablet 650 mg been prescribed for patient 022-89058 in their first hospital visit?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-89058' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient....
eicu
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
when was the first time in their last hospital visit patient 015-35874 is prescribed metoprolol?
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-35874' AND NOT patient.hospitaldischargetime IS NULL ORDER...
eicu
CREATE TABLE table_203_350 ( id number, "team #1" text, "agg." text, "team #2" text, "1st leg" text, "2nd leg" text )
how many more points did kallithea score in the first leg of the second round of the 198485 greek cup than the second leg ?
SELECT (SELECT "1st leg" FROM table_203_350 WHERE "team #1" = 'kallithea') - (SELECT "2nd leg" FROM table_203_350 WHERE "team #1" = 'kallithea')
squall
CREATE TABLE table_17265535_6 ( equation VARCHAR )
If the equation is all equal, what is the 3rd throw?
SELECT 3 AS rd_throw FROM table_17265535_6 WHERE equation = "all equal"
sql_create_context
CREATE TABLE table_name_53 ( attendance VARCHAR, home_team VARCHAR )
What was the attendance for the game with alfreton town as the home team?
SELECT attendance FROM table_name_53 WHERE home_team = "alfreton town"
sql_create_context
CREATE TABLE table_2737 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Rank (week)" real, "Original air date" text )
How many million viewers did episode number 63 have?
SELECT "U.S. viewers (million)" FROM table_2737 WHERE "No." = '63'
wikisql
CREATE TABLE Department_Store_Chain ( dept_store_chain_id INTEGER, dept_store_chain_name VARCHAR(80) ) CREATE TABLE Supplier_Addresses ( supplier_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INT...
Return the names and ids of customers who have TN in their address. Show bar chart.
SELECT customer_name, customer_id FROM Customers WHERE customer_address LIKE "%TN%"
nvbench
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
Count Accepted Questions by Year - Title.
SELECT COUNT(P.Id) AS Accepted, YEAR(P.CreationDate) AS Year_Data FROM Posts AS P WHERE P.Title LIKE '%mockito%' AND P.AcceptedAnswerId > 0 AND ((P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%robolectric%') OR (P...
sede
CREATE TABLE table_25210 ( "District name" text, "Dist. ID" real, "ISD" text, "County" text, "Authorizing agency" text, "Date opened" text, "Services" text )
If the district name is the Academy of Flint, what is the authorizing agency?
SELECT "Authorizing agency" FROM table_25210 WHERE "District name" = 'Academy of Flint'
wikisql
CREATE TABLE table_54134 ( "Player" text, "Rec." real, "Yards" real, "Avg." real, "TD's" real, "Long" real )
How many yards were averaged by the player that had a higher than 13 average with less than 18 long?
SELECT AVG("Yards") FROM table_54134 WHERE "Long" < '18' AND "Avg." > '13'
wikisql
CREATE TABLE table_45875 ( "Region" text, "Host" text, "Venue" text, "City" text, "State" text )
Which state includes the city of Storrs?
SELECT "State" FROM table_45875 WHERE "City" = 'storrs'
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 )
Return the number of the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones, and I want to rank by the Date_of_Birth in asc.
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" ORDER BY Date_of_Birth
nvbench
CREATE TABLE table_79746 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
What scored is recorded on April 24?
SELECT "Score" FROM table_79746 WHERE "Date" = 'april 24'
wikisql
CREATE TABLE publication ( Publication_Date VARCHAR, Price VARCHAR )
What are the dates of publications in descending order of price?
SELECT Publication_Date FROM publication ORDER BY Price DESC
sql_create_context
CREATE TABLE table_67550 ( "Season" real, "Series" text, "Races" text, "Wins" text, "Position" text )
Which position has 2 wins in 1992?
SELECT "Position" FROM table_67550 WHERE "Wins" = '2' AND "Season" = '1992'
wikisql
CREATE TABLE table_1854728_2 ( directed_by VARCHAR, production_code VARCHAR )
When 1008/1009 is the production code how many directors are there?
SELECT COUNT(directed_by) FROM table_1854728_2 WHERE production_code = "1008/1009"
sql_create_context
CREATE TABLE table_name_83 ( wrestlers VARCHAR, days_held VARCHAR )
Name the wrestlers with days held of 428
SELECT wrestlers FROM table_name_83 WHERE days_held = "428"
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, ...
count the number of patients whose ethnicity is american indian/alaska native and drug type is base?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_29970 ( "No." real, "Player" text, "Club" text, "Test career" text, "Tests" real, "Catches" real, "Stumpings" real, "Total dismissals" real )
The player for what club had 2 tests?
SELECT "Club" FROM table_29970 WHERE "Tests" = '2'
wikisql
CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, account_name VARCHAR(50), other_account_details VARCHAR(255) ) CREATE TABLE Financial_Transactions ( transaction_id INTEGER, previous_transaction_id INTEGER, account_id INTEGER, card_id INTEGER, transaction_type VARCHA...
What are the different card types, and how many transactions have been made with each Visualize by bar chart, sort Y-axis in asc order please.
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code ORDER BY COUNT(*)
nvbench
CREATE TABLE table_1341604_26 ( result VARCHAR, incumbent VARCHAR )
What was the result of the election featuring ike skelton?
SELECT result FROM table_1341604_26 WHERE incumbent = "Ike Skelton"
sql_create_context
CREATE TABLE table_39658 ( "Date" text, "Opponent" text, "Result" text, "Score" text, "Record" text, "Streak" text )
What was the result when the record was 62 12?
SELECT "Result" FROM table_39658 WHERE "Record" = '62–12'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, ...
when they came to the hospital first time, has patient 9038 had a sm bowel endoscopy nec procedure?
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'sm bowel endoscopy nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9038 AND NOT admissions....
mimic_iii
CREATE TABLE table_16814 ( "model" text, "max. motive power" text, "max. torque at rpm" text, "engine displacement" text, "engine type" text, "engine configuration & notes 0-100km/h" text )
What is the engine configuration $notes 0-100km/h for the engine type b5244 t2?
SELECT "engine configuration & notes 0-100km/h" FROM table_16814 WHERE "engine type" = 'B5244 T2'
wikisql
CREATE TABLE table_45880 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/junior/club team (league)" text )
What nationality is the pick from round 7?
SELECT "Nationality" FROM table_45880 WHERE "Round" = '7'
wikisql
CREATE TABLE table_58232 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
at kardinia park, what was the away team's score?
SELECT "Away team score" FROM table_58232 WHERE "Venue" = 'kardinia park'
wikisql
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, win...
count services by services, and split by local authorities with a stacked bar chart, and order Y-axis from low to high order.
SELECT local_authority, COUNT(local_authority) FROM station GROUP BY services, local_authority ORDER BY COUNT(local_authority)
nvbench
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, ...
give me the number of patients whose gender is m and drug name is trazodone hcl?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.drug = "traZODONE HCl"
mimicsql_data
CREATE TABLE table_name_53 ( croatia VARCHAR, friendly VARCHAR )
Which Croatia has a Friendly of world cup 2006 qualifier, and a 149 of 152?
SELECT croatia FROM table_name_53 WHERE friendly = "world cup 2006 qualifier" AND 149 = 152
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
Find out the long title of the procedure for the patient Stephanie Suchan.
SELECT procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Stephanie Suchan"
mimicsql_data
CREATE TABLE table_28178595_2 ( platform VARCHAR, mystic_arte VARCHAR )
How many platforms have celsius calibur as mystic arte?
SELECT COUNT(platform) FROM table_28178595_2 WHERE mystic_arte = "Celsius Calibur"
sql_create_context
CREATE TABLE city ( city_id SMALLINT UNSIGNED, city VARCHAR(50), country_id SMALLINT UNSIGNED, last_update TIMESTAMP ) CREATE TABLE address ( address_id SMALLINT UNSIGNED, address VARCHAR(50), address2 VARCHAR(50), district VARCHAR(20), city_id SMALLINT UNSIGNED, postal_code VAR...
What are the number of the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?, and could you display by the X from high to low?
SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' GROUP BY payment_date ORDER BY payment_date DESC
nvbench
CREATE TABLE table_22917458_15 ( mountains_classification_klasyfikacja_górska VARCHAR, winner VARCHAR )
Who was the mountain classification winner in the stage won by Alessandro Ballan?
SELECT mountains_classification_klasyfikacja_górska FROM table_22917458_15 WHERE winner = "Alessandro Ballan"
sql_create_context
CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE activity ( actid number, activity_name text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE...
For each faculty rank, show the number of faculty members who have it.
SELECT rank, COUNT(*) FROM faculty GROUP BY rank
spider
CREATE TABLE table_27171 ( "Player" text, "Minutes" real, "Field Goals" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real )
What is the maximum number of minutes associated with exactly 70 field goals?
SELECT MAX("Minutes") FROM table_27171 WHERE "Field Goals" = '70'
wikisql
CREATE TABLE table_31218 ( "Position" text, "Name" text, "Jockey" text, "Age" real, "Weight (st, lb)" text, "Starting price" text, "Distance" text )
What horse had a starting price of 66/1?
SELECT "Name" FROM table_31218 WHERE "Starting price" = '66/1'
wikisql
CREATE TABLE table_203_687 ( id number, "#" number, "title" text, "time" text, "performer(s)" text, "songwriters" text, "producer(s)" text, "samples and notes" text )
what number of titles have talib kweli greene as a sole songwriter ?
SELECT COUNT("title") FROM table_203_687 WHERE "songwriters" = 'talib kweli greene' AND "songwriters" = 1
squall
CREATE TABLE table_28706 ( "Rank" real, "Athlete" text, "Country" text, "Distance (metres)" text, "Points" text, "Adjusted Points" real )
What is the highest rank where the distance is 52.73?
SELECT MAX("Rank") FROM table_28706 WHERE "Distance (metres)" = '52.73'
wikisql
CREATE TABLE table_2576 ( "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 )
What episode number in the series was 'igo nuclear'?
SELECT "No. in season" FROM table_2576 WHERE "Title" = 'iGo Nuclear'
wikisql
CREATE TABLE table_name_5 ( ethernet_ports VARCHAR, name VARCHAR )
What is the ethernet ports of the m1500 appliance?
SELECT ethernet_ports FROM table_name_5 WHERE name = "m1500"
sql_create_context
CREATE TABLE table_65296 ( "Rank" real, "Lane" real, "Athlete" text, "Nationality" text, "Time" real, "React" real )
What is the highest rank for the react of 0.198, and the time more than 20.42?
SELECT MAX("Rank") FROM table_65296 WHERE "React" = '0.198' AND "Time" > '20.42'
wikisql
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Subjects ( subj...
Draw a bar chart about the distribution of personal_name and author_id .
SELECT personal_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
CREATE TABLE table_9775 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
Which result has a Location of canada, and a Record of 3-3?
SELECT "Res." FROM table_9775 WHERE "Location" = 'canada' AND "Record" = '3-3'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardi...
during the previous year, what were the top five most frequent specimen tests given to a patient during the same hospital visit after the diagnosis of unilat inguinal hernia?
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnos...
mimic_iii
CREATE TABLE table_22355_26 ( gold INTEGER )
What is the maximum number of golds?
SELECT MAX(gold) FROM table_22355_26
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( unique...
what are the top five most frequent lab tests that followed within 2 months for the patient who received normal saline administration - moderate volume resuscitation (150-250 mls/hr) in the last year?
SELECT t3.labname FROM (SELECT t2.labname, 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 = 'normal saline administration - moderate volume resus...
eicu
CREATE TABLE table_name_25 ( pick__number INTEGER, overall VARCHAR, round VARCHAR )
Which Pick # is the highest one that has an Overall of 184, and a Round larger than 6?
SELECT MAX(pick__number) FROM table_name_25 WHERE overall = 184 AND round > 6
sql_create_context
CREATE TABLE table_203_815 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text )
how many players selected in round nine were guards ?
SELECT COUNT("player") FROM table_203_815 WHERE "position" = 'guard'
squall
CREATE TABLE table_78337 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text, "Apparent magnitude" real )
What is the total of Apparent magnitudes for an NGC number larger than 3293?
SELECT SUM("Apparent magnitude") FROM table_78337 WHERE "NGC number" > '3293'
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_DIRE_CD text, MED_DIRE_NM text,...
领导有没有说在06年2月11日到2009年8月18日内医疗机构7494699统筹金额的消耗量是多少?
SELECT SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '7494699' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-02-11' AND '2009-08-18'
css
CREATE TABLE table_train_140 ( "id" int, "gender" string, "mini_mental_state_examination_mmse" int, "allergy_to_quinidine" bool, "systolic_blood_pressure_sbp" int, "postural_syncope" bool, "hypotension" bool, "unexplained_syncope" bool, "allergy_to_dextromethorphan" bool, "allerg...
hypotension ( systolic bp < 100 mm hg ) ; postural syncope; unexplained syncope
SELECT * FROM table_train_140 WHERE hypotension = 1 OR systolic_blood_pressure_sbp < 100 OR postural_syncope = 1 OR unexplained_syncope = 1
criteria2sql
CREATE TABLE table_13415 ( "Round" real, "Date" text, "Home" text, "Result" text, "Visitor" text, "Venue" text, "Attendance" real )
Which Attendance has a Home of djurg rdens if, and a Round of 53?
SELECT MAX("Attendance") FROM table_13415 WHERE "Home" = 'djurgårdens if' AND "Round" = '53'
wikisql
CREATE TABLE table_name_51 ( years VARCHAR, playoffs VARCHAR )
what is the years when playoffs is 115?
SELECT years FROM table_name_51 WHERE playoffs = 115
sql_create_context
CREATE TABLE table_name_29 ( against INTEGER, date VARCHAR )
What is the highest Against, when Date is '27/02/2005'?
SELECT MAX(against) FROM table_name_29 WHERE date = "27/02/2005"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0...
For those employees who did not have any job in the past, show me about the change of salary over hire_date in a line chart, and order X from high to low order please.
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE table_name_42 ( set_2 VARCHAR, total VARCHAR )
What is the Set 2 with a Total with 45 12?
SELECT set_2 FROM table_name_42 WHERE total = "45–12"
sql_create_context
CREATE TABLE table_4738 ( "Year" real, "BB Hot" text, "BB CW" text, "BB AC" text, "CB CW" text )
What is the most current year that had a BB CW of 78?
SELECT MAX("Year") FROM table_4738 WHERE "BB CW" = '78'
wikisql
CREATE TABLE department ( departmentid number, name text, head number ) CREATE TABLE block ( blockfloor number, blockcode number ) CREATE TABLE undergoes ( patient number, procedures number, stay number, dateundergoes time, physician number, assistingnurse number ) CREATE ...
What are the name and primarily affiliated department name of each physician?
SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.employeeid = T2.physician JOIN department AS T3 ON T2.department = T3.departmentid WHERE T2.primaryaffiliation = 1
spider
CREATE TABLE table_59118 ( "Club" text, "City" text, "Stadium" text, "Capacity" real, "2007\u201308 season" text )
What 2007-08 had A.S. Gubbio 1910 Club?
SELECT "2007\u201308 season" FROM table_59118 WHERE "Club" = 'a.s. gubbio 1910'
wikisql
CREATE TABLE table_46363 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many Silver medals did the Nation of Croatia receive with a Total medal of more than 1?
SELECT MIN("Silver") FROM table_46363 WHERE "Bronze" = '1' AND "Total" > '1' AND "Nation" = 'croatia'
wikisql
CREATE TABLE table_45486 ( "Name" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real )
What is the highest loss with a long more than 61?
SELECT MAX("Loss") FROM table_45486 WHERE "Long" > '61'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title 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...
let me know the number of patients who are married.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED"
mimicsql_data
CREATE TABLE table_78307 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Where did fitzroy play as the home team?
SELECT "Venue" FROM table_78307 WHERE "Home team" = 'fitzroy'
wikisql
CREATE TABLE table_77456 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text )
Which Date has a Road Team of new york, and a Result of 79-75?
SELECT "Date" FROM table_77456 WHERE "Road Team" = 'new york' AND "Result" = '79-75'
wikisql
CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARCHAR(120), line_3 VARCHAR(120), city VARCHAR(80), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50), other_address_details VARCHAR(255) ) CREATE TABLE Ref_Detention_Type ( ...
Find date_address_from and the amount of date_address_from bin date_address_from by time, and visualize them by a bar chart.
SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_25890 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
When marcus camby (15) has the highest amount of rebounds who has the highest amount of assists?
SELECT "High assists" FROM table_25890 WHERE "High rebounds" = 'Marcus Camby (15)'
wikisql
CREATE TABLE table_21060 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter" text, "Year named" real, "Namesake" text )
What is the namesake of the feature found at 189.5w longitude?
SELECT "Namesake" FROM table_21060 WHERE "Longitude" = '189.5W'
wikisql
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, ...
列出医院4999678开出的检验报告单中,不同检测指标名称以及不同检测指标结果定量单位下,在2002-01-01到2002-12-07内检测指标结果定量的是什么平均值?
SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '4999678' AND BGRQ BETWEEN '2002-01-01' AND '2002-12-07' GROUP BY JCZBMC, JCZBJGDW
css
CREATE TABLE table_name_12 ( crowd INTEGER, venue VARCHAR )
How many people attended games at vfl park?
SELECT SUM(crowd) FROM table_name_12 WHERE venue = "vfl park"
sql_create_context
CREATE TABLE table_10650711_1 ( nfl_team VARCHAR, player VARCHAR )
what's the nfl team where player is clifford charlton
SELECT nfl_team FROM table_10650711_1 WHERE player = "Clifford Charlton"
sql_create_context
CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway_manage ( Railway_ID int, Manager_ID int, From_Year text ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, ...
A bar chart for showing the number of the countries that have managers of age above 50 or below 46, and list in descending by the Y.
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY COUNT(Country) DESC
nvbench
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE...
A bar chart for finding the number of the names of swimmers who has a result of 'win'.
SELECT name, COUNT(name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID WHERE Result = 'Win' GROUP BY name
nvbench
CREATE TABLE table_65814 ( "Position" text, "Gymnast" text, "A Score" real, "B Score" real, "Total" real )
what is the score for the 5th position and a score less than 7
SELECT MIN("B Score") FROM table_65814 WHERE "Position" = '5th' AND "A Score" < '7'
wikisql
CREATE TABLE table_27463 ( "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 )
What is the 3 June time for the rider with 2 June time of 17' 45.11 127.525mph?
SELECT "Thurs 3 June" FROM table_27463 WHERE "Wed 2 June" = '17'' 45.11 127.525mph'
wikisql
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id...
Monthly Total Questions by Tag.
SELECT DATEADD(m, DATEDIFF(m, 0, CreationDate), 0) AS Month, Tags.TagName AS Tag, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName = '##tagname##' AND PostTypes.Name = 'Q...
sede
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 tex...
until 2104, what are the top three most frequent medications prescribed within 2 months to the coronary artery disease female patients aged 20s after they have been diagnosed with coronary artery disease?
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 = 'coronary artery disease' AND STRFTIME('%y', diagno...
eicu
CREATE TABLE table_68113 ( "Name" text, "Years" text, "Gender" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
What is the area of Cromwell Primary school, which has a state authority?
SELECT "Area" FROM table_68113 WHERE "Authority" = 'state' AND "Name" = 'cromwell primary school'
wikisql
CREATE TABLE table_73528 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
How many different players did the most high assists on the March 4 game?
SELECT COUNT("High assists") FROM table_73528 WHERE "Date" = 'March 4'
wikisql
CREATE TABLE table_22452 ( "Candidate" text, "Background" text, "Original Team" text, "Age" real, "Hometown" text, "Result" text )
When columbia, south carolina is the hometown what is the lowest age?
SELECT MIN("Age") FROM table_22452 WHERE "Hometown" = 'Columbia, South Carolina'
wikisql
CREATE TABLE table_name_37 ( runner_s__up VARCHAR, margin_of_victory VARCHAR )
Name the runner-up for margin of victory of 3 strokes
SELECT runner_s__up FROM table_name_37 WHERE margin_of_victory = "3 strokes"
sql_create_context
CREATE TABLE table_16321 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What's the pick number of the player whose position is CB?
SELECT "Pick #" FROM table_16321 WHERE "Position" = 'CB'
wikisql
CREATE TABLE table_55901 ( "Tournament" text, "Winner" text, "Runner-up" text, "Score" text, "Third Place" text )
Which tournament did Thomas Enqvist win?
SELECT "Tournament" FROM table_55901 WHERE "Winner" = 'thomas enqvist'
wikisql