instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Who is the author of Episode 38 (16)? | CREATE TABLE table_56428 ("Episode #" text,"Title" text,"Directed by" text,"Written by" text,"Original airdate" text) | SELECT "Written by" FROM table_56428 WHERE "Episode #" = '38 (16)' |
having a health coverage | CREATE TABLE table_test_2 ("id" int,"loss_of_consciousness" bool,"gender" string,"bleeding" int,"systolic_blood_pressure_sbp" int,"stroke" bool,"renal_disease" bool,"hemorrhagic_diathesis" bool,"transient_ischemic_attack" bool,"creatinine_clearance_cl" float,"dementia" bool,"glasgow_come_score_gcs" int,"prior_creatinin... | SELECT * FROM table_test_2 WHERE health_coverage = 1 |
How many votes were cast when the notes reported lost to incumbent vic gilliam? | CREATE TABLE table_51554 ("Race" text,"Candidate" text,"Party" text,"Notes" text,"Votes" real) | SELECT "Votes" FROM table_51554 WHERE "Notes" = 'lost to incumbent vic gilliam' |
how many patients on government insurance had atrial cardioversion? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Atrial cardioversion" |
Name the record for april 1 | CREATE TABLE table_21290 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Record" FROM table_21290 WHERE "Date" = 'April 1' |
What CFL team did Darcy Brown play for? | CREATE TABLE table_23569 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "CFL Team" FROM table_23569 WHERE "Player" = 'Darcy Brown' |
If torque is n m (lb ft) @1600 2400 rpm and applications is 2000 w90x sprinter, what is the power? | CREATE TABLE table_24050 ("Displacement" text,"Bore" text,"Stroke" text,"Cylinders" text,"Valves" real,"Power" text,"Torque" text,"Applications" text) | SELECT "Power" FROM table_24050 WHERE "Torque" = 'N·m (lb·ft) @1600–2400 rpm' AND "Applications" = '2000 W90x Sprinter' |
With a House Edge of 3.63% and a Non-Suited Match of 4:1, what is the Double Non-Suited Match? | CREATE TABLE table_name_1 (Double VARCHAR,non_suited_match VARCHAR,house_edge VARCHAR) | SELECT Double AS non_suited_match FROM table_name_1 WHERE non_suited_match = "4:1" AND house_edge = "3.63%" |
Which institution does 'Katsuhiro Ueno' belong to? | CREATE TABLE authors (authid number,lname text,fname text)CREATE TABLE inst (instid number,name text,country text)CREATE TABLE papers (paperid number,title text)CREATE TABLE authorship (authid number,instid number,paperid number,authorder number) | SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Katsuhiro" AND t1.lname = "Ueno" |
What season was the episode titled 'Harlequin' in? | CREATE TABLE table_20860 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text) | SELECT MAX("Season #") FROM table_20860 WHERE "Title" = 'Harlequin' |
Name the motogp winner for 6 may | CREATE TABLE table_27948565_1 (motogp_winner VARCHAR,date VARCHAR) | SELECT motogp_winner FROM table_27948565_1 WHERE date = "6 May" |
At Position of guard, from the School/Club Team Notre Dame, how many Years for Jazz did that person play? | CREATE TABLE table_name_43 (years_for_jazz VARCHAR,position VARCHAR,school_club_team VARCHAR) | SELECT years_for_jazz FROM table_name_43 WHERE position = "guard" AND school_club_team = "notre dame" |
Who has the lowest league total goals with 0 FA cup goals and no FA cup appearances, plays the DF position and has appeared in total of 3 times? | CREATE TABLE table_name_84 (league_goals INTEGER,total_apps VARCHAR,position VARCHAR,fa_cup_goals VARCHAR,fa_cup_apps VARCHAR) | SELECT MIN(league_goals) FROM table_name_84 WHERE fa_cup_goals = "0" AND fa_cup_apps = "0" AND position = "df" AND total_apps = "3" |
What is the alternate of the nation with Erkki Lill as the skip? | CREATE TABLE table_36156 ("Nation" text,"Skip" text,"Third" text,"Second" text,"Lead" text,"Alternate" text) | SELECT "Alternate" FROM table_36156 WHERE "Skip" = 'erkki lill' |
see questions that has or had bounties this month. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score num... | SELECT P.Id AS "post_link", V.BountyAmount, V.CreationDate AS "bounty_start", P.Score, P.ViewCount, P.Title, P.Tags, P.Body, P.AnswerCount FROM Posts AS P INNER JOIN Votes AS V ON P.Id = V.PostId WHERE TIME_TO_STR(V.CreationDate, '%-M') = TIME_TO_STR(CURRENT_TIMESTAMP(), '%-M') AND TIME_TO_STR(V.CreationDate, '%Y') = T... |
Who is the original west end performer for the character Neville Craven? | CREATE TABLE table_1901751_1 (original_west_end_performer VARCHAR,character VARCHAR) | SELECT original_west_end_performer FROM table_1901751_1 WHERE character = "Neville Craven" |
What is the 2006 when the 2013 is 1r, and the 2012 is 1r? | CREATE TABLE table_name_89 (Id VARCHAR) | SELECT 2006 FROM table_name_89 WHERE 2013 = "1r" AND 2012 = "1r" |
Crockett High School had which number(#)? | CREATE TABLE table_12032893_1 (_number VARCHAR,high_school VARCHAR) | SELECT _number FROM table_12032893_1 WHERE high_school = "Crockett" |
How many times did Tim Macrow and Joey Foster both got the fastest lap and pole position respectively? | CREATE TABLE table_24762 ("Event" real,"Round" real,"Circuit" text,"Date" text,"Pole Position" text,"Fastest Lap" text,"Winning driver" text,"Winning team" text) | SELECT COUNT("Event") FROM table_24762 WHERE "Fastest Lap" = 'Tim Macrow' AND "Pole Position" = 'Joey Foster' |
For those employees who was hired before 2002-06-21, give me the comparison about the sum of department_id over the hire_date bin hire_date by time, and could you display by the sum department id in ascending? | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))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... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(DEPARTMENT_ID) |
how many patients of the age 80 and above had the primary disease as hypoxia? | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPOXIA" AND demographic.age >= "80" |
Return the name, phone number and email address for the customer with the most orders. | CREATE TABLE customer_addresses (customer_id number,address_id number,date_from time,date_to time)CREATE TABLE departments (department_id number,dept_store_id number,department_name text)CREATE TABLE department_store_chain (dept_store_chain_id number,dept_store_chain_name text)CREATE TABLE customer_orders (order_id num... | SELECT T1.customer_name, T1.customer_phone, T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY COUNT(*) DESC LIMIT 1 |
What Elector has the Place of birth of San Severino? | CREATE TABLE table_name_33 (elector VARCHAR,place_of_birth VARCHAR) | SELECT elector FROM table_name_33 WHERE place_of_birth = "san severino" |
What was the result in the game broadcast on the SEC Network? | CREATE TABLE table_26842217_12 (result VARCHAR,broadcast VARCHAR) | SELECT result FROM table_26842217_12 WHERE broadcast = "SEC Network" |
give me the number of patients whose diagnoses short title is adv eff antineoplastic and drug route is pr? | 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,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Adv eff antineoplastic" AND prescriptions.route = "PR" |
What was the home teams score when the VFL played Princes Park? | CREATE TABLE table_name_76 (home_team VARCHAR,venue VARCHAR) | SELECT home_team AS score FROM table_name_76 WHERE venue = "princes park" |
Mis-i is the nominative of what ergative? | CREATE TABLE table_name_48 (ergative VARCHAR,nominative VARCHAR) | SELECT ergative FROM table_name_48 WHERE nominative = "mis-i" |
Which Division that has a Reg Season of 1st, western, and Playoffs of champions, and a Year smaller than 2013? | CREATE TABLE table_37770 ("Year" real,"Division" real,"League" text,"Reg. Season" text,"Playoffs" text) | SELECT AVG("Division") FROM table_37770 WHERE "Reg. Season" = '1st, western' AND "Playoffs" = 'champions' AND "Year" < '2013' |
I want to see trend of the number of creation by creation | CREATE TABLE management (department_ID int,head_ID int,temporary_acting text)CREATE TABLE department (Department_ID int,Name text,Creation text,Ranking int,Budget_in_Billions real,Num_Employees real)CREATE TABLE head (head_ID int,name text,born_state text,age real) | SELECT Creation, COUNT(Creation) FROM department GROUP BY Creation |
how many combined performances have the top three longest running broadway shows had ? | CREATE TABLE table_204_592 (id number,"#" number,"title" text,"type" text,"opening\ndate" text,"closing\ndate" text,"performances" number,"comment" text) | SELECT SUM("performances") FROM table_204_592 WHERE "#" <= 3 |
Which pronoun has e biti / bi e in first person? | CREATE TABLE table_29405 ("Pronoun" text,"Present" text,"1st" text,"2nd" text,"perfect" text,"aorist" text,"imperfect" text,"pluperfect" text) | SELECT "Pronoun" FROM table_29405 WHERE "1st" = 'će biti / biće' |
What is the course description and number of credits for QM-261? | CREATE TABLE professor (emp_num number,dept_code text,prof_office text,prof_extension text,prof_high_degree text)CREATE TABLE department (dept_code text,dept_name text,school_code text,emp_num number,dept_address text,dept_extension text)CREATE TABLE student (stu_num number,stu_lname text,stu_fname text,stu_init text,s... | SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261' |
provide the average age of female patients who stayed in the hospital for 23 days. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.days_stay = "23" |
Which position was picked before 63, for Oklahoma College? | CREATE TABLE table_65135 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT "Position" FROM table_65135 WHERE "Pick" < '63' AND "College" = 'oklahoma' |
When was the circuit portland international raceway? | CREATE TABLE table_name_28 (date VARCHAR,circuit VARCHAR) | SELECT date FROM table_name_28 WHERE circuit = "portland international raceway" |
What is the average lost of games played of more than 9? | CREATE TABLE table_name_16 (lost INTEGER,played INTEGER) | SELECT AVG(lost) FROM table_name_16 WHERE played > 9 |
Ratio of number of accepted answer by users with rep. > threshold to all accepted answers. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE Badges (Id... | WITH AcceptedAnswers AS (SELECT aa.* FROM Posts AS p INNER JOIN Posts AS aa ON aa.Id = p.AcceptedAnswerId), UsersWITHAcceptedAnswers AS (SELECT u.Reputation, COUNT(*) AS AcceptedAnswerCount FROM AcceptedAnswers AS aa INNER JOIN Users AS u ON u.Id = aa.OwnerUserId GROUP BY u.Id, u.Reputation), HighRepUsers AS (SELECT * ... |
was there any record of the microbiology test for the blood, venipuncture of patient 031-3355 on the first hospital visit? | 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 medication (medicationid number,patientunitstayid number,drugname text,dos... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitala... |
what is the b score when the a score is 6.9? | CREATE TABLE table_13450 ("Position" text,"Gymnast" text,"A Score" real,"B Score" real,"Total" real) | SELECT "B Score" FROM table_13450 WHERE "A Score" = '6.9' |
what is admission type and primary disease of subject id 2560? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT demographic.admission_type, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "2560" |
Who is the teleplay by when the director is Rob Bailey? | CREATE TABLE table_72543 ("Series #" real,"Season #" real,"Title" text,"Story by" text,"Teleplay by" text,"Directed by" text,"Original air date" text) | SELECT "Teleplay by" FROM table_72543 WHERE "Directed by" = 'Rob Bailey' |
List the positions of players whose average number of points scored by that position is larger than 20, compare the number of positions, and I want to rank in asc by the the number of position. | CREATE TABLE competition (Competition_ID int,Year real,Competition_type text,Country text)CREATE TABLE club_rank (Rank real,Club_ID int,Gold real,Silver real,Bronze real,Total real)CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE competition... | SELECT Position, COUNT(Position) FROM player GROUP BY Position HAVING AVG(Points) >= 20 ORDER BY COUNT(Position) |
top 500 stackoverflow users thailand. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS Rank, Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Thailand%' LIMIT 500 |
Who was the opponent at the game held on December 24, 2005? | CREATE TABLE table_name_16 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_16 WHERE date = "december 24, 2005" |
Name the points for switzerland | CREATE TABLE table_24489942_10 (points VARCHAR,nationality VARCHAR) | SELECT points FROM table_24489942_10 WHERE nationality = "Switzerland" |
What is the total number of January ( C) temperatures when the July ( C) temperatures were 23/15? | CREATE TABLE table_21980_1 (january__ VARCHAR,july__°c_ VARCHAR) | SELECT COUNT(january__) AS °c_ FROM table_21980_1 WHERE july__°c_ = "23/15" |
provide the number of patients whose days of hospital stay is greater than 0 and diagnoses long title is pulmonary collapse? | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "0" AND diagnoses.long_title = "Pulmonary collapse" |
provide the lab test category of subject id 6983. | 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 (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT lab."CATEGORY" FROM lab WHERE lab.subject_id = "6983" |
the california golden seals that where drafted by nhl teams played what positions | CREATE TABLE table_1473672_7 (position VARCHAR,nhl_team VARCHAR) | SELECT position FROM table_1473672_7 WHERE nhl_team = "California Golden Seals" |
what happened during the election for Richard M. Kleberg? | CREATE TABLE table_18658 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_18658 WHERE "Incumbent" = 'Richard M. Kleberg' |
What is the average value for events won by KCL in a year earlier than 2004? | CREATE TABLE table_44435 ("Year" real,"Date held" text,"Winner" text,"Events won by KCL" real,"Events won by KCLMS" real) | SELECT AVG("Events won by KCL") FROM table_44435 WHERE "Year" < '2004' |
What is the name listed for the country that has a status of loaned and a moving to listed as leyton orient? | CREATE TABLE table_65620 ("Name" text,"Country" text,"Status" text,"Moving to" text,"Transfer fee" text) | SELECT "Name" FROM table_65620 WHERE "Status" = 'loaned' AND "Moving to" = 'leyton orient' |
What is the Country of the Player with a Score of 73-70-71-71=285? | CREATE TABLE table_9955 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" text) | SELECT "Country" FROM table_9955 WHERE "Score" = '73-70-71-71=285' |
how many volts can the flyback handle at most ? | CREATE TABLE table_204_187 (id number,"type" text,"power\n[w]" text,"relative cost" number,"input range\n[v]" text,"energy storage" text,"features" text) | SELECT "input range\n[v]" FROM table_204_187 WHERE "type" = 'flyback' |
Which Marriage has a Became Duchess of 12 december 1666? | CREATE TABLE table_name_68 (marriage VARCHAR,became_duchess VARCHAR) | SELECT marriage FROM table_name_68 WHERE became_duchess = "12 december 1666" |
when womens singles is wang yihan and tour is french super series, what were the men's singles? | CREATE TABLE table_21001903_2 (mens_singles VARCHAR,womens_singles VARCHAR,tour VARCHAR) | SELECT mens_singles FROM table_21001903_2 WHERE womens_singles = "Wang Yihan" AND tour = "French Super Series" |
Bar chart x axis color y axis the number of color, sort in desc by the x-axis. | CREATE TABLE photos (id int,camera_lens_id int,mountain_id int,color text,name text)CREATE TABLE mountain (id int,name text,Height real,Prominence real,Range text,Country text)CREATE TABLE camera_lens (id int,brand text,name text,focal_length_mm real,max_aperture real) | SELECT color, COUNT(color) FROM photos GROUP BY color ORDER BY color DESC |
Which Country has a To par of e? | CREATE TABLE table_name_96 (country VARCHAR,to_par VARCHAR) | SELECT country FROM table_name_96 WHERE to_par = "e" |
What was the high assists on November 14? | CREATE TABLE table_17325937_5 (high_assists VARCHAR,date VARCHAR) | SELECT high_assists FROM table_17325937_5 WHERE date = "November 14" |
How many votes Khuzestan were there when the percentage was 34.50? | CREATE TABLE table_22236 ("Candidates" text,"Votes Khuzestan" real,"% of votes Khuzestan" text,"Votes Nationally" real,"% of votes nationally" text) | SELECT MIN("Votes Khuzestan") FROM table_22236 WHERE "% of votes Khuzestan" = '34.50' |
Which release had 6 DVDs? | CREATE TABLE table_28057 ("Release" text,"# of discs" real,"Region 1" text,"Region 2" text,"Region 4" text) | SELECT "Release" FROM table_28057 WHERE "# of discs" = '6' |
How many games does the player with 1 (0) finals and a w-league of 28 (1) have? | CREATE TABLE table_name_12 (games VARCHAR,finals VARCHAR,w_league VARCHAR) | SELECT games FROM table_name_12 WHERE finals = "1 (0)" AND w_league = "28 (1)" |
who had the most wins : shelfield athletic or sutton coldfield town ? | CREATE TABLE table_204_596 (id number,"year" number,"winners" text,"score" text,"runners up" text,"notes" text) | SELECT "winners" FROM table_204_596 WHERE "winners" IN ('shelfield athletic', 'sutton coldfield town') GROUP BY "winners" ORDER BY COUNT(*) DESC LIMIT 1 |
How many places featured the DXCL Callsign? | CREATE TABLE table_12547903_3 (location VARCHAR,callsign VARCHAR) | SELECT COUNT(location) FROM table_12547903_3 WHERE callsign = "DXCL" |
What is the title for Hui that ruled from 864 BC? | CREATE TABLE table_44635 ("State" text,"Type" text,"Name" text,"Title" text,"Royal house" text,"From" text) | SELECT "Title" FROM table_44635 WHERE "Name" = 'hui' AND "From" = '864 bc' |
Name the away team for essendon | CREATE TABLE table_name_69 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_69 WHERE home_team = "essendon" |
Which Opposing team had an Against smaller Than 5? | CREATE TABLE table_59603 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT "Opposing Teams" FROM table_59603 WHERE "Against" < '5' |
What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? | CREATE TABLE races (raceid number,year number,round number,circuitid number,name text,date text,time text,url text)CREATE TABLE driverstandings (driverstandingsid number,raceid number,driverid number,points number,position number,positiontext text,wins number)CREATE TABLE constructorstandings (constructorstandingsid nu... | SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year |
What was the attendance last year at Manuka Oval? | CREATE TABLE table_16930 ("Venue" text,"Hosted" real,"Average" real,"Highest" real,"Lowest" real,"Total" real,"Last Year" text,"Up/Down" text) | SELECT "Last Year" FROM table_16930 WHERE "Venue" = 'Manuka Oval' |
For those employees who did not have any job in the past, give me the trend about commission_pct over hire_date . | 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 locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
what's the location attendance where record is 14 39 | CREATE TABLE table_17356 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Location Attendance" FROM table_17356 WHERE "Record" = '14–39' |
when did it last happen until 610 days ago that the arterial bp [diastolic] of patient 28966 was greater than 82.0? | 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 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... | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28966)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... |
On what date were Gary Lucy and Susie Verrico the panelists. | CREATE TABLE table_20420 ("Episode Number" real,"Air Date" text,"Guest Host" text,"Musical Guest (Song performed)" text,"Who knows the most about the guest host? panelists" text) | SELECT "Air Date" FROM table_20420 WHERE "Who knows the most about the guest host? panelists" = 'Gary Lucy and Susie Verrico' |
Calculate the number of actors in each duration of actors using a bar chart, rank from low to high by the names please. | CREATE TABLE actor (Actor_ID int,Name text,Musical_ID int,Character text,Duration text,age int)CREATE TABLE musical (Musical_ID int,Name text,Year int,Award text,Category text,Nominee text,Result text) | SELECT Duration, COUNT(Duration) FROM actor GROUP BY Duration ORDER BY Duration |
what is the report called where the circuit took place at the nazareth speedway? | CREATE TABLE table_10707142_2 (report VARCHAR,circuit VARCHAR) | SELECT report FROM table_10707142_2 WHERE circuit = "Nazareth Speedway" |
Which the Lost to is in 2000 | CREATE TABLE table_name_35 (lost_to VARCHAR,year VARCHAR) | SELECT lost_to FROM table_name_35 WHERE year = 2000 |
What district is bill thomas from? | CREATE TABLE table_1341453_7 (district VARCHAR,incumbent VARCHAR) | SELECT district FROM table_1341453_7 WHERE incumbent = "Bill Thomas" |
give me the number of patients whose admission type is urgent and lab test fluid is urine? | 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 text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.fluid = "Urine" |
How many of the patients diagnosed with icd9 code 7098 died in or before the year 2132? | 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,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2132.0" AND diagnoses.icd9_code = "7098" |
What's the highest frequency of the KBDR callsign? | CREATE TABLE table_name_4 (frequency INTEGER,callsign VARCHAR) | SELECT MAX(frequency) FROM table_name_4 WHERE callsign = "kbdr" |
Who was in third place when the Winner was Dalian Shide, Chongqing Longxin was 4th and 14 clubs? | CREATE TABLE table_name_48 (third_place VARCHAR,fourth_placed VARCHAR,number_of_clubs VARCHAR,winners VARCHAR) | SELECT third_place FROM table_name_48 WHERE number_of_clubs = 14 AND winners = "dalian shide" AND fourth_placed = "chongqing longxin" |
What is the lowest Cycle, when Number Of Contestants is 11, and when International Destinations is Paris Gran Canaria? | CREATE TABLE table_47957 ("Cycle" real,"Premiere date" text,"Winner" text,"Runner-up" text,"Number of contestants" text,"International Destinations" text) | SELECT MIN("Cycle") FROM table_47957 WHERE "Number of contestants" = '11' AND "International Destinations" = 'paris gran canaria' |
how did patient 002-64535 first get admitted to the hospital this year? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid ... | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '002-64535' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY patient.hospitaladmittime LIMIT 1 |
What is Score in The Final, when Date is '1981'? | CREATE TABLE table_44930 ("Outcome" text,"Date" real,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Score in the final" FROM table_44930 WHERE "Date" = '1981' |
What year was 'moped girls' released? | CREATE TABLE table_18710512_3 (date VARCHAR,single VARCHAR) | SELECT date FROM table_18710512_3 WHERE single = "Moped Girls" |
hypertension defined as blood pressure > 180 / 110 mm hg ( systolic bp > 180 mm hg and / or diastolic bp > 110 mm hg ) on repeated measurements during current admission prior to randomization | CREATE TABLE table_test_21 ("id" int,"gender" string,"systolic_blood_pressure_sbp" int,"tachycardia" int,"body_weight" float,"renal_disease" bool,"anaemia" bool,"creatinine_clearance_cl" float,"estimated_glomerular_filtration_rate_egfr" int,"cardiogenic_shock" bool,"history_of_dialysis" bool,"prior_creatinine" float,"s... | SELECT * FROM table_test_21 WHERE hypertension = 1 OR (systolic_blood_pressure_sbp > 180 OR diastolic_blood_pressure_dbp > 110) |
in the 2003 summer universiade , which three countries had at least 18 bronze medals ? | CREATE TABLE table_203_739 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_203_739 WHERE "bronze" >= 18 |
For those employees who did not have any job in the past, show me about the distribution of hire_date and the average of manager_id bin hire_date by time in a bar chart, I want to display Y-axis in descending order. | 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 varchar(2))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_... | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(MANAGER_ID) DESC |
What was the vote for Alvin Green when Jim DeMint was 62%? | CREATE TABLE table_76983 ("Poll source" text,"Dates administered" text,"Jim DeMint (R)" text,"Alvin Greene (D)" text,"Tom Clements (G)" text,"Other" text,"Undecided" text) | SELECT "Alvin Greene (D)" FROM table_76983 WHERE "Jim DeMint (R)" = '62%' |
On what date did Northerly place 6th? | CREATE TABLE table_18847 ("Result" text,"Date" text,"Race" text,"Venue" text,"Group" text,"Distance" text,"Weight (kg)" real,"Jockey" text,"Winner/2nd" text) | SELECT "Date" FROM table_18847 WHERE "Result" = '6th' |
What is th US A.C. in 1985 with a US hot 100 of 57? | CREATE TABLE table_41033 ("Year" real,"Song" text,"Canada Singles" text,"US Hot 100" text,"US A.C." text) | SELECT "US A.C." FROM table_41033 WHERE "Year" = '1985' AND "US Hot 100" = '57' |
Which Team has a Record of 32 50? | CREATE TABLE table_48733 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Team" FROM table_48733 WHERE "Record" = '32–50' |
Bar chart of how many building from each building | CREATE TABLE instructor (ID varchar(5),name varchar(20),dept_name varchar(20),salary numeric(8,2))CREATE TABLE teaches (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0))CREATE TABLE time_slot (time_slot_id varchar(4),day varchar(1),start_hr numeric(2),start_min numeric(2),end_h... | SELECT building, COUNT(building) FROM department GROUP BY building |
What shows for Try bonus when the points against are 451? | CREATE TABLE table_38290 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text) | SELECT "Try bonus" FROM table_38290 WHERE "Points against" = '451' |
How many millions of people in the US saw the episode with series number 103? | CREATE TABLE table_22078972_2 (us_viewers__millions_ VARCHAR,no_in_series VARCHAR) | SELECT us_viewers__millions_ FROM table_22078972_2 WHERE no_in_series = 103 |
What round was on 11/11/1992? | CREATE TABLE table_62938 ("Opposing Team" text,"Against" real,"Date" text,"Venue" text,"Round" text) | SELECT "Round" FROM table_62938 WHERE "Date" = '11/11/1992' |
patients who have at least 2 of the following risk factors: hypertension; type ii diabetes mellitus ;chronic kidney disease ; prior history of myocardial infarction or angina pectoris ; prior history of cerebral infarction ; peripheral arterial disease | CREATE TABLE table_test_31 ("id" int,"ejection_fraction_ef" int,"macular_disease" bool,"systemic" bool,"alt" float,"iud" bool,"condom_with_spermicide" bool,"gender" string,"meropenem" bool,"non_q_wave_myocardial_infarction" bool,"hbcab" bool,"unstable_angina" bool,"birth_control_pills" bool,"cystic_fibrosis" bool,"hbv_... | SELECT * FROM table_test_31 WHERE (CASE WHEN hypertension = 1 THEN 1 ELSE 0 END + CASE WHEN diabetic = 'ii' THEN 1 ELSE 0 END + CASE WHEN mellitus = 1 THEN 1 ELSE 0 END + CASE WHEN kidney_disease = 1 THEN 1 ELSE 0 END + CASE WHEN myocardial_infarction = 1 OR angina = 1 THEN 1 ELSE 0 END + CASE WHEN cerebral_infarction ... |
What is the proportion of types of every competition? | CREATE TABLE club (Club_ID int,name text,Region text,Start_year text)CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE competition (Competition_ID int,Year real,Competition_type text,Country text)CREATE TABLE competition_result (Competition_I... | SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type |
What is the average silver medals a team ranked 12 with less than 2 bronze has? | CREATE TABLE table_14631 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Silver") FROM table_14631 WHERE "Rank" = '12' AND "Bronze" < '2' |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time by a bar chart, and show by the y-axis in ascending. | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2)... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_ID) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.