instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
For those records from the products and each product's manufacturer, show me about the correlation between price and code in a scatter chart.
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)
SELECT T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code
Draw a bar chart for what is the first name and GPA of every student that has a GPA lower than average?, and display from high to low by the names.
CREATE TABLE EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20),DEPT_EXTENSION varchar(4))C...
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME ORDER BY STU_FNAME DESC
Name the number of dates for alouettes
CREATE TABLE table_26600 ("Week" real,"Date" text,"Opponent" text,"Location" text,"Final Score" text,"Attendance" real,"Record" text)
SELECT COUNT("Date") FROM table_26600 WHERE "Opponent" = 'Alouettes'
What is the average gold with a bronze smaller than 5 with a rank of 8?
CREATE TABLE table_name_17 (gold INTEGER,bronze VARCHAR,rank VARCHAR)
SELECT AVG(gold) FROM table_name_17 WHERE bronze < 5 AND rank = "8"
With the nickname the swans, what is the home ground?
CREATE TABLE table_73055 ("Name" text,"Nickname" text,"First season" text,"Location" text,"Home ground(s)" text,"Coach" text,"Captain" text)
SELECT "Home ground(s)" FROM table_73055 WHERE "Nickname" = 'Swans'
How many margin results are listed in the election that was won by L. Adaikalaraj C and the party was the Indian national congress?
CREATE TABLE table_22753245_1 (margin VARCHAR,party VARCHAR,winner VARCHAR)
SELECT COUNT(margin) FROM table_22753245_1 WHERE party = "Indian National Congress" AND winner = "L. Adaikalaraj c"
what tournament has 5-5 as it 's w l record ?
CREATE TABLE table_204_153 (id number,"tournament" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text,"2013" text,"2014" text,"w-l" text)
SELECT "tournament" FROM table_204_153 WHERE "tournament" = '5-5'
count the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft /sda and year of birth is less than 2097?
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 WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.dob_year < "2097"
how many people received a cont inv mec ven <96 hrs procedure within 2 months after they had been diagnosed with anemia-other chronic dis since 1 year ago?
CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE microbiologyevents (row_id number,subject_id nu...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'anemia-other chron...
What is the Location and Attendance with a Record of 21 22?
CREATE TABLE table_75818 ("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_75818 WHERE "Record" = '21–22'
hematocrit of less than or equal to 30 % .
CREATE TABLE table_dev_28 ("id" int,"gender" string,"systolic_blood_pressure_sbp" int,"consent" bool,"hemoglobin_a1c_hba1c" float,"hematocrit_hct" float,"fasting_triglycerides" int,"fasting_blood_glucose_fbg" float,"diastolic_blood_pressure_dbp" int,"hba1c" float,"metformin" bool,"age" float,"NOUSE" float)
SELECT * FROM table_dev_28 WHERE hematocrit_hct <= 30
Which Date has an Away team of south melbourne?
CREATE TABLE table_name_42 (date VARCHAR,away_team VARCHAR)
SELECT date FROM table_name_42 WHERE away_team = "south melbourne"
What is the record of the game that has a result of w 45 17?
CREATE TABLE table_75550 ("Week" real,"Date" text,"Opponent" text,"Location" text,"Time (ET)" text,"Result" text,"Record" text)
SELECT "Record" FROM table_75550 WHERE "Result" = 'w 45–17'
minimal weight of 40 kg
CREATE TABLE table_train_229 ("id" int,"hemoglobin_a1c_hba1c" float,"active_metabolic" bool,"body_weight" float,"hba1c" float,"age" float,"NOUSE" float)
SELECT * FROM table_train_229 WHERE body_weight >= 40
What was the result of Sopot (pol)?
CREATE TABLE table_31653 ("Year" real,"Competition" text,"Date" text,"Location" text,"Score" text,"Result" text)
SELECT "Result" FROM table_31653 WHERE "Location" = 'sopot (pol)'
anemia ( hemoglobin < 12 g / dl in male , < 11 g / dl in female )
CREATE TABLE table_dev_20 ("id" int,"anemia" bool,"gender" string,"systolic_blood_pressure_sbp" int,"hemoglobin_a1c_hba1c" float,"platelets" int,"dyslipidemia" bool,"renal_disease" bool,"creatinine_clearance_cl" float,"neutropenia" int,"estimated_glomerular_filtration_rate_egfr" int,"thrombocytopenia" float,"diastolic_...
SELECT * FROM table_dev_20 WHERE anemia = 1 OR ((gender = 'male' AND hemoglobin_a1c_hba1c < 12) OR (gender = 'female' AND hemoglobin_a1c_hba1c < 11))
Tell me the VIN code for compression ratio of 10.50:1
CREATE TABLE table_4340 ("Engine" text,"Horsepower" text,"Torque" text,"Carburetor" text,"Compression Ratio" text,"Bore & Stroke" text,"VIN Code" text)
SELECT "VIN Code" FROM table_4340 WHERE "Compression Ratio" = '10.50:1'
Which competition held the 1st position in 2009?
CREATE TABLE table_name_89 (competition VARCHAR,position VARCHAR,year VARCHAR)
SELECT competition FROM table_name_89 WHERE position = "1st" AND year = 2009
which region was the last to release ?
CREATE TABLE table_204_128 (id number,"region" text,"date" text,"label" text,"format" text,"catalog" text)
SELECT "region" FROM table_204_128 ORDER BY "date" DESC LIMIT 1
When did Austin Austin TX get the third place?
CREATE TABLE table_23536 ("Year" text,"Winner" text,"First Runner Up" text,"Third Place" text,"Consolation Winner/4th" text,"Finals Location" text)
SELECT "Year" FROM table_23536 WHERE "Third Place" = 'Austin Austin TX'
what is the number of patients whose admission location is emergency room admit and lab test name is eosinophils?
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 procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND lab.label = "Eosinophils"
How many opponents were there in a game higher than 20 on January 28?
CREATE TABLE table_77091 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Nets points" real,"Opponents" real,"Record" text,"Streak" text)
SELECT "Opponents" FROM table_77091 WHERE "Game" > '20' AND "Date" = 'january 28'
Which Name has a AAFC Team of los angeles dons, and a Position of fb, and a College of oklahoma a&m?
CREATE TABLE table_name_70 (name VARCHAR,college VARCHAR,aafc_team VARCHAR,position VARCHAR)
SELECT name FROM table_name_70 WHERE aafc_team = "los angeles dons" AND position = "fb" AND college = "oklahoma a&m"
During the competition at Port Elizabeth, where the opponent was Australia, what were the bowling figures?
CREATE TABLE table_56383 ("Bowling figures Wickets-Runs (Overs)" text,"Bowler" text,"Versus" text,"Venue" text,"Date" text)
SELECT "Bowling figures Wickets-Runs (Overs)" FROM table_56383 WHERE "Venue" = 'port elizabeth' AND "Versus" = 'australia'
A bar chart about what are the total number of credits offered by each department?, list in desc by the x-axis.
CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_GRADE varchar(50))CREATE TABLE EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_...
SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY DEPT_CODE DESC
what is average age of patients whose admission type is emergency and primary disease is pituitary bleed?
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 lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "PITUITARY BLEED"
Which chassis is ranked 24th?
CREATE TABLE table_69577 ("Year" real,"Team" text,"Chassis" text,"Engine" text,"Rank" text,"Points" real)
SELECT "Chassis" FROM table_69577 WHERE "Rank" = '24th'
give me the number of patients whose diagnoses short title is arthropathy nos-unspec and lab test name is urobilinogen?
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Arthropathy NOS-unspec" AND lab.label = "Urobilinogen"
How many entries have a HK viewers of 2.23 million, and a Rank below 2?
CREATE TABLE table_54629 ("Rank" real,"English title" text,"Chinese title" text,"Average" real,"Peak" real,"Premiere" real,"Finale" real,"HK viewers" text)
SELECT COUNT("Peak") FROM table_54629 WHERE "HK viewers" = '2.23 million' AND "Rank" > '2'
find the number of patients whose admission location is phys referral/normal deli and were diagnosed with subarachnoid hemorrhage.
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 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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.short_title = "Subarachnoid hemorrhage"
What is the average number scored in a friendly at kryoia soveto, moscow?
CREATE TABLE table_11783 ("Date" text,"Venue" text,"Result" text,"Competition" text,"Scored" real)
SELECT AVG("Scored") FROM table_11783 WHERE "Competition" = 'friendly' AND "Venue" = 'kryoia soveto, moscow'
What was his minimum number wins in a single year?
CREATE TABLE table_27776 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"F/Laps" real,"Podiums" real,"Points" text,"Position" text)
SELECT MIN("Wins") FROM table_27776
calculate the two year survival probability of patients that were prescribed nacl 0.9% mbp after they were diagnosed with abdominal compartment syndrome?
CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labnam...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
who is the last horse on the list that was pulled up ?
CREATE TABLE table_204_561 (id number,"fence" number,"name" text,"jockey" text,"age" number,"handicap (st-lb)" text,"starting price" text,"fate" text)
SELECT "name" FROM table_204_561 WHERE "fate" = 'pulled up' ORDER BY id DESC LIMIT 1
what number of patients with abdominal abscess had drug type as main?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "ABDOMINAL ABSCESS" AND prescriptions.drug_type = "MAIN"
Name the lost for matches of 1 928
CREATE TABLE table_name_66 (lost VARCHAR,matches VARCHAR)
SELECT lost FROM table_name_66 WHERE matches = "1 928"
previous to 2008 how many times was sweden the runner up ?
CREATE TABLE table_203_390 (id number,"year" number,"venue" text,"winners" text,"runner-up" text,"3rd place" text)
SELECT COUNT(*) FROM table_203_390 WHERE "year" < 2008 AND "runner-up" = 'sweden'
What is the number of patients whose procedure icd9 code is 8659?
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,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "8659"
Find out the first name and last name of staff lived in city Damianfort.
CREATE TABLE Addresses (address_id VARCHAR,city VARCHAR)CREATE TABLE Staff (first_name VARCHAR,last_name VARCHAR,staff_address_id VARCHAR)
SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort"
What is the average number of wins for the Terang Club, when there are less than 0 draws?
CREATE TABLE table_63497 ("Club" text,"Wins" real,"Losses" real,"Draws" real,"Against" real)
SELECT AVG("Wins") FROM table_63497 WHERE "Club" = 'terang' AND "Draws" < '0'
what is gender and discharge time of subject id 2560?
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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT demographic.gender, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560"
With a method of tko (kick) what is the record of the match?
CREATE TABLE table_49967 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text,"Location" text)
SELECT "Record" FROM table_49967 WHERE "Method" = 'tko (kick)'
How many years does Team wal-mart / tide participate?
CREATE TABLE table_55385 ("Year" real,"Date" text,"Driver" text,"Team" text,"Distance/Duration" text)
SELECT COUNT("Year") FROM table_55385 WHERE "Team" = 'wal-mart / tide'
What did the team score when playing south melbourne at home?
CREATE TABLE table_name_38 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team AS score FROM table_name_38 WHERE away_team = "south melbourne"
tell me the number of times patient 013-20464 has had a chest tube #1 output in 07/this year.
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,obs...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-20464')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.ce...
Which engine was on a car with G tires, a chassis model of 003 002 004 005 006, driven by Jackie Stewart?
CREATE TABLE table_10606 ("Entrant" text,"Constructor" text,"Chassis" text,"Engine" text,"Tyre" text,"Driver" text,"Rounds" text)
SELECT "Engine" FROM table_10606 WHERE "Tyre" = 'g' AND "Chassis" = '003 002 004 005 006' AND "Driver" = 'jackie stewart'
when was the last time patient 002-41152 had been prescribed furosemide 10 mg/ml ij soln and potassium chloride 20 meq po pack at the same time last month?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender t...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'furosemide 10 mg/ml ij soln' AND patient.uniquepid = '002-41152' AND DATETIME(medication.drugstarttime, 'start of month')...
which date and opponent is next after june 12,1989
CREATE TABLE table_204_836 (id number,"#" number,"date" text,"opponent" text,"score" text,"result" text,"competition" text)
SELECT "date", "opponent" FROM table_204_836 WHERE "#" = (SELECT MAX("#") FROM table_204_836 WHERE "date" = 'june 12, 1989') + 1
What is the other abbreviation of the constellation that has hydrae / ha dri / as genitive?
CREATE TABLE table_30702 ("Constellation" text,"IAU abbreviation" text,"Other abbreviation" text,"Genitive" text,"Family" text,"Origin" text,"Meaning" text,"Brightest star" text)
SELECT "Other abbreviation" FROM table_30702 WHERE "Genitive" = 'Hydrae /ˈhaɪdriː/'
how many patients admitted after year 2146 had ruq pain?
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 WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.admityear < "2146"
What is the acceleration 1-100km/h when the name is 1.5 dci?
CREATE TABLE table_14847 ("Name" text,"Code" text,"Capacity" text,"Power" text,"Acceleration 0\u2013100km/h" text,"Top speed" text,"Combined consumption" text)
SELECT "Acceleration 0\u2013100km/h" FROM table_14847 WHERE "Name" = '1.5 dci'
count the number of times patient 004-4326 had a administration of saline solution procedure until 2 years ago.
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 allergy (allergyid number,patientunitstayid number,drugname text,allergyna...
SELECT COUNT(*) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-4326')) AND treatment.treatmentname = 'administration of saline solution' AN...
CDA Cloud-Gazing: Azure Python Questions.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number...
SELECT Id AS "comment_link", Score, Text FROM Comments WHERE UPPER(Text) LIKE UPPER('Azure') ORDER BY Score DESC
What 's the hardest class ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)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 instructor (instructor_id int,name varchar,uniqna...
SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM course AS COURSEalias1, program_course AS PROGRAM_COURSEalias1 WH...
Who had the high assist total on january 27?
CREATE TABLE table_3869 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High assists" FROM table_3869 WHERE "Date" = 'January 27'
Top users from Haarlem, The Netherlands.
CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%haarlem%' OR UPPER(Location) LIKE '%HAARLEM%' OR Location LIKE '%Haarlem%' AND Reputation >= 1000 ORDER BY Reputation DESC
What school has the new conference as SELC?
CREATE TABLE table_28735 ("Institution" text,"Location" text,"Team Nickname" text,"Years" text,"New Conference" text,"New Classification" text)
SELECT "Institution" FROM table_28735 WHERE "New Conference" = 'SELC'
What change caused a change of staff in March 9, 1865?
CREATE TABLE table_24394 ("State (class)" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date of successors formal installation" text)
SELECT "Reason for change" FROM table_24394 WHERE "Date of successors formal installation" = 'March 9, 1865'
What was the result of the game played in Venue H?
CREATE TABLE table_name_27 (result VARCHAR,venue VARCHAR)
SELECT result FROM table_name_27 WHERE venue = "h"
How many wins did they have when they had 5 losses?
CREATE TABLE table_name_80 (wins VARCHAR,losses VARCHAR)
SELECT wins FROM table_name_80 WHERE losses = 5
What is the name of the war where the Ottoman sultan was Selim I?
CREATE TABLE table_27065 ("Name of the war" text,"Ottoman sultan" text,"Persian shah" text,"Treaty at the end of the war" text,"Victor" text)
SELECT "Name of the war" FROM table_27065 WHERE "Ottoman sultan" = 'Selim I'
What is Rank Points, when Event is 'WC Milan', and when Shooter is 'Lalita Yauhleuskaya ( AUS )'?
CREATE TABLE table_name_77 (rank_points VARCHAR,event VARCHAR,shooter VARCHAR)
SELECT rank_points FROM table_name_77 WHERE event = "wc milan" AND shooter = "lalita yauhleuskaya ( aus )"
What is the year with a kurtis kraft 500a chassis?
CREATE TABLE table_name_86 (year INTEGER,chassis VARCHAR)
SELECT SUM(year) FROM table_name_86 WHERE chassis = "kurtis kraft 500a"
count the number of patients whose diagnoses icd9 code is 51881 and drug type is additive?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "51881" AND prescriptions.drug_type = "ADDITIVE"
I want the ICAO for city of xi'an
CREATE TABLE table_52405 ("City" text,"Country" text,"Region" text,"IATA" text,"ICAO" text,"Airport" text)
SELECT "ICAO" FROM table_52405 WHERE "City" = 'xi''an'
How many scores were at the Northville Long Island Classic?
CREATE TABLE table_16941 ("Date" text,"Tournament" text,"Location" text,"Purse($)" real,"Winner" text,"Score" text,"1st Prize($)" real)
SELECT COUNT("Score") FROM table_16941 WHERE "Tournament" = 'Northville Long Island Classic'
what is the maximum value of arterial bp mean of patient 655 on the last intensive care unit visit?
CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,i...
SELECT MAX(chartevents.valuenum) 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 = 655) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.item...
Which Series has a Team Name of sunred engineering?
CREATE TABLE table_37157 ("Season" real,"Series" text,"Team Name" text,"Races" text,"Wins" text,"Poles" text,"F/Laps" text,"Podiums" text,"Points" text,"Final Placing" text)
SELECT "Series" FROM table_37157 WHERE "Team Name" = 'sunred engineering'
How many seasons had a Super G of 2 and overall of 3?
CREATE TABLE table_35321 ("Season" real,"Overall" real,"Slalom" text,"Giant Slalom" real,"Super G" text,"Downhill" text,"Combined" text)
SELECT COUNT("Season") FROM table_35321 WHERE "Super G" = '2' AND "Overall" = '3'
urine dipstick protein > 2+ ( 100 mg / dl ) or urine protein 2+ and a urine protein / creatinine ratio > 1 ( > 1000 mg / g )
CREATE TABLE table_train_214 ("id" int,"gender" string,"lead_ecg" bool,"systolic_blood_pressure_sbp" int,"qt_interval" bool,"urine_dipstick_protein" int,"stroke" bool,"transient_ischemic_attack" bool,"qtc" int,"long_qt_syndrome" bool,"cardiovascular_disease" bool,"estimated_glomerular_filtration_rate_egfr" int,"screeni...
SELECT * FROM table_train_214 WHERE urine_dipstick_protein > 100 AND (urine_protein > 1 OR creatinine_ratio > 1000)
What is the Date of the Tournament against Anastasiya Yakimova?
CREATE TABLE table_name_35 (date VARCHAR,opponent_in_final VARCHAR)
SELECT date FROM table_name_35 WHERE opponent_in_final = "anastasiya yakimova"
How many films titled Gie have been nominated?
CREATE TABLE table_18932 ("Year (Ceremony)" text,"Film title used in nomination" text,"Original title" text,"Director" text,"Result" text)
SELECT COUNT("Original title") FROM table_18932 WHERE "Film title used in nomination" = 'Gie'
What was the result of the game played on April 16 with Philadelphia as home team?
CREATE TABLE table_75336 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text)
SELECT "Result" FROM table_75336 WHERE "Home Team" = 'philadelphia' AND "Date" = 'april 16'
What is every country with a TV network of AXN India?
CREATE TABLE table_22622 ("Country" text,"TV Network(s)" text,"Series Premiere" text,"Weekly Schedule" text,"Status" text)
SELECT "Country" FROM table_22622 WHERE "TV Network(s)" = 'AXN India'
On what frequency does W233AG broadcast?
CREATE TABLE table_7280 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Height m (ft)" text,"Class" text,"FCC info" text)
SELECT COUNT("Frequency MHz") FROM table_7280 WHERE "Call sign" = 'w233ag'
Whose course is it that happens to be the easiest PreMajor course ?
CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE course_ta...
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour...
Name the director of alt i alt
CREATE TABLE table_71047 ("Category" text,"Film" text,"Director(s)" text,"Country" text,"Nominating Festival" text)
SELECT "Director(s)" FROM table_71047 WHERE "Film" = 'alt i alt'
What is the location where ed c. kingsley was the runner-up in 1939?
CREATE TABLE table_59738 ("Year" text,"Winner" text,"Runner-up" text,"Venue" text,"Location" text)
SELECT "Location" FROM table_59738 WHERE "Runner-up" = 'ed c. kingsley' AND "Year" = '1939'
What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver?
CREATE TABLE table_name_69 (grid INTEGER,laps VARCHAR,driver VARCHAR)
SELECT AVG(grid) FROM table_name_69 WHERE laps < 14 AND driver = "reine wisell"
Show the total number from each document type code, and I want to sort y-axis from low to high order.
CREATE TABLE Documents_with_Expenses (Document_ID INTEGER,Budget_Type_Code CHAR(15),Document_Details VARCHAR(255))CREATE TABLE Ref_Document_Types (Document_Type_Code CHAR(15),Document_Type_Name VARCHAR(255),Document_Type_Description VARCHAR(255))CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR(15),Budget_Type_Descr...
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY COUNT(*)
how many actors have appeared in each musical?, sort bar in desc order.
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 T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY T2.Name DESC
AA flight 4400 from CINCINNATI to HOUSTON
CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE compartment_class (compartment v...
SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight AS FLIGHT_0, flight AS FLIGHT_1, flight_leg WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND FLIGHT_0.flight_id = flight_l...
Group and count details for the events using a bar chart, and show by the the number of event details in ascending please.
CREATE TABLE Participants (Participant_ID INTEGER,Participant_Type_Code CHAR(15),Participant_Details VARCHAR(255))CREATE TABLE Services (Service_ID INTEGER,Service_Type_Code CHAR(15))CREATE TABLE Events (Event_ID INTEGER,Service_ID INTEGER,Event_Details VARCHAR(255))CREATE TABLE Participants_in_Events (Event_ID INTEGER...
SELECT Event_Details, COUNT(Event_Details) FROM Events GROUP BY Event_Details ORDER BY COUNT(Event_Details)
What's the L3 cache that has a low power part number?
CREATE TABLE table_name_84 (l3_cache VARCHAR,part_number_s_ VARCHAR)
SELECT l3_cache FROM table_name_84 WHERE part_number_s_ = "low power"
Who's my biggest 'favourite' fan?.
CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance t...
SELECT p.OwnerUserId, p.OwnerDisplayName, p.Id FROM Posts AS p WHERE p.OwnerUserId = '##UserID##' AND p.PostTypeId = 1
What is Second, when Position is greater than 33, when Points is greater than 12, and when Equipment is Zabel-VMC?
CREATE TABLE table_name_51 (second VARCHAR,equipment VARCHAR,position VARCHAR,points VARCHAR)
SELECT second FROM table_name_51 WHERE position > 33 AND points > 12 AND equipment = "zabel-vmc"
Which Wins has a Top-5 of 6?
CREATE TABLE table_name_26 (wins INTEGER,top_5 VARCHAR)
SELECT AVG(wins) FROM table_name_26 WHERE top_5 = 6
What was the earliest round with Neil Colzie and a pick smaller than 24?
CREATE TABLE table_name_26 (round INTEGER,player VARCHAR,pick VARCHAR)
SELECT MIN(round) FROM table_name_26 WHERE player = "neil colzie" AND pick < 24
how many days have passed since patient 002-34744 received a -lymphs laboratory test for the last time on their current hospital encounter?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-34744' AND patient.hospi...
On what date was it announced that an asset was acquired for US$9 Million?
CREATE TABLE table_18942 ("Asset Acquired" text,"Acquired From" text,"Date Announced" text,"Date Completed" text,"Reported Cost" text)
SELECT "Date Announced" FROM table_18942 WHERE "Reported Cost" = 'US$9 million'
How many times did the incumbent was first elected and then lost re-election anti-masonic gain?
CREATE TABLE table_28846 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT COUNT("First elected") FROM table_28846 WHERE "Result" = 'Lost re-election Anti-Masonic gain'
When racing engineering is the team and 2012 is the team what is the position?
CREATE TABLE table_25352318_1 (position VARCHAR,season VARCHAR,team VARCHAR)
SELECT position FROM table_25352318_1 WHERE season = 2012 AND team = "Racing Engineering"
provide the number of patients whose primary disease is celo-vessicle fistula and age is less than 45?
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 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 ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CELO-VESSICLE FISTULA" AND demographic.age < "45"
For the team whose shirt sponsor is Krombacher, who is the team captain?
CREATE TABLE table_50359 ("Team" text,"Head Coach" text,"Team Captain" text,"Kitmaker" text,"Shirt sponsor" text)
SELECT "Team Captain" FROM table_50359 WHERE "Shirt sponsor" = 'krombacher'
what was patient 016-9636's last intake today.
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND intakeoutput.cellpath LIKE '%intake%' AND DA...
Bar graph to show the total number from different party, and rank Y-axis from high to low order.
CREATE TABLE people (People_ID int,District text,Name text,Party text,Age int)CREATE TABLE debate (Debate_ID int,Date text,Venue text,Num_of_Audience int)CREATE TABLE debate_people (Debate_ID int,Affirmative int,Negative int,If_Affirmative_Win bool)
SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY COUNT(*) DESC
What 20-29 was in season 2008?
CREATE TABLE table_name_69 (season VARCHAR)
SELECT 20 AS _29 FROM table_name_69 WHERE season = "2008"
Which Round is the highest one that has an Overall of 32, and a Pick # smaller than 4?
CREATE TABLE table_name_85 (round INTEGER,overall VARCHAR,pick__number VARCHAR)
SELECT MAX(round) FROM table_name_85 WHERE overall = 32 AND pick__number < 4
How many house mascots are associated with yellow house colours?
CREATE TABLE table_1942683_1 (house_mascot VARCHAR,house_colour VARCHAR)
SELECT COUNT(house_mascot) FROM table_1942683_1 WHERE house_colour = "Yellow"
What was the crowd size for the game at Footscray?
CREATE TABLE table_name_2 (crowd VARCHAR,away_team VARCHAR)
SELECT COUNT(crowd) FROM table_name_2 WHERE away_team = "footscray"