instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
How many results are there when the game was at the Atlanta-Fulton county stadium?
CREATE TABLE table_17848578_1 (result VARCHAR,game_site VARCHAR)
SELECT COUNT(result) FROM table_17848578_1 WHERE game_site = "Atlanta-Fulton County Stadium"
Where did they finish in the season when when they won $491,977?
CREATE TABLE table_2649597_1 (season_rank VARCHAR,winnings VARCHAR)
SELECT season_rank FROM table_2649597_1 WHERE winnings = "$491,977"
what's the name of the procedure that patient 90369 was given two or more times until 54 months ago?
CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,h...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 903...
What was the run 3 for the team with a run 1 of 1:17.6?
CREATE TABLE table_name_40 (run_3 VARCHAR,run_1 VARCHAR)
SELECT run_3 FROM table_name_40 WHERE run_1 = "1:17.6"
Who won womens doubles the year magn s ingi helgason tinna helgad ttir won mixed doubles and ragna ing lfsd ttir won womens singles in 2010
CREATE TABLE table_19677 ("Year" real,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text)
SELECT "Womens doubles" FROM table_19677 WHERE "Mixed doubles" = 'Magnús Ingi Helgason Tinna Helgadóttir' AND "Womens singles" = 'Ragna Ingólfsdóttir' AND "Year" = '2010'
what is procedure short title of subject id 76446?
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 procedures.short_title FROM procedures WHERE procedures.subject_id = "76446"
How many locations? Draw a bar chart, and list by the X-axis in ascending.
CREATE TABLE train_station (Train_ID int,Station_ID int)CREATE TABLE train (Train_ID int,Name text,Time text,Service text)CREATE TABLE station (Station_ID int,Name text,Annual_entry_exit real,Annual_interchanges real,Total_Passengers real,Location text,Main_Services text,Number_of_Platforms int)
SELECT Location, COUNT(Location) FROM station GROUP BY Location ORDER BY Location
What was the position of the team with an average finish of 21.5?
CREATE TABLE table_2182562_2 (position VARCHAR,avg_finish VARCHAR)
SELECT position FROM table_2182562_2 WHERE avg_finish = "21.5"
List the hosts of performances in ascending order of attendance.
CREATE TABLE member_attendance (member_id number,performance_id number,num_of_pieces number)CREATE TABLE performance (performance_id number,date text,host text,location text,attendance number)CREATE TABLE member (member_id text,name text,nationality text,role text)
SELECT host FROM performance ORDER BY attendance
Bar graph to show how many country name from different country name, and could you order in descending by the y-axis please?
CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_...
SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME ORDER BY COUNT(COUNTRY_NAME) DESC
What is the PI GP of Rob Flockhart, who has a pick # less than 122 and a round # less than 3?
CREATE TABLE table_58435 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real)
SELECT SUM("Pl GP") FROM table_58435 WHERE "Pick #" < '122' AND "Player" = 'rob flockhart' AND "Rd #" < '3'
What are the customer phone numbers under the policy 'Life Insurance'?
CREATE TABLE available_policies (customer_phone VARCHAR,policy_type_code VARCHAR)
SELECT customer_phone FROM available_policies WHERE policy_type_code = "Life Insurance"
What club has a played number of 19, and the lost of 14?
CREATE TABLE table_76613 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text)
SELECT "Club" FROM table_76613 WHERE "Played" = '19' AND "Lost" = '14'
What is the lowest year that had foil team as the event at Melbourne?
CREATE TABLE table_39105 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Event" text)
SELECT MIN("Year") FROM table_39105 WHERE "Event" = 'foil team' AND "Venue" = 'melbourne'
Show the number of year of the maximum price and score of wines in a bar chart, and bin the year into the weekday interval.
CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)
SELECT Year, COUNT(Year) FROM wine
If the district is Virginia 17, who are the candidates?
CREATE TABLE table_2668416_18 (candidates VARCHAR,district VARCHAR)
SELECT candidates FROM table_2668416_18 WHERE district = "Virginia 17"
What competition has June 19, 2004 as the date?
CREATE TABLE table_75844 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Competition" FROM table_75844 WHERE "Date" = 'june 19, 2004'
What is the name of the player who played in 2009 only?
CREATE TABLE table_17613 ("Country" text,"Player name" text,"Period" text,"Position" text,"Matches" text,"Goals" text)
SELECT "Player name" FROM table_17613 WHERE "Period" = '2009'
Which event has a method of TKO (punches)?
CREATE TABLE table_9600 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text)
SELECT "Event" FROM table_9600 WHERE "Method" = 'tko (punches)'
How many dates had a final score of w 118-112?
CREATE TABLE table_17382360_9 (date VARCHAR,score VARCHAR)
SELECT COUNT(date) FROM table_17382360_9 WHERE score = "W 118-112"
When western michigan is the tournament winner how many conferences are there?
CREATE TABLE table_3005 ("Conference" text,"Regular Season Winner" text,"Conference Player of the Year" text,"Conference Tournament" text,"Tournament Venue (City)" text,"Tournament Winner" text)
SELECT COUNT("Conference") FROM table_3005 WHERE "Tournament Winner" = 'Western Michigan'
What is the average Apps for the team Kairat with level larger than 1?
CREATE TABLE table_name_51 (apps INTEGER,team VARCHAR,level VARCHAR)
SELECT AVG(apps) FROM table_name_51 WHERE team = "kairat" AND level > 1
when was the last time the respiration measured in patient 006-133605 on the current intensive care unit visit?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientuni...
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 = '006-133605') AND patient.unitdischargetime IS NULL)...
show me flights from DENVER to PHILADELPHIA
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE...
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 = 'PHILADE...
count the number of patients whose admission type is urgent and ethnicity is black/haitian?
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 WHERE demographic.admission_type = "URGENT" AND demographic.ethnicity = "BLACK/HAITIAN"
What candidate was re-elected and was first elected in 1942?
CREATE TABLE table_18550 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Candidates" FROM table_18550 WHERE "Result" = 'Re-elected' AND "First elected" = '1942'
What is the average FA Cup value with a total greater than 2, a League Cup of 1, a league less than 3, and Paul Ince scoring?
CREATE TABLE table_52166 ("Name" text,"League" real,"FA Cup" real,"League Cup" real,"Total" real)
SELECT AVG("FA Cup") FROM table_52166 WHERE "Total" > '2' AND "League Cup" = '1' AND "Name" = 'paul ince' AND "League" < '3'
Can you draw the trend of sum budget in billions over the creation?, could you show by the x-axis in asc?
CREATE TABLE management (department_ID int,head_ID int,temporary_acting text)CREATE TABLE head (head_ID int,name text,born_state text,age real)CREATE TABLE department (Department_ID int,Name text,Creation text,Ranking int,Budget_in_Billions real,Num_Employees real)
SELECT Creation, SUM(Budget_in_Billions) FROM department GROUP BY Creation ORDER BY Creation
Which Result has a Game larger than 6, and an Attendance larger than 12,782, and a Date of 5 december 1987?
CREATE TABLE table_62816 ("Game" real,"Date" text,"Opponent" text,"Venue" text,"Result" text,"Attendance" real)
SELECT "Result" FROM table_62816 WHERE "Game" > '6' AND "Attendance" > '12,782' AND "Date" = '5 december 1987'
Name the driver/passenger for 30
CREATE TABLE table_17176509_4 (driver___passenger VARCHAR,position VARCHAR)
SELECT COUNT(driver___passenger) FROM table_17176509_4 WHERE position = 30
Who was the leading scorer on November 2, 2007?
CREATE TABLE table_58486 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" real,"Record" text)
SELECT "Leading scorer" FROM table_58486 WHERE "Date" = 'november 2, 2007'
how many patients died within the same month after having been diagnosed the last year with hypothyroidism?
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 COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypothyroidism') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagn...
Which city has an ICAO of gvsf?
CREATE TABLE table_name_53 (city___town VARCHAR,icao VARCHAR)
SELECT city___town FROM table_name_53 WHERE icao = "gvsf"
What is the NHL team that had pick number 32?
CREATE TABLE table_36654 ("Pick #" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "NHL team" FROM table_36654 WHERE "Pick #" = '32'
could i have a listing of flights leaving BOSTON going to BALTIMORE leaving wednesday after 2100
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREAT...
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 = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
Show the denomination of the school that has the most players.
CREATE TABLE player (School_ID VARCHAR)CREATE TABLE school (Denomination VARCHAR,School_ID VARCHAR)
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1
What is the title of the episode written by David J. Burke?
CREATE TABLE table_name_6 (title VARCHAR,written_by VARCHAR)
SELECT title FROM table_name_6 WHERE written_by = "david j. burke"
Which manufacturer made a locomotive with a type of 4-6-4t?
CREATE TABLE table_name_40 (manufacturer VARCHAR,type VARCHAR)
SELECT manufacturer FROM table_name_40 WHERE type = "4-6-4t"
How many faculty members do we have for each rank? render a bar chart, and sort from high to low by the Y.
CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5),Building VARCHAR(13))CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Student (StuID INTEGER,LName VA...
SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank ORDER BY COUNT(Rank) DESC
What are the attribute data types with more than 3 attribute definitions?
CREATE TABLE catalog_structure (catalog_level_number number,catalog_id number,catalog_level_name text)CREATE TABLE catalogs (catalog_id number,catalog_name text,catalog_publisher text,date_of_publication time,date_of_latest_revision time)CREATE TABLE catalog_contents_additional_attributes (catalog_entry_id number,catal...
SELECT attribute_data_type FROM attribute_definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3
where cfl team is winnipeg (3) via hamilton what are all the player
CREATE TABLE table_26996293_2 (player VARCHAR,cfl_team VARCHAR)
SELECT player FROM table_26996293_2 WHERE cfl_team = "Winnipeg (3) via Hamilton"
what is the next pennant after f172 ?
CREATE TABLE table_204_568 (id number,"pennant" text,"name" text,"hull builder" text,"ordered" text,"laid down" text,"launched" text,"accepted into service" text,"commissioned" text,"est. building cost" text,"fate" text)
SELECT "pennant" FROM table_204_568 WHERE id = (SELECT id FROM table_204_568 WHERE "pennant" = 'f172') + 1
What league is entering this round with 24 clubs remaining?
CREATE TABLE table_name_39 (leagues_entering_at_this_round VARCHAR,clubs_remaining VARCHAR)
SELECT leagues_entering_at_this_round FROM table_name_39 WHERE clubs_remaining = 24
how much is the cost of a accid punc/op lac dura diagnosis?
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 d_labitems (row_id number,itemid number,label text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,sp...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'accid punc/op lac dura'))
How many counties correspond to each police force?
CREATE TABLE county_public_safety (county_id number,name text,population number,police_officers number,residents_per_officer number,case_burden number,crime_rate number,police_force text,location text)CREATE TABLE city (city_id number,county_id number,name text,white number,black number,amerindian number,asian number,m...
SELECT police_force, COUNT(*) FROM county_public_safety GROUP BY police_force
Which venue has a capacity over 41,040 for Darida?
CREATE TABLE table_36961 ("Team" text,"Location" text,"Venue" text,"Capacity" real,"Position in 2004" text)
SELECT "Venue" FROM table_36961 WHERE "Capacity" > '41,040' AND "Team" = 'darida'
What is the Score that has a Date of 2005-10-29?
CREATE TABLE table_48953 ("Date" text,"Venue" text,"Opponents" text,"Score" text,"Round" text,"Djurg\u00e5rden scorers" text,"Attendance" text)
SELECT "Score" FROM table_48953 WHERE "Date" = '2005-10-29'
What is Game, when Road Team is 'Syracuse', and when Result is '96-89'?
CREATE TABLE table_60401 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text)
SELECT "Game" FROM table_60401 WHERE "Road Team" = 'syracuse' AND "Result" = '96-89'
Find the total revenue for each manufacturer Plot them as bar chart, could you display by the y-axis in descending 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 Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY SUM(Revenue) DESC
What country is the Eurasia Astana team from?
CREATE TABLE table_name_69 (country VARCHAR,team VARCHAR)
SELECT country FROM table_name_69 WHERE team = "eurasia astana"
Which opponent has September 14, 2003 as the date?
CREATE TABLE table_13789 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT "Opponent" FROM table_13789 WHERE "Date" = 'september 14, 2003'
what were the names of the output that patient 030-42006 had first on this month/25?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid numbe...
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 = '030-42006')) AND intakeoutput.cellpath LIKE '%output%' AND D...
What is the oldest age for each gender of student? Return a bar chart, could you order by the Y in asc?
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 Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREATE TABLE Has_amenity (dormid INTEGER,amenid INTEGER)CREATE TABLE Li...
SELECT Sex, MAX(Age) FROM Student GROUP BY Sex ORDER BY MAX(Age)
How many patients diagnosed with paroxysmal ventricular tachycardia have a hematology lab test category?
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.long_title = "Paroxysmal ventricular tachycardia" AND lab."CATEGORY" = "Hematology"
how many patients were prescribed with propofol in the same month in this year after the procedure of hemodialysis?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_items (row_id number,itemid number,label text...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'hemodialysi...
What Region was the Catalog magik muzik 805-5 released in?
CREATE TABLE table_7741 ("Region" text,"Date" real,"Label" text,"Format" text,"Catalog" text)
SELECT "Region" FROM table_7741 WHERE "Catalog" = 'magik muzik 805-5'
Which Tries for has Points against larger than 87, and Tries against smaller than 28, and Points diff of +63?
CREATE TABLE table_name_69 (tries_for INTEGER,points_diff VARCHAR,points_against VARCHAR,tries_against VARCHAR)
SELECT AVG(tries_for) FROM table_name_69 WHERE points_against > 87 AND tries_against < 28 AND points_diff = "+63"
Which date's week was more than 4 with the venue being City Stadium and where the attendance was more than 14,297?
CREATE TABLE table_name_1 (date VARCHAR,attendance VARCHAR,week VARCHAR,venue VARCHAR)
SELECT date FROM table_name_1 WHERE week > 4 AND venue = "city stadium" AND attendance > 14 OFFSET 297
Name the vacator for failure to elect
CREATE TABLE table_225205_3 (vacator VARCHAR,reason_for_change VARCHAR)
SELECT vacator FROM table_225205_3 WHERE reason_for_change = "Failure to elect"
Which December has a Record of 21 7 2, and a Game larger than 30?
CREATE TABLE table_38978 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text,"Points" real)
SELECT MAX("December") FROM table_38978 WHERE "Record" = '21–7–2' AND "Game" > '30'
What nhl team does dwight bialowas play for?
CREATE TABLE table_1473672_2 (nhl_team VARCHAR,player VARCHAR)
SELECT nhl_team FROM table_1473672_2 WHERE player = "Dwight Bialowas"
What is College, when Pick is less than 145, and when Player is Jeff Wilkins?
CREATE TABLE table_50711 ("Round" real,"Pick" real,"Player" text,"Nationality" text,"College" text)
SELECT "College" FROM table_50711 WHERE "Pick" < '145' AND "Player" = 'jeff wilkins'
588 has a lab ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE gsi (course_offering_i...
SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 588
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time, sort total number of salary from high to low order please.
CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(SALARY) DESC
In the County of Prince, what was the highest Population density when the Area (km ) was larger than 3.02, and the Population (2006) was larger than 786, and the Population (2011) was smaller than 1135?
CREATE TABLE table_75771 ("County" text,"Population (2011)" real,"Population (2006)" real,"Change (%)" real,"Area (km\u00b2)" real,"Population density" real)
SELECT MAX("Population density") FROM table_75771 WHERE "County" = 'prince' AND "Area (km\u00b2)" > '3.02' AND "Population (2006)" > '786' AND "Population (2011)" < '1135'
Bar chart x axis type y axis the total number, and show names from high to low order please.
CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text)CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int)
SELECT Type, COUNT(*) FROM ship GROUP BY Type ORDER BY Type DESC
How many times is last/current driver(s) 3 november 2013 is adderly fong ( 2013 )?
CREATE TABLE table_3731 ("Country" text,"Total Drivers" real,"Champions" text,"Championships" text,"Current 3 November 2013" real,"First driver(s)" text,"Last/Current driver(s) 3 November 2013" text)
SELECT COUNT("Country") FROM table_3731 WHERE "Last/Current driver(s) 3 November 2013" = 'Adderly Fong ( 2013 )'
what is the highest goals against when the wins is less than 1?
CREATE TABLE table_77519 ("Team" text,"Games Played" real,"Wins" real,"Losses" real,"Ties" real,"Goals For" real,"Goals Against" real)
SELECT MAX("Goals Against") FROM table_77519 WHERE "Wins" < '1'
what is the four year survival rate of patients who have been diagnosed with allrgic gastro & colitis?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wa...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id...
Who won the gold when Jules van Dyk Belgium won bronze?
CREATE TABLE table_34771 ("Event" text,"Gold" text,"Silver" text,"Bronze" text,"4th place" text)
SELECT "Gold" FROM table_34771 WHERE "Bronze" = 'jules van dyk belgium'
For those products with a price between 60 and 120, draw a bar chart about the distribution of name and code , I want to order Y-axis in descending order.
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 Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Code DESC
What was the result of the Top 3 episode?
CREATE TABLE table_12310814_1 (result VARCHAR,episode VARCHAR)
SELECT result FROM table_12310814_1 WHERE episode = "Top 3"
What is the highest time for athlete torri edwards, and a rank larger than 6?
CREATE TABLE table_name_31 (time INTEGER,athlete VARCHAR,rank VARCHAR)
SELECT MAX(time) FROM table_name_31 WHERE athlete = "torri edwards" AND rank > 6
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of department_id bin hire_date by weekday, and visualize them by a bar chart, could you show in ascending by the total number?
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 HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(DEPARTMENT_ID)
How many silver medals did the country that won 20 gold medals win in the 1955 Pan American Games?
CREATE TABLE table_name_62 (silver INTEGER,gold VARCHAR)
SELECT SUM(silver) FROM table_name_62 WHERE gold = 20
What is the sum of Points, when Year is after 1959, and when Class is 250cc?
CREATE TABLE table_name_42 (points INTEGER,year VARCHAR,class VARCHAR)
SELECT SUM(points) FROM table_name_42 WHERE year > 1959 AND class = "250cc"
which patients have been hospitalized for more than 5 days?
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.days_stay > "5"
what was the att-cmp-int for the qb with an effic of 127.89?
CREATE TABLE table_name_85 (att_cmp_int VARCHAR,effic VARCHAR)
SELECT att_cmp_int FROM table_name_85 WHERE effic = 127.89
Gieco Max Number of Comments for a Single Post.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDat...
SELECT Id, CommentCount FROM Posts ORDER BY CommentCount DESC LIMIT 1
what is the daily minimum value of wbc x 1000 of patient 010-9767 in 03/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 microlab (microlabid number,patientunitstayid nu...
SELECT MIN(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-9767')) AND lab.labname = 'wbc x 1000' AND STRFTIME('%y-%m', lab.labresulttime...
What is the fewest losses associated with more than 13 points and fewer than 8 games?
CREATE TABLE table_name_25 (lost INTEGER,points VARCHAR,games VARCHAR)
SELECT MIN(lost) FROM table_name_25 WHERE points > 13 AND games < 8
Who is the famous for that finished 2nd?
CREATE TABLE table_19297 ("Celebrity" text,"Famous for" text,"Entered" text,"Exited" text,"Finished" text)
SELECT "Famous for" FROM table_19297 WHERE "Finished" = '2nd'
What is the %2006 when the %2001 was more than 62.5?
CREATE TABLE table_name_52 (_percentage_2006 INTEGER,_percentage_2001 INTEGER)
SELECT AVG(_percentage_2006) FROM table_name_52 WHERE _percentage_2001 > 62.5
What is the name of the candidate where the incumbent is named James P. Buchanan?
CREATE TABLE table_1342331_43 (candidates VARCHAR,incumbent VARCHAR)
SELECT candidates FROM table_1342331_43 WHERE incumbent = "James P. Buchanan"
Which Silver has a Total of 7, and a Gold larger than 1?
CREATE TABLE table_48067 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT AVG("Silver") FROM table_48067 WHERE "Total" = '7' AND "Gold" > '1'
What are the names of the songs without a lead vocal?
CREATE TABLE vocals (songid number,bandmate number,type text)CREATE TABLE band (id number,firstname text,lastname text)CREATE TABLE albums (aid number,title text,year number,label text,type text)CREATE TABLE instruments (songid number,bandmateid number,instrument text)CREATE TABLE performance (songid number,bandmate nu...
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE type = "lead"
Name the party for jack thomas brinkley
CREATE TABLE table_72379 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Party" FROM table_72379 WHERE "Incumbent" = 'Jack Thomas Brinkley'
Does every upper-level class have an examination ?
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 jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE student (student_id int,lastname va...
SELECT COUNT(*) = 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND program_course.category LIKE '%ULCS%'
Who was the Youth Classification in the race with Kenneth Hanson as Mountains Classification and Lucas Sebastian Haedo as winner?
CREATE TABLE table_25677 ("Stage" real,"Winner" text,"General classification" text,"Mountains classification" text,"Points classification" text,"Youth classification" text,"Team Classification" text)
SELECT "Youth classification" FROM table_25677 WHERE "Mountains classification" = 'Kenneth Hanson' AND "Winner" = 'Lucas Sebastian Haedo'
What is Winner, when Circuit is Mallala Motor Sport Park, and when Series is ASTC Round 6?
CREATE TABLE table_name_95 (winner VARCHAR,circuit VARCHAR,series VARCHAR)
SELECT winner FROM table_name_95 WHERE circuit = "mallala motor sport park" AND series = "astc round 6"
What is the lowest Minutes Played Per Game, when Rebounds is less than 347, when Assists is greater than 5, and when Minutes Played is less than 301?
CREATE TABLE table_46685 ("Player" text,"Games Played" real,"Minutes Played" real,"Minutes Played Per Game" real,"Rebounds" real,"Rebounds Per Game" real,"Assists" real,"Assists Per Game" real,"Field Goal %" real,"Free Throw %" real,"Points" real,"Points Per Game" real)
SELECT MIN("Minutes Played Per Game") FROM table_46685 WHERE "Rebounds" < '347' AND "Assists" > '5' AND "Minutes Played" < '301'
what is the year where the qualifying score was 15.150?
CREATE TABLE table_17990 ("Year" real,"Competition" text,"Location" text,"Event" text,"Final-Rank" text,"Final-Score" text,"Qualifying Rank" real,"Qualifying Score" text)
SELECT "Year" FROM table_17990 WHERE "Qualifying Score" = '15.150'
what planes are used by TW
CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,t...
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, equipment_sequence, flight WHERE equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.airline_code = 'TW'
What was the population in Stanthorpe in the year when the population in Rosenthal was 1548?
CREATE TABLE table_12584173_1 (population__stanthorpe_ INTEGER,population__rosenthal_ VARCHAR)
SELECT MAX(population__stanthorpe_) FROM table_12584173_1 WHERE population__rosenthal_ = 1548
Which player has 2 tries and 0 drops?
CREATE TABLE table_52573 ("Player" text,"Tries" text,"Conv" text,"Pens" text,"Drop" text,"Venue" text,"Date" text)
SELECT "Player" FROM table_52573 WHERE "Drop" = '0' AND "Tries" = '2'
give me the number of patients whose days of hospital stay is greater than 29 and drug route is nu?
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 lab (subject_id text,hadm_id text,itemid text,charttime te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "29" AND prescriptions.route = "NU"
What is the rank of the film directed by danny devito?
CREATE TABLE table_43680 ("Rank" real,"Title" text,"Studio" text,"Director" text,"Gross" text)
SELECT "Rank" FROM table_43680 WHERE "Director" = 'danny devito'
How many different status codes of things are there?
CREATE TABLE Timed_Status_of_Things (Status_of_Thing_Code VARCHAR)
SELECT COUNT(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things
What is the average Total, when FA Cup Goals is 1, when League Goals is 10, and when Club is Crystal Palace?
CREATE TABLE table_name_20 (total INTEGER,club VARCHAR,fa_cup_goals VARCHAR,league_goals VARCHAR)
SELECT AVG(total) FROM table_name_20 WHERE fa_cup_goals = "1" AND league_goals = "10" AND club = "crystal palace"
What are the laws against homosexuality in Malaysia?
CREATE TABLE table_40559 ("Country" text,"Laws against homosexuality" text,"Penalty" text,"Same-sex Unions" text,"Laws against discrimination" text)
SELECT "Laws against homosexuality" FROM table_40559 WHERE "Country" = 'malaysia'