instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What platform is the company Surfstats Software?
CREATE TABLE table_47555 ("Name" text,"Company" text,"Platform" text,"Latest stable release" text,"Price in USD" text)
SELECT "Platform" FROM table_47555 WHERE "Company" = 'surfstats software'
What is the total laps for the year 2011?
CREATE TABLE table_70487 ("Year" real,"Team" text,"Co-Drivers" text,"Class" text,"Laps" real,"Pos." text,"Class Pos." text)
SELECT SUM("Laps") FROM table_70487 WHERE "Year" = '2011'
What was the date of the friendly match, ending in a result of 1-1?
CREATE TABLE table_name_30 (date VARCHAR,competition VARCHAR,result VARCHAR)
SELECT date FROM table_name_30 WHERE competition = "friendly match" AND result = "1-1"
patient with known history of bleeding diathesis or currently active bleeding;
CREATE TABLE table_test_24 ("id" int,"history_of_bleeding_diathesis" bool,"bleeding" int,"systolic_blood_pressure_sbp" int,"hemoglobin_a1c_hba1c" float,"blood_draw" bool,"renal_disease" bool,"allergy_to_aspirin" bool,"allergy_to_clopidogrel" bool,"cardiogenic_shock" bool,"allergy_to_prasugrel" bool,"platelet_count" flo...
SELECT * FROM table_test_24 WHERE history_of_bleeding_diathesis = 1 OR bleeding = 1
What is the mintage for a location of Sion and a denomination of 00500 500 Francs?
CREATE TABLE table_28596 ("Location" text,"Date" real,"Denomination" text,"Coinage metal" text,"Mintage" real,"KM number" text)
SELECT "Mintage" FROM table_28596 WHERE "Location" = 'Sion' AND "Denomination" = '00500 500 francs'
provide the number of patients whose admission year is less than 2135 and diagnoses short title is lower extremity embolism?
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 text,icustay_id text,drug_type text,drug text,formulary_drug_cd t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2135" AND diagnoses.short_title = "Lower extremity embolism"
Return a bar chart on how many events are there for each party?
CREATE TABLE region (Region_ID int,Region_name text,Date text,Label text,Format text,Catalogue text)CREATE TABLE party (Party_ID int,Minister text,Took_office text,Left_office text,Region_ID int,Party_name text)CREATE TABLE member (Member_ID int,Member_Name text,Party_ID text,In_office text)CREATE TABLE party_events (E...
SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID
What round was it when the method was TKO (would not stand up from Butt Scoot)?
CREATE TABLE table_name_89 (round INTEGER,method VARCHAR)
SELECT AVG(round) FROM table_name_89 WHERE method = "tko (would not stand up from butt scoot)"
Who had the high rebounds when the score was w 105 95 (ot) and Jason Kidd (8) had the high assists?
CREATE TABLE table_name_57 (high_rebounds VARCHAR,high_assists VARCHAR,score VARCHAR)
SELECT high_rebounds FROM table_name_57 WHERE high_assists = "jason kidd (8)" AND score = "w 105–95 (ot)"
What is the Airdate for the episode titled thirteen to centaurus Adapted by stanley miller?
CREATE TABLE table_7092 ("Episode" real,"Title" text,"Story" text,"Adapted by" text,"Director" text,"Airdate" text,"Exists?" text)
SELECT "Airdate" FROM table_7092 WHERE "Adapted by" = 'stanley miller' AND "Title" = '“thirteen to centaurus”'
Im the match where the home team is Melbourne Victory, what was the crowd attendance?
CREATE TABLE table_58509 ("Round" text,"Date" text,"Home Team" text,"Score" text,"Away Team" text,"Crowd" real,"Stadium" text,"Match Details" text)
SELECT COUNT("Crowd") FROM table_58509 WHERE "Home Team" = 'melbourne victory'
How many starts are associated with an oldsmobile engine, 21 finishes and before 2001?
CREATE TABLE table_37705 ("Year" real,"Chassis" text,"Engine" text,"Start" real,"Finish" real,"Team" text)
SELECT SUM("Start") FROM table_37705 WHERE "Engine" = 'oldsmobile' AND "Finish" = '21' AND "Year" < '2001'
Who is the runner-up in 1990?
CREATE TABLE table_49571 ("Location" text,"Year" real,"Champion" text,"Runner-up" text,"Score" text)
SELECT "Runner-up" FROM table_49571 WHERE "Year" = '1990'
What is the total number of ships with different nationalities and ship types?, sort in descending by the total number.
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)
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY COUNT(Nationality) DESC
How many thermal design power levels does part number amql65dam22gg have?
CREATE TABLE table_27277284_27 (tdp VARCHAR,order_part_number VARCHAR)
SELECT COUNT(tdp) FROM table_27277284_27 WHERE order_part_number = "AMQL65DAM22GG"
how many patients until 2104 were prescribed dextrose 50 % iv soln during the same hospital encounter after having undergone mechanical ventilation?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 num...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'mechanical ventilation' AND STRFTIME('%y', treatment.treatmenttime) <= '2...
For those payments processed with Visa, bin the payment day into the Day of Week interval and compute the average amount payment as the Y-axis.
CREATE TABLE Claims (Claim_ID INTEGER,Policy_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER)CREATE TABLE Settlements (Settlement_ID INTEGER,Claim_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER,Customer_Policy_I...
SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa'
What is the highest pick # after round 11?
CREATE TABLE table_name_33 (pick__number INTEGER,round INTEGER)
SELECT MAX(pick__number) FROM table_name_33 WHERE round > 11
How many specialists are at the college with more than 4 bachelor's degrees and more than 26 master's degrees?
CREATE TABLE table_6484 ("College" text,"Bachelor's" real,"Masters" real,"Doctorate" real,"Specialist" real)
SELECT SUM("Specialist") FROM table_6484 WHERE "Bachelor's" > '4' AND "Masters" > '26'
Positive scored questions, with multiple, all-negative answers, no accepted answer.
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 Q.Id AS "post_link", COUNT(*) AS ANum, SUM(CASE WHEN A.Score < 0 THEN 1 ELSE 0 END) AS ANegNum FROM Posts AS Q, Posts AS A WHERE A.ParentId = Q.Id AND Q.Score > 0 AND Q.AcceptedAnswerId IS NULL GROUP BY Q.Id HAVING COUNT(*) = SUM(CASE WHEN A.Score < 0 THEN 1 ELSE 0 END) ORDER BY Q.Id DESC
Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?
CREATE TABLE pitstops (raceid number,driverid number,stop number,lap number,time text,duration text,milliseconds number)CREATE TABLE constructors (constructorid number,constructorref text,name text,nationality text,url text)CREATE TABLE results (resultid number,raceid number,driverid number,constructorid number,number ...
SELECT DISTINCT T1.driverid, T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000
What is catcher Josh Donaldson's pick number?
CREATE TABLE table_name_11 (pick VARCHAR,position VARCHAR,player VARCHAR)
SELECT pick FROM table_name_11 WHERE position = "catcher" AND player = "josh donaldson"
Who did the housemate that nominated Carol Roopali in week 1 nominate in week 8?
CREATE TABLE table_name_52 (week_8 VARCHAR,week_1 VARCHAR)
SELECT week_8 FROM table_name_52 WHERE week_1 = "carol roopali"
Provide the number of patients diagnosed with unspecified acute upper respiratory tract infection who had an ascitic fluid lab test.
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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Acute uri NOS" AND lab.fluid = "Ascites"
Show me the number of all home by all home in a histogram, show total number in ascending order.
CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce...
SELECT All_Home, COUNT(All_Home) FROM basketball_match GROUP BY All_Home ORDER BY COUNT(All_Home)
what is 'diagnosis cost' of svt - without hemodynamic compromise?
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 patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'svt - without hemodynamic compromise')
what is the earliest date for the album that had a catalog number of 3645, was formatted as a cd and was under the luaka bop label?
CREATE TABLE table_55711 ("Region" text,"Date" real,"Label" text,"Format" text,"Catalog" text)
SELECT MIN("Date") FROM table_55711 WHERE "Catalog" = '3645' AND "Format" = 'cd' AND "Label" = 'luaka bop'
What is the cardinal direction of Wednesday p.m. in English?
CREATE TABLE table_6623 ("Cardinal direction" text,"Burmese" text,"Sanskrit" text,"English" text,"Planet" text,"Sign" text)
SELECT "Cardinal direction" FROM table_6623 WHERE "English" = 'wednesday p.m.'
ORDER BY - most recent Posts by CreationDate.
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 CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance te...
SELECT YEAR(CreationDate) AS CreationDateYear, COUNT(*) AS PostsThisYear FROM dbo.Posts WHERE OwnerUserId = 22656 GROUP BY YEAR(CreationDate) ORDER BY YEAR(CreationDate)
What is the lowest number of wins where the losses are more than 12 and the draws are less than 0?
CREATE TABLE table_name_27 (wins INTEGER,losses VARCHAR,draws VARCHAR)
SELECT MIN(wins) FROM table_name_27 WHERE losses > 12 AND draws < 0
compared to last measured on the current intensive care unit visit is the arterial bp mean of patient 18866 less than the value second to last measured on the current 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 patients (row_id number,subject_id number,gender text,dob time...
SELECT (SELECT 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 = 18866) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_i...
What was the earliest year that had a start of Saint-Gaudens and a stage smaller than 15?
CREATE TABLE table_name_56 (year INTEGER,start VARCHAR,stage VARCHAR)
SELECT MIN(year) FROM table_name_56 WHERE start = "saint-gaudens" AND stage < 15
When did channel 83 in singapore launch?
CREATE TABLE table_name_81 (launched VARCHAR,territory VARCHAR,channel VARCHAR)
SELECT launched FROM table_name_81 WHERE territory = "singapore" AND channel = 83
What was the result for the match held in Boston?
CREATE TABLE table_name_97 (result VARCHAR,location VARCHAR)
SELECT result FROM table_name_97 WHERE location = "boston"
Which Bronze is the lowest one that has a Rank of 3, and a Silver smaller than 2?
CREATE TABLE table_74950 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT MIN("Bronze") FROM table_74950 WHERE "Rank" = '3' AND "Silver" < '2'
how many patients were diagnosed with hyperlipidemia within 2 months after being diagnosed with diabetes mellitus?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hyperlipidemia') AS t1 JOIN (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient O...
what is the exit beofre virginia avenue ?
CREATE TABLE table_204_888 (id number,"location" text,"mile" number,"destinations" text,"notes" text)
SELECT "destinations" FROM table_204_888 WHERE id = (SELECT id FROM table_204_888 WHERE "destinations" = 'virginia avenue to us 522 north') - 1
count the number of patients whose primary disease is guillain barre syndrome and age is less than 31?
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 text,icustay_id text,drug_type text,drug text,formulary_drug_cd t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "GUILLAIN BARRE SYNDROME" AND demographic.age < "31"
Tell me the pitcher on september 6, 2006
CREATE TABLE table_name_8 (pitcher VARCHAR,date VARCHAR)
SELECT pitcher FROM table_name_8 WHERE date = "september 6, 2006"
how many patients whose gender is m and primary disease is upper gi bleed?
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 demographic (subject_id text,hadm_id text,name text,marital...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "UPPER GI BLEED"
What is the total number of each fate? Give me the result in a bar graph, display x-axis in descending order.
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)
SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY Fate DESC
Who was the away team when the attendance was 7,891?
CREATE TABLE table_70579 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text)
SELECT "Away team" FROM table_70579 WHERE "Attendance" = '7,891'
What Away Competition had a Result of lost 2-4?
CREATE TABLE table_name_41 (competition VARCHAR,venue VARCHAR,result VARCHAR)
SELECT competition FROM table_name_41 WHERE venue = "away" AND result = "lost 2-4"
list the flights from DALLAS to SAN FRANCISCO on AA
CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,...
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ...
Which DOB has a Surname of cresswell?
CREATE TABLE table_37655 ("Surname" text,"First" text,"D.O.B." text,"Bats" text,"Throws" text,"Position" text)
SELECT "D.O.B." FROM table_37655 WHERE "Surname" = 'cresswell'
What's the title when the genre is drama with a network of KBS2 happening in 2011?
CREATE TABLE table_name_31 (title VARCHAR,year VARCHAR,genre VARCHAR,network VARCHAR)
SELECT title FROM table_name_31 WHERE genre = "drama" AND network = "kbs2" AND year = 2011
Who were the collor commentator(s) for ESPN before 2012?
CREATE TABLE table_4564 ("Year" real,"Network" text,"Play-by-play" text,"Color commentator(s)" text,"Sideline reporter(s)" text)
SELECT "Color commentator(s)" FROM table_4564 WHERE "Year" < '2012' AND "Network" = 'espn'
AA flights from SAN FRANCISCO please
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE city (city_code varchar,city_na...
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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.from_airport...
How many golds for teams ranking below 7 with 3 bronze and less than 5 total medals?
CREATE TABLE table_32699 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT COUNT("Gold") FROM table_32699 WHERE "Bronze" = '3' AND "Rank" > '7' AND "Total" < '5'
Which Award has a nominated, and outstanding choreography?
CREATE TABLE table_name_92 (award VARCHAR,result VARCHAR,category VARCHAR)
SELECT award FROM table_name_92 WHERE result = "nominated" AND category = "outstanding choreography"
which name is before sam falson
CREATE TABLE table_204_866 (id number,"name" text,"lifetime" text,"nationality" text,"notable as" text,"notes" text)
SELECT "name" FROM table_204_866 WHERE id = (SELECT id FROM table_204_866 WHERE "name" = 'sam falson') - 1
Most 20 active users (total actions - posting, commenting and voting). Users who spend A LOT of time posting, editing, commenting and voting.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReview...
SELECT UserId AS "user_link", SUM(c) AS s FROM (SELECT UserId, COUNT(*) AS c FROM PostHistory WHERE UserId > 0 GROUP BY UserId UNION ALL SELECT UserId, COUNT(*) AS c FROM Comments WHERE UserId > 0 GROUP BY UserId UNION ALL SELECT UserId, COUNT(*) AS c FROM Votes WHERE UserId > 0 GROUP BY UserId) AS Actions GROUP BY Use...
where was the first location used in august , 1976 ?
CREATE TABLE table_204_823 (id number,"dates" text,"location" text,"attendance" text,"official guests" text,"notes" text)
SELECT "location" FROM table_204_823 WHERE "dates" = 1976 AND "dates" = 8
Which HQ is associated with a number of employees of 100?
CREATE TABLE table_name_23 (headquarters VARCHAR,employees__world_ VARCHAR)
SELECT headquarters FROM table_name_23 WHERE employees__world_ = 100
Find the number of web accelerators used for each Operating system.
CREATE TABLE web_client_accelerator (id number,name text,operating_system text,client text,connection text)CREATE TABLE browser (id number,name text,market_share number)CREATE TABLE accelerator_compatible_browser (accelerator_id number,browser_id number,compatible_since_year number)
SELECT operating_system, COUNT(*) FROM web_client_accelerator GROUP BY operating_system
What is the Time/Retired for the BMW Sauber, and Nick Heidfeld?
CREATE TABLE table_38023 ("Driver" text,"Constructor" text,"Laps" text,"Time/Retired" text,"Grid" text)
SELECT "Time/Retired" FROM table_38023 WHERE "Constructor" = 'bmw sauber' AND "Driver" = 'nick heidfeld'
Which NFL team chose a position of DE when the pick was larger than 9, after round 5, and the overal was larger than 118?
CREATE TABLE table_name_91 (nfl_team VARCHAR,position VARCHAR,round VARCHAR,overall VARCHAR,pick VARCHAR)
SELECT nfl_team FROM table_name_91 WHERE overall > 118 AND pick > 9 AND round > 5 AND position = "de"
Who was the away team when the Tie no was 34?
CREATE TABLE table_51009 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text)
SELECT "Away team" FROM table_51009 WHERE "Tie no" = '34'
Network of nbc is what digital channel?
CREATE TABLE table_75032 ("Call sign" text,"Analog channel" text,"Digital channel" text,"Virtual channel" text,"Network" text,"Station Ownership" text)
SELECT "Digital channel" FROM table_75032 WHERE "Network" = 'nbc'
For those records from the products and each product's manufacturer, show me about the correlation between price and code , and group by attribute founder in a scatter chart.
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)
SELECT T1.Price, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
when was the first time that since 164 months ago patient 95909 was prescribed a medication via pr?
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE patients (...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95909) AND prescriptions.route = 'pr' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-164 month') ORDER BY prescriptions.startdate LIMIT 1
What was Arnold Palmer's score in the tournamnet?
CREATE TABLE table_71584 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (US$)" real)
SELECT "Score" FROM table_71584 WHERE "Player" = 'arnold palmer'
Posts Since The Mess Started.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE CloseAsOffTopicReasonTyp...
SELECT COUNT(*) FROM Posts AS p WHERE p.CreationDate >= '2019-09-05'
How many different part 3 verbs are there that mean to freeze?
CREATE TABLE table_21708 ("Class" text,"Part 1" text,"Part 2" text,"Part 3" text,"Part 4" text,"Verb meaning" text)
SELECT COUNT("Part 3") FROM table_21708 WHERE "Verb meaning" = 'to freeze'
What is the official name of the municipality whose name in Spanish is Crip n?
CREATE TABLE table_300283_1 (official_name VARCHAR,name_in_spanish VARCHAR)
SELECT official_name FROM table_300283_1 WHERE name_in_spanish = "Cripán"
What is the July 1, 2011 density if the July 1, 2010 official estimate is 800,482?
CREATE TABLE table_59595 ("Rank" text,"County" text,"State" text,"Land area (km\u00b2)" text,"Land area (mi\u00b2)" text,"April 1,2010 census" text,"April 1,2010 density (/km\u00b2)" text,"April 1,2010 density (/mi\u00b2)" text,"July 1,2010 official estimate" text,"July 1,2010 density (/km\u00b2)" text,"July 1,2010 den...
SELECT "July 1, 2011 density (/mi\u00b2)" FROM table_59595 WHERE "July 1, 2010 official estimate" = '800,482'
How many different colleges were represented at tryouts?
CREATE TABLE tryout (pid number,cname text,ppos text,decision text)CREATE TABLE college (cname text,state text,enr number)CREATE TABLE player (pid number,pname text,ycard text,hs number)
SELECT COUNT(DISTINCT cname) FROM tryout
If I want to declare a major in GREEKMOD , what classes do I need to take ?
CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits var...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%GREEKMOD%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
display the average salary of employees for each department who gets a commission percentage.
CREATE TABLE countries (country_id text,country_name text,region_id number)CREATE TABLE locations (location_id number,street_address text,postal_code text,city text,state_province text,country_id text)CREATE TABLE regions (region_id number,region_name text)CREATE TABLE employees (employee_id number,first_name text,last...
SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> "null" GROUP BY department_id
What is Date of Appointment, when Outgoing Manager is 'Giray Bulak'?
CREATE TABLE table_name_69 (date_of_appointment VARCHAR,outgoing_manager VARCHAR)
SELECT date_of_appointment FROM table_name_69 WHERE outgoing_manager = "giray bulak"
What is largest series number for the episode that aired February 16, 1957?
CREATE TABLE table_25800134_1 (series__number INTEGER,airdate VARCHAR)
SELECT MAX(series__number) FROM table_25800134_1 WHERE airdate = "February 16, 1957"
Name the least other for league cup less than 0, FA cup more than 0 and league of 2 with total less than 14
CREATE TABLE table_15724 ("Name" text,"League" real,"FA Cup" real,"League Cup" real,"Other" real,"Total" real)
SELECT MIN("Other") FROM table_15724 WHERE "Total" < '14' AND "League" = '2' AND "FA Cup" > '0' AND "League Cup" < '0'
what is the to par when the place is t10 and the score is 72-74-71-69=286?
CREATE TABLE table_name_26 (to_par VARCHAR,place VARCHAR,score VARCHAR)
SELECT to_par FROM table_name_26 WHERE place = "t10" AND score = 72 - 74 - 71 - 69 = 286
how many married patients were admitted to hospital before 2195?
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 WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2195"
What record has magomedkhan gamzatkhanov as the opponent, and submission as the method?
CREATE TABLE table_name_59 (record VARCHAR,opponent VARCHAR,method VARCHAR)
SELECT record FROM table_name_59 WHERE opponent = "magomedkhan gamzatkhanov" AND method = "submission"
subjects with dementia must have moderate / severe dementia as preferentially defined by a documented moca score of less than 17 , or by mmse score of less than 17, within the last 12 months
CREATE TABLE table_train_144 ("id" int,"retinal_dystrophy" bool,"mini_mental_state_examination_mmse" int,"memory_box" float,"body_weight" float,"neutrophil_count" int,"moca_score" int,"severe_dementia" bool,"dementia" bool,"macular_degeneration" bool,"diabetic_retinopathy" bool,"retinal_disease" bool,"moderate_dementia...
SELECT * FROM table_train_144 WHERE dementia = 1 AND (moderate_dementia = 1 OR severe_dementia = 1) OR (moca_score < 17 OR mini_mental_state_examination_mmse < 17)
Which flight had an aircraft of vickers viscount type 794?
CREATE TABLE table_name_26 (flight VARCHAR,aircraft VARCHAR)
SELECT flight FROM table_name_26 WHERE aircraft = "vickers viscount type 794"
What is Cha Bum-Kun's average number of goals per match?
CREATE TABLE table_name_12 (goals_per_match VARCHAR,name VARCHAR)
SELECT COUNT(goals_per_match) FROM table_name_12 WHERE name = "cha bum-kun"
How many league apps in the season with more than 2 cup goals and more than 6 cup apps?
CREATE TABLE table_32376 ("Season" text,"Team" text,"League Apps" real,"League Goals" real,"Cup Apps" real,"Cup Goals" real)
SELECT SUM("League Apps") FROM table_32376 WHERE "Cup Goals" > '2' AND "Cup Apps" > '6'
Which of the classes do n't have lab sessions ?
CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE program_course (program_id int,cour...
SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N'
count how many medications patient 31260 has been prescribed in 08/last year.
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE diagnoses_icd (row_id number,subject_id...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31260) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '08'
What's team #2 in the round where team $1 is Ilisiakos?
CREATE TABLE table_19130829_4 (team__number2 VARCHAR,team__number1 VARCHAR)
SELECT team__number2 FROM table_19130829_4 WHERE team__number1 = "Ilisiakos"
How many schools did Mike Jones attend?
CREATE TABLE table_17062 ("Player" text,"Position" text,"School" text,"Hometown" text,"MLB Draft" text)
SELECT COUNT("School") FROM table_17062 WHERE "Player" = 'Mike Jones'
Take the first name of all the good customers as the X-axis and gender of all the good customers as Y-axis in a bar chart, list by the Y in asc.
CREATE TABLE Bookings (booking_id INTEGER,customer_id INTEGER,booking_status_code VARCHAR(10),returned_damaged_yn VARCHAR(40),booking_start_date DATETIME,booking_end_date DATETIME,count_hired VARCHAR(40),amount_payable DECIMAL(19,4),amount_of_discount DECIMAL(19,4),amount_outstanding DECIMAL(19,4),amount_of_refund DECI...
SELECT first_name, gender_mf FROM Customers WHERE good_or_bad_customer = 'good' ORDER BY gender_mf
What is the highest position of the team with an against of 12, less than 11 points, more than 2 drawn, and more than 9 played?
CREATE TABLE table_39123 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT MAX("Position") FROM table_39123 WHERE "Against" = '12' AND "Points" < '11' AND "Drawn" > '2' AND "Played" > '9'
what was the first time that patient 016-9636 had a minimum sao2 today?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiasto...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND NOT vitalperiodic.sao2 IS NULL AND ...
What's the season number of the episode with series number 84?
CREATE TABLE table_2589 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text)
SELECT MIN("No. in season") FROM table_2589 WHERE "No. in series" = '84'
What category was in 1964?
CREATE TABLE table_name_14 (category VARCHAR,year VARCHAR)
SELECT category FROM table_name_14 WHERE year = 1964
when did patient 51858 receive his/her last prescription for felodipine since 12/2105?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)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 inputevents_cv (row_...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858) AND prescriptions.drug = 'felodipine' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-12' ORDER BY prescriptions.startdate DESC LIMIT 1
please show me all the flights from DENVER to OAKLAND that are nonstop
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_s...
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAN...
Who was the aggressive rider when the winner was luis le n s nchez?
CREATE TABLE table_25580292_13 (aggressive_rider VARCHAR,winner VARCHAR)
SELECT aggressive_rider FROM table_25580292_13 WHERE winner = "Luis León Sánchez"
what was patient 004-87703 last diagnosis time of respiratory acidosis during this year.
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE cost (cos...
SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-87703')) AND diagnosis.diagnosisname = 'respiratory acidosis'...
Where was the game held when the home team scored 12.21 (93)?
CREATE TABLE table_58049 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Venue" FROM table_58049 WHERE "Home team score" = '12.21 (93)'
What is the total of rank when gold is 2 and total is more than 4?
CREATE TABLE table_40680 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT SUM("Rank") FROM table_40680 WHERE "Gold" = '2' AND "Total" > '4'
What is the Position of the player with a Height off 188cm?
CREATE TABLE table_name_7 (position VARCHAR,height VARCHAR)
SELECT position FROM table_name_7 WHERE height = "188cm"
What language is spoken after 2007 for the role of urvashi mathur?
CREATE TABLE table_name_56 (language VARCHAR,year VARCHAR,role VARCHAR)
SELECT language FROM table_name_56 WHERE year > 2007 AND role = "urvashi mathur"
what's the week where attendance is 77,098
CREATE TABLE table_227 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff [a ]" text,"Game site" text,"TV" text,"Attendance" text,"Record" text)
SELECT "Week" FROM table_227 WHERE "Attendance" = '77,098'
Which Team/Chassis has a Year larger than 1987?
CREATE TABLE table_name_46 (team_chassis VARCHAR,year INTEGER)
SELECT team_chassis FROM table_name_46 WHERE year > 1987
what was the name of the organism found on the last urine, voided specimen microbiology test of patient 031-24513 in 03/2104?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,cellla...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND microlab.culturesite = 'urine, voided specimen' AND STRF...
How many freedom indices does the country of Austria have?
CREATE TABLE table_1416 ("Country" text,"Freedom in the World 2013" text,"2013 Index of Economic Freedom" text,"2013 Press Freedom Index" text,"2012 Democracy Index" text)
SELECT COUNT("2013 Press Freedom Index") FROM table_1416 WHERE "Country" = 'Austria'