instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
How many episodes had a production code of 5m13?
CREATE TABLE table_20967430_4 (ep VARCHAR,prod_code VARCHAR)
SELECT COUNT(ep) FROM table_20967430_4 WHERE prod_code = "5M13"
A user comments on a specific tag.
CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoR...
SELECT Comments.Id AS "comment_link" FROM Comments INNER JOIN Posts ON Comments.PostId = Posts.Id WHERE Tags LIKE '%##Tag##%' AND UserId = '##UesrId##'
Which Shooting Score (pts) has a Total larger than 5464 and a Athlete of heather fell ( gbr )?
CREATE TABLE table_65456 ("Athlete" text,"Shooting Score (pts)" text,"Fencing Victories (pts)" text,"Swimming Time (pts)" text,"Equestrian Time (pts)" text,"Running Time (pts)" text,"Total" real)
SELECT "Shooting Score (pts)" FROM table_65456 WHERE "Total" > '5464' AND "Athlete" = 'heather fell ( gbr )'
Show the average price of each film in a bar chart, sort in desc by the total number.
CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Location text)CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price...
SELECT Title, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Title ORDER BY AVG(Price) DESC
Who did they play when the score was 95-118?
CREATE TABLE table_name_63 (opponent VARCHAR,score VARCHAR)
SELECT opponent FROM table_name_63 WHERE score = "95-118"
What was the score for game number 30?
CREATE TABLE table_34874 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location" text,"Record" text)
SELECT "Score" FROM table_34874 WHERE "Game" = '30'
how many patients are discharged to home health care?
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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE"
Show a bar graph, the data is those times of trains that run through stations for the local authority Chiltern, and the Y axis is the total number of different times, and I want to sort by the X from high to low.
CREATE TABLE route (train_id int,station_id int)CREATE TABLE station (id int,network_name text,services text,local_authority text)CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,low_temperature int,precipitation real,wind_speed_mph int)CREATE TABLE train (id int,train_number int,name t...
SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY time DESC
How many draws were there with goals against that did not qualify for UEFA competitions?
CREATE TABLE table_name_56 (drew VARCHAR,goals_against VARCHAR)
SELECT drew FROM table_name_56 WHERE goals_against = "did not qualify for uefa competitions"
what is the pricing for ziprasidone hydrochloride?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type t...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'ziprasidone hydrochloride')
did patient 57023 have any organisms on the first blood culture ( myco/f lytic bottle) microbiology test last month?
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 d_labitems (row_id number,itemid number,label text)CREATE TABL...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 57023) AND microbiologyevents.spec_type_desc = 'blood culture ( myco/f lytic bottle)' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.chart...
tell me the writer of production code ad1d09.
CREATE TABLE table_51868 ("Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text)
SELECT "Written by" FROM table_51868 WHERE "Production code" = 'ad1d09'
Bob Johnson plays for which AFL team?
CREATE TABLE table_12165999_1 (afl_team VARCHAR,player VARCHAR)
SELECT afl_team FROM table_12165999_1 WHERE player = "Bob Johnson"
Give me the descriptions of the service types that cost more than 100, and count them by a bar chart, and sort by the total number from high to low.
CREATE TABLE Stores (Store_ID VARCHAR(100),Address_ID INTEGER,Marketing_Region_Code CHAR(15),Store_Name VARCHAR(255),Store_Phone VARCHAR(255),Store_Email_Address VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Clients (Client_ID INTEGER,Address_ID INTEGER,Customer_Email_Address VARCHAR(255),Customer_Name VARCHAR(2...
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description ORDER BY COUNT(Service_Type_Description) DESC
Votes per Question or Answer.
CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId 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 numb...
SELECT v1.CreationDate, (SELECT COUNT(*) FROM Votes AS v2 WHERE v2.CreationDate = v1.CreationDate) / (SELECT COUNT(*) FROM Posts AS p WHERE DATE(p.CreationDate) = v1.CreationDate) AS VotesPerPost FROM Votes AS v1 GROUP BY v1.CreationDate ORDER BY v1.CreationDate
What is the player that played in 2004-05?
CREATE TABLE table_16849 ("Player" text,"No." real,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text)
SELECT "Player" FROM table_16849 WHERE "Years for Jazz" = '2004-05'
Who was the home team when the VFL played Arden Street Oval?
CREATE TABLE table_name_6 (home_team VARCHAR,venue VARCHAR)
SELECT home_team FROM table_name_6 WHERE venue = "arden street oval"
what's the position where player is williams, bernie bernie williams
CREATE TABLE table_11734041_20 (position VARCHAR,player VARCHAR)
SELECT position FROM table_11734041_20 WHERE player = "Williams, Bernie Bernie Williams"
There are 5 imports of plywood.
CREATE TABLE table_12077540_1 (import VARCHAR,product VARCHAR)
SELECT import FROM table_12077540_1 WHERE product = "Plywood"
What score has 7-0 as the result?
CREATE TABLE table_name_56 (score VARCHAR,result VARCHAR)
SELECT score FROM table_name_56 WHERE result = "7-0"
what is the length of each species listed ?
CREATE TABLE table_204_358 (id number,"species" text,"common name" text,"ncbi accession #" text,"ncbi name" text,"length" text,"sequence identity" text,"sequence similarity" text,"years since divergence from human (mya)" number)
SELECT "length" FROM table_204_358
Which Order has a Nationality of ese milan?
CREATE TABLE table_name_68 (order VARCHAR,nationality VARCHAR)
SELECT order FROM table_name_68 WHERE nationality = "ese milan"
How many different advisors are listed?
CREATE TABLE has_allergy (stuid number,allergy text)CREATE TABLE allergy_type (allergy text,allergytype text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)
SELECT COUNT(DISTINCT advisor) FROM student
List all payment methods and number of payments using each payment methods by a bar chart, show by the Y-axis in descending.
CREATE TABLE Customer_Payments (customer_id INTEGER,datetime_payment DATETIME,payment_method_code VARCHAR(10),amount_payment DOUBLE)CREATE TABLE Vehicles (vehicle_id INTEGER,vehicle_details VARCHAR(255))CREATE TABLE Customers (customer_id INTEGER,customer_address_id INTEGER,customer_status_code VARCHAR(15),date_became_...
SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code ORDER BY COUNT(*) DESC
How many eliminations did each team have?
CREATE TABLE elimination (elimination_id text,wrestler_id text,team text,eliminated_by text,elimination_move text,time text)CREATE TABLE wrestler (wrestler_id number,name text,reign text,days_held text,location text,event text)
SELECT team, COUNT(*) FROM elimination GROUP BY team
tell me the time of hospital admission of patient 012-68650 until 2104?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayi...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '012-68650' AND STRFTIME('%y', patient.hospitaladmittime) <= '2104'
Where the week # is Top 12, what is the result?
CREATE TABLE table_26250253_1 (result VARCHAR,week__number VARCHAR)
SELECT result FROM table_26250253_1 WHERE week__number = "Top 12"
What is the position of the player with a Pick # of 108?
CREATE TABLE table_name_18 (position VARCHAR,pick__number VARCHAR)
SELECT position FROM table_name_18 WHERE pick__number = "108"
Who is the home captain that played at Edgbaston?
CREATE TABLE table_67707 ("Date" text,"Home captain" text,"Away captain" text,"Venue" text,"Result" text)
SELECT "Home captain" FROM table_67707 WHERE "Venue" = 'edgbaston'
how many records has harmon harmon held ?
CREATE TABLE table_204_550 (id number,"event" text,"record" text,"athlete" text,"date" text,"meet" text,"place" text)
SELECT COUNT("record") FROM table_204_550 WHERE "athlete" = 'harmon harmon'
How much Against has Losses smaller than 7, and a Wimmera FL of horsham?
CREATE TABLE table_name_66 (against INTEGER,losses VARCHAR,wimmera_fl VARCHAR)
SELECT SUM(against) FROM table_name_66 WHERE losses < 7 AND wimmera_fl = "horsham"
On what date was a record from Village Records with catalog VRCL-2205 released?
CREATE TABLE table_name_5 (date VARCHAR,label VARCHAR,catalog VARCHAR)
SELECT date FROM table_name_5 WHERE label = "village records" AND catalog = "vrcl-2205"
When 5th, south western district 2 is the mens 2nd xi what is the season?
CREATE TABLE table_24480 ("Season" text,"Mens 1st XI" text,"Mens 2nd XI" text,"Mens 3rd XI" text,"Ladies 1st XI" text)
SELECT "Season" FROM table_24480 WHERE "Mens 2nd XI" = '5th, South Western District 2'
What's the score at the October 30, 1996 1998 fifa world cup qualification with a result of win?
CREATE TABLE table_name_58 (score VARCHAR,date VARCHAR,result VARCHAR,competition VARCHAR)
SELECT score FROM table_name_58 WHERE result = "win" AND competition = "1998 fifa world cup qualification" AND date = "october 30, 1996"
when was the first time this year that patient 49141 was diagnosed with chronic cholecystitis?
CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)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 nu...
SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chronic cholecystitis') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 49141) AND DATETIME(...
what was the earliest film released ?
CREATE TABLE table_204_228 (id number,"year" number,"title" text,"credit" text,"role" text,"notes" text)
SELECT "title" FROM table_204_228 ORDER BY "year" LIMIT 1
which of the 11 districts has the highest population density ?
CREATE TABLE table_203_212 (id number,"#" number,"district" text,"land area (km2)" number,"population\n(2010 census)" number,"density (persons/km2)" number)
SELECT "district" FROM table_203_212 ORDER BY "density (persons/km2)" DESC LIMIT 1
When was the game played in which the record was 46-29?
CREATE TABLE table_15560 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT "Date" FROM table_15560 WHERE "Record" = '46-29'
Which Total has a Name of alex mcleish category:articles with hcards, and a League smaller than 494?
CREATE TABLE table_name_25 (total INTEGER,name VARCHAR,league VARCHAR)
SELECT AVG(total) FROM table_name_25 WHERE name = "alex mcleish category:articles with hcards" AND league < 494
What is the guardian m t k for the guardian whose consort is Sv h ?
CREATE TABLE table_15899 ("Name" text,"Direction" text,"Mantra" text,"Weapon" text,"Consort" text,"Graha (Planet)" text,"Guardian M\u0101t\u1e5bk\u0101" text)
SELECT "Guardian M\u0101t\u1e5bk\u0101" FROM table_15899 WHERE "Consort" = 'Svāhā'
Give me the comparison about the sum of School_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, display from low to high by the X-axis.
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 ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road
What Round has h/a hurst
CREATE TABLE table_name_26 (round VARCHAR,h___a VARCHAR)
SELECT round FROM table_name_26 WHERE h___a = "hurst"
What surface did hayley ericksen play on?
CREATE TABLE table_name_85 (surface VARCHAR,partner VARCHAR)
SELECT surface FROM table_name_85 WHERE partner = "hayley ericksen"
For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarter and the sum of manufacturer , and group by attribute headquarter, and display Headquarter from high to low order please.
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 Headquarter, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, find phone_number and department_id , and visualize them by a bar chart, I want to show in desc by the x axis.
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),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0)...
SELECT PHONE_NUMBER, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
how many number of teams played altogether ?
CREATE TABLE table_203_200 (id number,"region" text,"seed" number,"team" text,"coach" text,"finished" text,"final opponent" text,"score" text)
SELECT COUNT("team") FROM table_203_200
What issue was the Spoofed Title of the crockford files in?
CREATE TABLE table_42831 ("Spoofed Title" text,"Actual Title" text,"Writer" text,"Artist" text,"Issue" real,"Date" text)
SELECT "Issue" FROM table_42831 WHERE "Spoofed Title" = 'the crockford files'
What is the maximum production code of an episode written by Patty Lin?
CREATE TABLE table_27714985_1 (production_code_s_ INTEGER,written_by VARCHAR)
SELECT MAX(production_code_s_) FROM table_27714985_1 WHERE written_by = "Patty Lin"
what is the total number of hours since patient 97395 was admitted to hospital?
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 97395 AND admissions.dischtime IS NULL
What was the winning score on Aug 21, 1977?
CREATE TABLE table_name_92 (winning_score VARCHAR,date VARCHAR)
SELECT winning_score FROM table_name_92 WHERE date = "aug 21, 1977"
what region was on the label sirup ?
CREATE TABLE table_204_966 (id number,"region" text,"date" text,"label" text,"format" text,"catalog" text)
SELECT "region" FROM table_204_966 WHERE "label" = 'sirup'
What Elimination Move is listed against Wrestler Henry, Eliminated by Batista?
CREATE TABLE table_79068 ("Elimination" text,"Wrestler" text,"Team" text,"Eliminated by" text,"Elimination Move" text,"Time" text)
SELECT "Elimination Move" FROM table_79068 WHERE "Eliminated by" = 'batista' AND "Wrestler" = 'henry'
What is the name of the member country that has a Population of 1,341,664?
CREATE TABLE table_71306 ("Member countries" text,"Population" text,"Area (km\u00b2)" text,"GDP (billion US$)" text,"GDP per capita (US$)" text)
SELECT "Member countries" FROM table_71306 WHERE "Population" = '1,341,664'
what is the highest grid when the time/retired is fuel pump and the laps is more than 26?
CREATE TABLE table_10668 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT MAX("Grid") FROM table_10668 WHERE "Time/Retired" = 'fuel pump' AND "Laps" > '26'
Name the high rebounds for january 14
CREATE TABLE table_29930 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High rebounds" FROM table_29930 WHERE "Date" = 'January 14'
Find meter_200 and the amount of meter_200 , and group by attribute meter_200, and visualize them by a bar chart, and rank by the x-axis in descending please.
CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadiu...
SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC
what was the name of the prescription drug that patient 005-48105 was prescribed first in this month?
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 vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-48105')) AND DATETIME(medication.drugstarttime, 'start of month...
What is the color of the planet venus?
CREATE TABLE table_22147 ("English name" text,"Thai name" text,"Transcription" text,"Color" text,"Sanskrit word" text,"Planet" text)
SELECT "Color" FROM table_22147 WHERE "Planet" = 'Venus'
What is the result for the best orchestrations category?
CREATE TABLE table_name_98 (result VARCHAR,category VARCHAR)
SELECT result FROM table_name_98 WHERE category = "best orchestrations"
What is the least entry for game if the score is 1-0?
CREATE TABLE table_74130 ("Game" real,"November" real,"Opponent" text,"Score" text,"Location/Attendance" text,"Record" text,"Points" real)
SELECT MIN("Game") FROM table_74130 WHERE "Score" = '1-0'
Total bad questions, good questions, and total questions..
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,Ema...
SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 1
when was patient 016-18575 admitted to the hospital first via the step-down unit (sdu) since 2105?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayi...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '016-18575' AND patient.hospitaladmitsource = 'step-down unit (sdu)' AND STRFTIME('%y', patient.hospitaladmittime) >= '2105' ORDER BY patient.hospitaladmittime LIMIT 1
How many games played for teams with 277 points?
CREATE TABLE table_20099 ("Club" text,"Played" text,"Won" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Points difference" text,"Tries For" text,"Tries Against" text,"Try Bonus" text,"Losing Bonus" text,"Points" text)
SELECT "Played" FROM table_20099 WHERE "Points for" = '277'
what is the school when the location is rochester?
CREATE TABLE table_64074 ("School" text,"Location" text,"Mascot" text,"County" text,"Year Joined" text,"Previous Conference" text,"Year Left" text)
SELECT "School" FROM table_64074 WHERE "Location" = 'rochester'
Before 2012, which Group has the Result, nominated, the Film/Show, East West 101, and the Award, Best Lead Actor in A Television Drama?
CREATE TABLE table_68096 ("Year" real,"Group" text,"Award" text,"Film/Show" text,"Result" text)
SELECT "Group" FROM table_68096 WHERE "Result" = 'nominated' AND "Year" < '2012' AND "Film/Show" = 'east west 101' AND "Award" = 'best lead actor in a television drama'
What was the maximum speed of the car with 1.556 cc capacity?
CREATE TABLE table_name_45 (vmax VARCHAR,capacity VARCHAR)
SELECT vmax FROM table_name_45 WHERE capacity = "1.556 cc"
how much does it cost vancocin.
CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'vancocin')
What's the participle when the verbal noun is i-bil-tze?
CREATE TABLE table_12784134_1 (participle VARCHAR,verbal_noun VARCHAR)
SELECT participle FROM table_12784134_1 WHERE verbal_noun = "i-bil-tze"
What Position has no College Hall of Fame?
CREATE TABLE table_name_48 (position VARCHAR,college_hall_of_fame VARCHAR)
SELECT position FROM table_name_48 WHERE college_hall_of_fame = "no"
when was the school/club team for grizzles was maryland
CREATE TABLE table_16494599_5 (years_for_grizzlies VARCHAR,school_club_team VARCHAR)
SELECT years_for_grizzlies FROM table_16494599_5 WHERE school_club_team = "Maryland"
How many FA Trophies had a total of 27, 2 FA cups, and a league larger than 24?
CREATE TABLE table_6934 ("Player" text,"Club" text,"League" real,"FA Cup" real,"FA Trophy" real,"League Cup" real,"Total" real)
SELECT SUM("FA Trophy") FROM table_6934 WHERE "Total" = '27' AND "FA Cup" = '2' AND "League" > '24'
How many institutions are located in wilmore, kentucky and private
CREATE TABLE table_16198 ("Institution" text,"Nickname" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real)
SELECT MAX("Founded") FROM table_16198 WHERE "Type" = 'Private' AND "Location" = 'Wilmore, Kentucky'
Because it's NOT AN ACRONYM.
CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNot...
SELECT * FROM Posts WHERE CONCAT(Title, Body) COLLATE SQL_Latin1_General_CP1_CS_AS LIKE '%SCRUM%' AND ClosedDate IS NULL
How many times is the formula tl 2 ba 2 cuo 6?
CREATE TABLE table_101336_1 (no_of_cu_o_planes_in_unit_cell VARCHAR,formula VARCHAR)
SELECT no_of_cu_o_planes_in_unit_cell FROM table_101336_1 WHERE formula = "Tl 2 Ba 2 CuO 6"
How many U.S. viewers in millions watched the episode titled 'The Truth About Dads and Moms'?
CREATE TABLE table_29504 ("No." real,"Title" text,"Directed by" text,"Written by" text,"U.S. viewers (million)" text,"Original air date" text,"Production code" text)
SELECT COUNT("U.S. viewers (million)") FROM table_29504 WHERE "Title" = 'The Truth About Dads and Moms'
What's the score when the tie number was 6?
CREATE TABLE table_name_35 (score VARCHAR,tie_no VARCHAR)
SELECT score FROM table_name_35 WHERE tie_no = "6"
What is the total medal count when there are more than 1 gold and more than 2 silver medals won and the rank is less than 1?
CREATE TABLE table_name_15 (total VARCHAR,rank VARCHAR,gold VARCHAR,silver VARCHAR)
SELECT total FROM table_name_15 WHERE gold > 1 AND silver > 2 AND rank < 2
What year was the runner-up Portugal with Italy in third place, and the gold keeper Nuno Hidalgo?
CREATE TABLE table_name_5 (year INTEGER,best_goalkeeper VARCHAR,runner_up VARCHAR,third_place VARCHAR)
SELECT AVG(year) FROM table_name_5 WHERE runner_up = "portugal" AND third_place = "italy" AND best_goalkeeper = "nuno hidalgo"
Who won the stage when Fumiyuki Beppu won the combativity award?
CREATE TABLE table_14395920_2 (winner VARCHAR,combativity_award VARCHAR)
SELECT winner FROM table_14395920_2 WHERE combativity_award = "Fumiyuki Beppu"
What is the overall pick average with the pick # lower than 15?
CREATE TABLE table_69557 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text)
SELECT AVG("Overall") FROM table_69557 WHERE "Pick #" < '15'
Bar chart x axis duration y axis how many duration, and rank by the y-axis in descending.
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 COUNT(Duration) DESC
What are the dates when customers with ids between 10 and 20 became customers, and count them by a bar chart, and I want to rank y-axis in ascending order.
CREATE TABLE Products (product_id INTEGER,product_details VARCHAR(255))CREATE TABLE Customers (customer_id INTEGER,payment_method VARCHAR(15),customer_name VARCHAR(80),date_became_customer DATETIME,other_customer_details VARCHAR(255))CREATE TABLE Customer_Contact_Channels (customer_id INTEGER,channel_code VARCHAR(15),a...
SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 ORDER BY COUNT(date_became_customer)
What is the mission that has ambassador of local position, and a resident country of democratic republic of congo?
CREATE TABLE table_name_35 (mission VARCHAR,local_position VARCHAR,resident_country VARCHAR)
SELECT mission FROM table_name_35 WHERE local_position = "ambassador" AND resident_country = "democratic republic of congo"
how many patients diagnosed with short title sec neuroendo tumor-bone have blood gas lab test category?
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,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
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 = "Sec neuroendo tumor-bone" AND lab."CATEGORY" = "Blood Gas"
during this hospital encounter what was the first ward id of patient 40059?
CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)C...
SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40059 AND admissions.dischtime IS NULL) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime LIMIT 1
Who was the Centerfold Model on 5-95?
CREATE TABLE table_41516 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text)
SELECT "Centerfold model" FROM table_41516 WHERE "Date" = '5-95'
For those employees who did not have any job in the past, draw a scatter chart about the correlation between employee_id and commission_pct .
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUM...
SELECT EMPLOYEE_ID, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
WHAT IS THE TOTAL WITH WARD LARGER THAN 60?
CREATE TABLE table_9964 ("Party" text,"Ward" real,"PR top-up" real,"Total" real,"Percentage" text)
SELECT MIN("Total") FROM table_9964 WHERE "Ward" > '60'
What is the country of origin of the artist who is female and produced a song in Bangla?
CREATE TABLE artist (country VARCHAR,artist_name VARCHAR,gender VARCHAR)CREATE TABLE song (artist_name VARCHAR,languages VARCHAR)
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla"
give me the top four most common diagnoses since 5 years ago?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,c...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-5 year') GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 4
Name the average 2008 for beijing and 2005 more than 2
CREATE TABLE table_56914 ("Year" text,"2010" real,"2009" real,"2008" real,"2005" real,"2000" real)
SELECT AVG("2008") FROM table_56914 WHERE "Year" = 'beijing' AND "2005" > '2'
how many times is psycho clown the winner ?
CREATE TABLE table_204_212 (id number,"wager" text,"winner" text,"loser" text,"location" text,"date" text,"notes" text)
SELECT COUNT(*) FROM table_204_212 WHERE "winner" = 'psycho clown'
What are the lowest number of points with a Year of 1978, and a Chassis of ensign n177?
CREATE TABLE table_name_15 (points INTEGER,year VARCHAR,chassis VARCHAR)
SELECT MIN(points) FROM table_name_15 WHERE year = 1978 AND chassis = "ensign n177"
When is an Opponent of evie dominikovic?
CREATE TABLE table_74964 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text)
SELECT "Date" FROM table_74964 WHERE "Opponent" = 'evie dominikovic'
Find the number of students for the cities where have more than one student.
CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Has_amenity (dormi...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code
What is the crowd number for the event that has a score of 8.25 (73) for the Away team?
CREATE TABLE table_57640 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT COUNT("Crowd") FROM table_57640 WHERE "Away team score" = '8.25 (73)'
show me all flights from BOSTON to ATLANTA which leave ATLANTA after 1200 tomorrow
CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE air...
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, date_day, days, flight WHERE ((date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
What is the rice amount when the potato amount is 79?
CREATE TABLE table_4507 ("STAPLE:" text,"Maize / Corn [A ]" text,"Rice [B ]" text,"Wheat [C ]" text,"Potato [D ]" text,"Cassava [E ]" text,"Soybean (Green) [F ]" text,"Sweet potato [G ]" text,"Yam [Y ]" text)
SELECT "Rice [B ]" FROM table_4507 WHERE "Potato [D ]" = '79'
what is the number of patients whose primary disease is left internal jugular vein thrombosis;left arm edema and days of hospital stay is greater than 29?
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 = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" AND demographic.days_stay > "29"
Jon Skeet answers per month.
CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionD...
WITH answersWITHMonth AS (SELECT p.OwnerUserId, DATEADD(month, DATEDIFF(month, 0, creationDate), 0) AS month FROM Posts AS p WHERE PostTypeId = 2) SELECT a.month, COUNT(*) FROM answersWITHMonth AS a INNER JOIN Users AS u ON u.Id = a.OwnerUserId WHERE u.Id = 22656 GROUP BY a.month ORDER BY a.month