context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE Suppliers ( supplier_id INTEGER, supplier_name VARCHAR(80), supplier_phone VARCHAR(80) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Products ( product_id INTEGER, product_type_code VARC...
Bar graph to show mean product price from different product type code, and rank x axis in asc order.
SELECT product_type_code, AVG(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code
nvbench
CREATE TABLE table_204_88 ( id number, "year" number, "english title" text, "japanese" text, "romanization" text, "type" text )
which title is listed next after the way to fight ?
SELECT "english title" FROM table_204_88 WHERE id = (SELECT id FROM table_204_88 WHERE "english title" = 'the way to fight') + 1
squall
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, ...
Bring the number of patients with elective hospital admission who had a joint fluid lab test.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_60478 ( "Edition" text, "Round" text, "Date" text, "Surface" text, "Opponent" text, "Result" text )
What's the result for the clay surface edition on july 17, 1992?
SELECT "Result" FROM table_60478 WHERE "Surface" = 'clay' AND "Date" = 'july 17, 1992'
wikisql
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 drug type of drug name colchicine?
SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Colchicine"
mimicsql_data
CREATE TABLE table_17175 ( "Name of ground" text, "Location" text, "Year" text, "FC matches" real, "LA matches" real, "T20 matches" real, "Total" real )
What is the minimum of t20 matches?
SELECT MIN("T20 matches") FROM table_17175
wikisql
CREATE TABLE table_name_41 ( series VARCHAR, date VARCHAR )
What is the series record for the game on April 24?
SELECT series FROM table_name_41 WHERE date = "april 24"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
把患者37690817在6843197住院结束出院的时候科室名字里带有换药的住院记录列一下
SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb...
css
CREATE TABLE table_name_75 ( games INTEGER, team VARCHAR, points VARCHAR )
What are the Highest Games, when Team is Ciudad De La Laguna, and when Points are greater than 357?
SELECT MAX(games) FROM table_name_75 WHERE team = "ciudad de la laguna" AND points > 357
sql_create_context
CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), ...
A bar chart about how many different locations does each school have?, and sort from high to low by the Y-axis.
SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_ADDRESS) FROM DEPARTMENT ORDER BY COUNT(DISTINCT DEPT_ADDRESS) DESC
nvbench
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE party_events ( Event_ID int, Event_Name text, Party_ID int, Member_in_charge_ID int ) CREATE TABLE member ( Member_ID int, Member_Name tex...
How many parties of the time they leave office, binning the leave office into WEEKDAY interval
SELECT Left_office, COUNT(Left_office) FROM party
nvbench
CREATE TABLE patient ( ssn number, name text, address text, phone text, insuranceid number, pcp number ) CREATE TABLE nurse ( employeeid number, name text, position text, registered boolean, ssn number ) CREATE TABLE on_call ( nurse number, blockfloor number, bl...
Compute the mean price of procedures physician John Wen was trained in.
SELECT AVG(T3.cost) FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen"
spider
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id num...
Top 10 Users From India.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE Reputation >= 20 AND (LOWER(Location) LIKE '%INDIA%' OR LOWER(Location) LIKE '%india%') ORDER BY Reputation LIMIT 100
sede
CREATE TABLE table_name_66 ( icao VARCHAR, airport VARCHAR )
What is the ICAO for luqa airport?
SELECT icao FROM table_name_66 WHERE airport = "luqa airport"
sql_create_context
CREATE TABLE table_5131 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
In what Tournament was laura Gildemeister the Opponent?
SELECT "Tournament" FROM table_5131 WHERE "Opponent" = 'laura gildemeister'
wikisql
CREATE TABLE table_48388 ( "Player" text, "Attempts" real, "Yards" real, "Avg Yards" real, "Long" real, "Touchdowns" real )
What is the lowest Touchdowns, when Player is Andrew Glover, and when Yards is greater than 281?
SELECT MIN("Touchdowns") FROM table_48388 WHERE "Player" = 'andrew glover' AND "Yards" > '281'
wikisql
CREATE TABLE table_17311759_6 ( team VARCHAR, date VARCHAR )
Who was the team played on January 23?
SELECT team FROM table_17311759_6 WHERE date = "January 23"
sql_create_context
CREATE TABLE table_1160304_2 ( date_of_entry VARCHAR, chart VARCHAR )
What is the date of entry for the UK Albums Top 75 chart?
SELECT date_of_entry FROM table_1160304_2 WHERE chart = "UK Albums Top 75"
sql_create_context
CREATE TABLE table_name_59 ( record VARCHAR, round VARCHAR, event VARCHAR )
What was his record at the AFC: Brazil 1 event that went 3 rounds?
SELECT record FROM table_name_59 WHERE round = "3" AND event = "afc: brazil 1"
sql_create_context
CREATE TABLE table_47053 ( "Year" real, "Music video" text, "Length" text, "Album" text, "Official MV on YouTube" text )
What was the music video that was from the album High Society, with a length of 3:50?
SELECT "Music video" FROM table_47053 WHERE "Album" = 'high society' AND "Length" = '3:50'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, hig...
show DL from BOSTON to 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, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name =...
atis
CREATE TABLE table_dev_45 ( "id" int, "tc" int, "systolic_blood_pressure_sbp" int, "parenteral_antibiotic_therapy" bool, "fasting_plasma_glucose_fpg" float, "active_infection" bool, "untreated_hyperlipidemia" bool, "hemoglobin_a1c_hba1c" float, "temperature" float, "diastolic_blo...
fasting plasma glucose ( fpg ) 80 , 140 mg / dl and glycated hemoglobin ( a1c ) > 6.5 % and < or = 10 % .
SELECT * FROM table_dev_45 WHERE fasting_plasma_glucose_fpg >= 80 AND fasting_plasma_glucose_fpg <= 140 AND (hemoglobin_a1c_hba1c > 6.5 AND hemoglobin_a1c_hba1c <= 10)
criteria2sql
CREATE TABLE table_name_74 ( set_2 VARCHAR, set_4 VARCHAR )
What set 2 has a set 4 of 21-25?
SELECT set_2 FROM table_name_74 WHERE set_4 = "21-25"
sql_create_context
CREATE TABLE table_204_694 ( id number, "year" text, "name" text, "date" text, "stages" number, "distance" text, "winner" text, "time" text )
how many marlboro tours did carlo guieb win ?
SELECT COUNT(*) FROM table_204_694 WHERE "winner" = 'carlo guieb'
squall
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
在一三年一月八日到二一年四月二十七日之内27285110患者以前在医院就诊过几回?
SELECT (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND p...
css
CREATE TABLE table_17836 ( "Colt model no." text, "Name" text, "Stock" text, "Fire control" text, "Rear sight" text, "Forward assist" text, "Barrel length" text, "Barrel profile" text, "Barrel twist" text, "Hand guards" text, "Bayonet Lug" text, "Muzzle device" text )
What hand guard system is used with a gas piston commando?
SELECT "Hand guards" FROM table_17836 WHERE "Name" = 'Gas Piston Commando'
wikisql
CREATE TABLE table_35927 ( "Game #" real, "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Points" real )
What date does visitor team Toronto score less than 49 points and has record of 18-17-7?
SELECT "Date" FROM table_35927 WHERE "Visitor" = 'toronto' AND "Points" < '49' AND "Record" = '18-17-7'
wikisql
CREATE TABLE Documents_to_be_Destroyed ( Document_ID INTEGER, Destruction_Authorised_by_Employee_ID INTEGER, Destroyed_by_Employee_ID INTEGER, Planned_Destruction_Date DATETIME, Actual_Destruction_Date DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15...
Bar chart x axis role code y axis the total number, order X-axis from low to high order please.
SELECT Role_Code, COUNT(*) FROM Employees GROUP BY Role_Code ORDER BY Role_Code
nvbench
CREATE TABLE table_77394 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real )
What was the score at Tiger Stadium on October 12?
SELECT "Score" FROM table_77394 WHERE "Location" = 'tiger stadium' AND "Date" = 'october 12'
wikisql
CREATE TABLE table_7798 ( "Company Name" text, "Product Name" text, "Hardware Model" text, "Accreditation type" text, "Accreditation level" text, "Accreditation status" text )
What is the Company Name, when the Accreditation Level is Joyn Hot Fixes, and when the Accreditation Status is Approved (Awarded 17.05.13)?
SELECT "Company Name" FROM table_7798 WHERE "Accreditation level" = 'joyn hot fixes' AND "Accreditation status" = 'approved (awarded 17.05.13)'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
编号为77376909189与18476130843的检验报告单中名称相同的检测指标有没有?列出来这些检测指标名称都是什么?
SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.BGDH = '77376909189' INTERSECT SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.BGDH = '18476130843'
css
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...
what is subject name and date of birth of subject id 29541?
SELECT demographic.name, demographic.dob FROM demographic WHERE demographic.subject_id = "29541"
mimicsql_data
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, a bar chart shows the distribution of name and code , and group by attribute headquarter, I want to order in descending by the Code.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Code DESC
nvbench
CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rati...
where can i eat some good arabic food in mountain view ?
SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, ...
has patient 80858 made to an admission until 2104?
SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 80858 AND STRFTIME('%y', admissions.admittime) <= '2104'
mimic_iii
CREATE TABLE member ( member_id number, member_name text, party_id text, in_office text ) CREATE TABLE party ( party_id number, minister text, took_office text, left_office text, region_id number, party_name text ) CREATE TABLE region ( region_id number, region_name tex...
Return the names of parties that have two or more events.
SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2
spider
CREATE TABLE table_name_14 ( location VARCHAR, date VARCHAR )
What is the location of the race on 11 November?
SELECT location FROM table_name_14 WHERE date = "11 november"
sql_create_context
CREATE TABLE table_name_71 ( l2_cache VARCHAR, release_date VARCHAR )
What L2 cache had a release date of august 26, 2007?
SELECT l2_cache FROM table_name_71 WHERE release_date = "august 26, 2007"
sql_create_context
CREATE TABLE table_name_80 ( position VARCHAR, date_of_birth__age_ VARCHAR )
Name the position for the player born 2 november 1987
SELECT position FROM table_name_80 WHERE date_of_birth__age_ = "2 november 1987"
sql_create_context
CREATE TABLE table_73943 ( "School" text, "Location" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Nickname" text )
What is the maximum enrollment of the schools?
SELECT MAX("Enrollment") FROM table_73943
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...
那些已经被门诊诊断为维生素B缺乏病的病患们的检测指标514736的平均数值以及最值都是多少?
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDSM = '维生素B缺乏病' AND jyjgzbb.JCZBDM = '...
css
CREATE TABLE table_name_85 ( round VARCHAR, overall VARCHAR )
What is the Round when there is an overall of 246?
SELECT round FROM table_name_85 WHERE overall = 246
sql_create_context
CREATE TABLE table_64573 ( "County" text, "Location" text, "Distance" real, "Total" real, "Notes" text )
Which Notes have a Distance larger than 7, and a Location of aplin?
SELECT "Notes" FROM table_64573 WHERE "Distance" > '7' AND "Location" = 'aplin'
wikisql
CREATE TABLE table_name_16 ( gold VARCHAR, rank VARCHAR, silver VARCHAR )
What is the total number of gold medals of the ranked 2nd nation, which has less than 2 silvers?
SELECT COUNT(gold) FROM table_name_16 WHERE rank = "2" AND silver < 2
sql_create_context
CREATE TABLE table_name_19 ( silver VARCHAR, total INTEGER )
What is the total number of Silver with a Total that is smaller than 1?
SELECT COUNT(silver) FROM table_name_19 WHERE total < 1
sql_create_context
CREATE TABLE table_name_97 ( mayor VARCHAR, party VARCHAR )
What Mayor is from the KRF Party?
SELECT mayor FROM table_name_97 WHERE party = "krf"
sql_create_context
CREATE TABLE table_name_3 ( date VARCHAR, attendance VARCHAR, opponent VARCHAR )
What date was the game against inverurie loco works when more than 342 attend?
SELECT date FROM table_name_3 WHERE attendance > 342 AND opponent = "inverurie loco works"
sql_create_context
CREATE TABLE Agreements ( Document_ID INTEGER, Event_ID INTEGER ) CREATE TABLE Events ( Event_ID INTEGER, Address_ID INTEGER, Channel_ID INTEGER, Event_Type_Code CHAR(15), Finance_ID INTEGER, Location_ID INTEGER ) CREATE TABLE Parties ( Party_ID INTEGER, Party_Details VARCHAR(2...
What is the total number of names of products?, display in descending by the X.
SELECT Product_Name, COUNT(Product_Name) FROM Products GROUP BY Product_Name ORDER BY Product_Name DESC
nvbench
CREATE TABLE table_20283 ( "Name" text, "Overs Bowled" text, "Maidens" real, "Runs Conceded" real, "Wickets" real, "Extras" real, "E.R." text )
What is the lowest number of wickets for farveez maharoof?
SELECT MIN("Wickets") FROM table_20283 WHERE "Name" = 'Farveez Maharoof'
wikisql
CREATE TABLE table_15549 ( "Ensemble" text, "Gold Medals" real, "Silver Medals" real, "Bronze Medals" real, "Total Medals" real )
Name the average gold medals when the bronze medals was less than 1, silver medals being 0 and total medals more than 1
SELECT AVG("Gold Medals") FROM table_15549 WHERE "Bronze Medals" < '1' AND "Silver Medals" = '0' AND "Total Medals" > '1'
wikisql
CREATE TABLE table_2562572_20 ( population__2011_ VARCHAR, cyrillic_name_other_names VARCHAR )
Name the number of population for
SELECT COUNT(population__2011_) FROM table_2562572_20 WHERE cyrillic_name_other_names = "Врбас"
sql_create_context
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is the number of patients whose primary disease is morbid obesity/sda and year of death is less than or equal to 2148?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2148.0"
mimicsql_data
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 demographic ( subject_id text, hadm_id t...
what number of married patients suffered from other convulsions?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.long_title = "Other convulsions"
mimicsql_data
CREATE TABLE table_12162 ( "Rank" real, "Result" real, "Athlete" text, "Date" text, "Location" text )
What is the smallest Result with a Location of birmingham, and Rank larger than 5?
SELECT MIN("Result") FROM table_12162 WHERE "Location" = 'birmingham' AND "Rank" > '5'
wikisql
CREATE TABLE table_1044 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
Name the least points for patrick
SELECT MIN("Points") FROM table_1044 WHERE "Player" = 'Patrick'
wikisql
CREATE TABLE train_station ( Train_ID int, Station_ID int ) CREATE TABLE train ( Train_ID int, Name text, Time text, Service text ) CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, ...
Bar chart x axis location y axis the average of number of platforms, and show x axis from high to low order.
SELECT Location, AVG(Number_of_Platforms) FROM station GROUP BY Location ORDER BY Location DESC
nvbench
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...
在2009年4月21日到2020年7月12日内,医疗机构3984777哪12个科室消耗统筹金额最多
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.MED_ORG_DEPT_NM 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.MED_SER_ORG_NO = '3984777' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2009-04-21' AND '2020-07-12' GROUP...
css
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 real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
Draw a bar chart of name versus height, could you sort by the bar in desc?
SELECT Name, Height FROM people ORDER BY Name DESC
nvbench
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
i would like to fly from BOSTON to ATLANTA
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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA...
atis
CREATE TABLE table_name_47 ( loera VARCHAR, source VARCHAR, date VARCHAR )
Which Loera has a Source of surveyusa, and a Date of may 16 may 18, 2008?
SELECT loera FROM table_name_47 WHERE source = "surveyusa" AND date = "may 16–may 18, 2008"
sql_create_context
CREATE TABLE table_70547 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "GameCenter" text, "TV Time" text, "Attendance" text )
Name the gamecenter that has attendance of 65,212
SELECT "GameCenter" FROM table_70547 WHERE "Attendance" = '65,212'
wikisql
CREATE TABLE table_63522 ( "Club" text, "League" text, "Sport" text, "Venue" text, "Established" real, "Capacity" real )
What is the venue established after 1948?
SELECT "Venue" FROM table_63522 WHERE "Established" > '1948'
wikisql
CREATE TABLE table_name_70 ( official_name VARCHAR, census_ranking VARCHAR )
What is Official Name, when Census Ranking is 769 of 5,008?
SELECT official_name FROM table_name_70 WHERE census_ranking = "769 of 5,008"
sql_create_context
CREATE TABLE Assessment_Notes ( notes_id INTEGER, student_id INTEGER, teacher_id INTEGER, date_of_notes DATETIME, text_of_notes VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Behavior_Incident ( incident_id INTEGER, incident_type_code VARCHAR(10), student_id INTEGER, da...
Visualize the relationship between address_id and monthly_rental , and group by attribute other_details.
SELECT address_id, monthly_rental FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_name_5 ( bluetooth VARCHAR, wifi VARCHAR, launch_year VARCHAR, rom___mib__ VARCHAR )
What was the status of Bluetooth for the model that launched after 2004 with a ROM (MiB) of 128 and a Wifi of 802.11b?
SELECT bluetooth FROM table_name_5 WHERE launch_year > 2004 AND rom___mib__ = 128 AND wifi = "802.11b"
sql_create_context
CREATE TABLE table_69340 ( "Game" real, "Date" text, "Location" text, "Time" text, "Attendance" real )
What is the attendance amount of the race with a time of 2:07?
SELECT MAX("Attendance") FROM table_69340 WHERE "Time" = '2:07'
wikisql
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location ...
please list ground transport in SAN FRANCISCO
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'SAN FRANCISCO' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_79592 ( "Location" text, "Name of mill" text, "Type" text, "Built" real, "Notes" text )
What is the Name of the Grondzeiler Mill?
SELECT "Name of mill" FROM table_79592 WHERE "Type" = 'grondzeiler'
wikisql
CREATE TABLE table_21072 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" text, "Year named" real, "Name origin" text )
What is the name origin of Nike Fossae?
SELECT "Name origin" FROM table_21072 WHERE "Name" = 'Nike Fossae'
wikisql
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
Draw a bar chart showing the total number of every ship type by categorizing by nationality, I want to list by the y-axis in asc.
SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY COUNT(Type)
nvbench
CREATE TABLE table_name_90 ( series VARCHAR, site VARCHAR, date VARCHAR )
Which Series has a Site of ames on september 10, 2005?
SELECT series FROM table_name_90 WHERE site = "ames" AND date = "september 10, 2005"
sql_create_context
CREATE TABLE table_27723526_10 ( high_assists VARCHAR, date VARCHAR )
Who had the high assist total on january 27?
SELECT high_assists FROM table_27723526_10 WHERE date = "January 27"
sql_create_context
CREATE TABLE table_name_4 ( venue VARCHAR, year INTEGER )
What was the venue after 2012?
SELECT venue FROM table_name_4 WHERE year > 2012
sql_create_context
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's the weight difference of patient 006-7325's body second measured on the last hospital visit compared to the value first measured on the last hospital visit?
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-7325' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS NUL...
eicu
CREATE TABLE table_38269 ( "NTFA Div 2" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
Which Against has Losses larger than 2, and Wins of 8, and Byes smaller than 0?
SELECT SUM("Against") FROM table_38269 WHERE "Losses" > '2' AND "Wins" = '8' AND "Byes" < '0'
wikisql
CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE requirement (...
How large is course 533 ?
SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 533
advising
CREATE TABLE table_name_18 ( rider VARCHAR, grid VARCHAR )
Who is the driver of the car that started in grid 14?
SELECT rider FROM table_name_18 WHERE grid = "14"
sql_create_context
CREATE TABLE table_61869 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
What is Club, when Points is '82'?
SELECT "Club" FROM table_61869 WHERE "Points" = '82'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH te...
在医疗机构2064104中的科室2722在02年8月18日到10年5月12日内处理了多少住院就诊的病人?
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '2064104' AND wdmzjzjlb.JZKSDM = '2722' AND wdmzjzjlb.RYDJSJ BETWEEN '2002-08-18' AND '2010-05-12' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '2064104' AND bdmzjzjlb.JZKSDM = '2722' AND bdmzjzjlb.RYDJSJ BETWEEN '2002-08-18' AND '2010-05-12'
css
CREATE TABLE table_39237 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What date has a competition of 2012 afc challenge cup, and dasarath rangasala stadium, kathmandu as the venue?
SELECT "Date" FROM table_39237 WHERE "Competition" = '2012 afc challenge cup' AND "Venue" = 'dasarath rangasala stadium, kathmandu'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the average of code , and group by attribute name, I want to display Y-axis from low to high order.
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code
nvbench
CREATE TABLE table_2668336_24 ( incumbent VARCHAR, candidates VARCHAR )
How many times is the candidates charles f. mercer (f) 100%?
SELECT COUNT(incumbent) FROM table_2668336_24 WHERE candidates = "Charles F. Mercer (F) 100%"
sql_create_context
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 the sum of code , and group by attribute name in a bar chart, rank bar in asc order.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE table_name_30 ( result VARCHAR, scored INTEGER )
What is the result of the contest with over 1 scored?
SELECT result FROM table_name_30 WHERE scored > 1
sql_create_context
CREATE TABLE table_28787871_3 ( original_air_date VARCHAR, production_code VARCHAR )
What was the airdate of the episode of production code 214?
SELECT original_air_date FROM table_28787871_3 WHERE production_code = 214
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varc...
For those employees who was hired before 2002-06-21, give me the comparison about the average of employee_id over the hire_date bin hire_date by time, and show in ascending by the Y.
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(EMPLOYEE_ID)
nvbench
CREATE TABLE table_50287 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
WHAT PLACE WAS A SCORE 67-70=137?
SELECT "Place" FROM table_50287 WHERE "Score" = '67-70=137'
wikisql
CREATE TABLE table_name_57 ( position VARCHAR, player VARCHAR )
What position does Barry Richter play?
SELECT position FROM table_name_57 WHERE player = "barry richter"
sql_create_context
CREATE TABLE table_name_27 ( score_points VARCHAR, event VARCHAR, total VARCHAR )
Name Event of wc milan and a Total of 23?
SELECT score_points FROM table_name_27 WHERE event = "wc milan" AND total = "23"
sql_create_context
CREATE TABLE table_name_1 ( championships VARCHAR, established INTEGER )
Which championship was established after 2005?
SELECT championships FROM table_name_1 WHERE established > 2005
sql_create_context
CREATE TABLE table_name_96 ( chassis VARCHAR, rank VARCHAR )
Which chassis is ranked 24th?
SELECT chassis FROM table_name_96 WHERE rank = "24th"
sql_create_context
CREATE TABLE table_3447 ( "Country" text, "Population in 2011 (In thousands)" real, "GDP (nominal) in 2011 ( USD millions)" real, "GDP (nominal) per capita" real, "GDP (PPP) in 2011 ( USD millions)" real, "GDP (PPP) per capita" real, "Merchandise exports ($ billions), 2011" text, "Mercha...
How many different imports from Mercosur had a % of 18.0?
SELECT COUNT("GDP (nominal) per capita") FROM table_3447 WHERE "Imports from Mercosur (% of each, 2010)" = '18.0'
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...
Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type Show bar chart, and could you rank Affiliation from high to low order?
SELECT Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation ORDER BY Affiliation DESC
nvbench
CREATE TABLE table_8099 ( "Name" text, "Built" text, "Listed" text, "Location" text, "County" text, "Type" text )
When was Moores Creek Bridge built?
SELECT "Built" FROM table_8099 WHERE "Name" = 'moores creek bridge'
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...
Find All_Home and the average of School_ID , and group by attribute All_Home, and visualize them by a bar chart, show in asc by the x-axis please.
SELECT All_Home, AVG(School_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home
nvbench
CREATE TABLE table_4560 ( "Year" real, "Network" text, "Play-by-play" text, "Color commentator(s)" text, "Sideline reporter(s)" text )
Who are the sideline reporter(s) on NBC with al michaels on the play-by-play after 2013?
SELECT "Sideline reporter(s)" FROM table_4560 WHERE "Network" = 'nbc' AND "Play-by-play" = 'al michaels' AND "Year" > '2013'
wikisql
CREATE TABLE table_29247 ( "City" text, "Population" real, "Registered voters" text, "Democratic" text, "Republican" text, "D\u2013R spread" text, "Other" text, "No party preference" text )
What is other when no party preference is 19.1%?
SELECT "Other" FROM table_29247 WHERE "No party preference" = '19.1%'
wikisql
CREATE TABLE table_57759 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What is the 2006 value of the 2009 A value, 2011 A value, and A as the 2007 value?
SELECT "2006" FROM table_57759 WHERE "2009" = 'a' AND "2011" = 'a' AND "2007" = 'a'
wikisql
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId numb...
comments on posts, by post owner first name.
SELECT p.Id AS "post_link", c.Text FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id JOIN Comments AS c ON c.PostId = p.Id WHERE (u.DisplayName LIKE 'Sarah %' OR u.DisplayName = 'Sarah') AND c.Id % 10 = 0
sede
CREATE TABLE table_name_9 ( visitor VARCHAR, leading_scorer VARCHAR )
Who was the visiting team when the leading scorer was Jones : 20?
SELECT visitor FROM table_name_9 WHERE leading_scorer = "jones : 20"
sql_create_context