instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?
CREATE TABLE exhibition (exhibition_id number,year number,theme text,artist_id number,ticket_price number)CREATE TABLE exhibition_record (exhibition_id number,date text,attendance number)CREATE TABLE artist (artist_id number,name text,country text,year_join number,age number)
SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE year < 2009
On what date was the game against San Diego Chargers played?
CREATE TABLE table_13258851_2 (date VARCHAR,opponent VARCHAR)
SELECT date FROM table_13258851_2 WHERE opponent = "San Diego Chargers"
List all players with highest assists from April 2.
CREATE TABLE table_25801 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High assists" FROM table_25801 WHERE "Date" = 'April 2'
What is the least amount of failures with 1 launch and 0 partial failures?
CREATE TABLE table_name_28 (failures INTEGER,launches VARCHAR,partial_failures VARCHAR)
SELECT MIN(failures) FROM table_name_28 WHERE launches = 1 AND partial_failures < 0
What Gender has the area of swannanoa?
CREATE TABLE table_name_53 (gender VARCHAR,area VARCHAR)
SELECT gender FROM table_name_53 WHERE area = "swannanoa"
What are the total amount of Goals Conceded when the Points are less than 26, and when the value for Played is less than 18?
CREATE TABLE table_69123 ("Place" real,"Team" text,"Played" real,"Draw" real,"Lost" real,"Goals Scored" real,"Goals Conceded" real,"Points" real)
SELECT SUM("Goals Conceded") FROM table_69123 WHERE "Points" < '26' AND "Played" < '18'
What is the highest flap for class 500 cc?
CREATE TABLE table_name_5 (flap INTEGER,class VARCHAR)
SELECT MAX(flap) FROM table_name_5 WHERE class = "500 cc"
What is the lowest amount of points for a Ford Cosworth DFR (Mader) 3.5 V8 engine?
CREATE TABLE table_68626 ("Year" real,"Team" text,"Chassis" text,"Engine" text,"Points" real)
SELECT MIN("Points") FROM table_68626 WHERE "Engine" = 'ford cosworth dfr (mader) 3.5 v8'
What is the nationality of the player who went to college at Mississippi?
CREATE TABLE table_name_74 (nationality VARCHAR,college_country_team VARCHAR)
SELECT nationality FROM table_name_74 WHERE college_country_team = "mississippi"
Use a histogram to show the department's id and corresponding employees' first name.
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 regions (REGION_ID decimal(5,0),REGIO...
SELECT FIRST_NAME, DEPARTMENT_ID FROM employees
What was the result of the race where the jockey was J. Marshall?
CREATE TABLE table_23770 ("Result" text,"Date" text,"Race" text,"Venue" text,"Group" text,"Distance" text,"Weight (kg)" text,"Jockey" text,"Winner/2nd" text)
SELECT "Result" FROM table_23770 WHERE "Jockey" = 'J. Marshall'
What is the minimum stolen ends record where the pa record is 40?
CREATE TABLE table_31194 ("Skip (Club)" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real)
SELECT MIN("Stolen Ends") FROM table_31194 WHERE "PA" = '40'
Count the number of programs broadcast for each time section of a day in a bar chart, and could you order in desc by the x axis?
CREATE TABLE broadcast (Channel_ID int,Program_ID int,Time_of_day text)CREATE TABLE program (Program_ID int,Name text,Origin text,Launch real,Owner text)CREATE TABLE channel (Channel_ID int,Name text,Owner text,Share_in_percent real,Rating_in_percent real)CREATE TABLE broadcast_share (Channel_ID int,Program_ID int,Date...
SELECT Time_of_day, COUNT(*) FROM broadcast GROUP BY Time_of_day ORDER BY Time_of_day DESC
provide the number of patients whose discharge location is home and procedure icd9 code is 5783?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id 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,do...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME" AND procedures.icd9_code = "5783"
what was the first procedure time of patient 41393 for spinal tap until 2103?
CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE p...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'spinal tap') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41393) AND STRFTIME('%y'...
what are the three most commonly ordered procedures for patients who have received temporary tracheostomy within 2 months previously in 2102?
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 prescriptions (row_id number,subject_id number,hadm_id number,...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi...
What is the Athlete of the race with a Time of 9.78?
CREATE TABLE table_name_14 (athlete VARCHAR,time VARCHAR)
SELECT athlete FROM table_name_14 WHERE time = 9.78
whats the sex of patient 25869?
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,spec_type_desc text,org_name text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE transfers (row_id numb...
SELECT patients.gender FROM patients WHERE patients.subject_id = 25869
Which opponent was played at Forbes Field after week 4?
CREATE TABLE table_name_76 (opponent VARCHAR,game_site VARCHAR,week VARCHAR)
SELECT opponent FROM table_name_76 WHERE game_site = "forbes field" AND week > 4
how many patients are in thecatholic region and procedured for excision or destruction of other lesion or tissue of heart with an endovascular approach?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.religion = "CATHOLIC" AND procedures.long_title = "Excision or destruction of other lesion or tissue of heart, endovascular approach"
what is days of hospital stay and death status of subject id 7578?
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 demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "7578"
What are the different transaction types, and how many transactions of each have taken place Show bar chart, and sort by the the total number in ascending.
CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER,account_id INTEGER,card_id INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amou...
SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*)
What is the highest In service for a vessel with a listed Unit of 12th minesweeper squadron?
CREATE TABLE table_name_37 (in_service INTEGER,unit VARCHAR)
SELECT MAX(in_service) FROM table_name_37 WHERE unit = "12th minesweeper squadron"
What is the number of bronze that silver is smaller than 1 and gold bigger than 0?
CREATE TABLE table_name_51 (bronze INTEGER,silver VARCHAR,gold VARCHAR)
SELECT AVG(bronze) FROM table_name_51 WHERE silver < 1 AND gold > 0
Which season is the wicket 2nd partnership in?
CREATE TABLE table_51337 ("Wicket Partnership" text,"Runs" text,"Batsmen" text,"Opponents" text,"Venue" text,"Season" text)
SELECT "Season" FROM table_51337 WHERE "Wicket Partnership" = '2nd'
i want to go from DENVER to ATLANTA round trip and make a stop at PITTSBURGH is this possible
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,co...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND CITY_2.ci...
Which Name has a Number of electorates (2009) greater than 188,799?
CREATE TABLE table_name_56 (name VARCHAR,number_of_electorates__2009_ INTEGER)
SELECT name FROM table_name_56 WHERE number_of_electorates__2009_ > 188 OFFSET 799
how many golfers made at least $ 40,000 ?
CREATE TABLE table_203_499 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number,"money ($)" number)
SELECT COUNT("player") FROM table_203_499 WHERE "money ($)" >= 40000
What is the upstream speed that you get for 89 tl?
CREATE TABLE table_21478 ("Downstream" text,"Upstream" text,"Bandwidth" text,"Price TL" text,"Every 1 GB" text,"MAX" text)
SELECT "Upstream" FROM table_21478 WHERE "Price TL" = '89 TL'
What is the Phoneme symbol for the letter name z n?
CREATE TABLE table_47097 ("Asomtavruli" text,"Nuskhuri" text,"Mkhedruli" text,"Letter name" text,"Phoneme" text)
SELECT "Phoneme" FROM table_47097 WHERE "Letter name" = 'zɛn'
count the number of patients whose days of hospital stay is greater than 23 and drug name is phenylephrine hcl?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "23" AND prescriptions.drug = "Phenylephrine HCl"
When 21' 10.25 106.930mph is Tuesday August 24th what is Saturday August 29th?
CREATE TABLE table_26986076_5 (sat_29_aug VARCHAR,tues_24_aug VARCHAR)
SELECT sat_29_aug FROM table_26986076_5 WHERE tues_24_aug = "21' 10.25 106.930mph"
What's the sum of draws for against larger than 1228 with fewer than 1 wins?
CREATE TABLE table_58599 ("Mid Gippsland FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT SUM("Draws") FROM table_58599 WHERE "Against" > '1228' AND "Wins" < '1'
What was the smallest crowd in games at the corio oval?
CREATE TABLE table_name_13 (crowd INTEGER,venue VARCHAR)
SELECT MIN(crowd) FROM table_name_13 WHERE venue = "corio oval"
Who was third in round 14?
CREATE TABLE table_38177 ("Round" text,"Venue" text,"Discipline" text,"Date" text,"Winner" text,"Second" text,"Third" text)
SELECT "Third" FROM table_38177 WHERE "Round" = '14'
List the studios of each film and the number of films produced by that studio.
CREATE TABLE film (film_id number,title text,studio text,director text,gross_in_dollar number)CREATE TABLE market (market_id number,country text,number_cities number)CREATE TABLE film_market_estimation (estimation_id number,low_estimate number,high_estimate number,film_id number,type text,market_id number,year number)
SELECT studio, COUNT(*) FROM film GROUP BY studio
In what episode was segment D ned Can Corn?
CREATE TABLE table_15187735_1 (episode INTEGER,segment_d VARCHAR)
SELECT MAX(episode) FROM table_15187735_1 WHERE segment_d = "ned Can Corn"
What is the lowest number of National University of Ireland that has a Cultural and Educational Panel of 0, and a Labour Panel smaller than 1?
CREATE TABLE table_name_49 (national_university_of_ireland INTEGER,cultural_and_educational_panel VARCHAR,labour_panel VARCHAR)
SELECT MIN(national_university_of_ireland) FROM table_name_49 WHERE cultural_and_educational_panel = 0 AND labour_panel < 1
Visualize a bar chart about the distribution of All_Games and ACC_Percent , and rank by the Y in descending.
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_Games, ACC_Percent FROM basketball_match ORDER BY ACC_Percent DESC
What is the name of the captain when teh shirt sponsor is n/a?
CREATE TABLE table_29695 ("Team" text,"Chairman" text,"Head Coach" text,"Captain" text,"Kitmaker" text,"Shirt sponsor" text)
SELECT "Captain" FROM table_29695 WHERE "Shirt sponsor" = 'N/A'
What team 2 has lokomotiva as team 1?
CREATE TABLE table_13049 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text)
SELECT "Team 2" FROM table_13049 WHERE "Team 1" = 'lokomotiva'
known pregnancy
CREATE TABLE table_train_9 ("id" int,"pregnancy_or_lactation" bool,"intention_to_arterial_catheter" bool,"intention_to_central_venous_catheter" bool,"surgery" bool,"hypotension" bool,"chest_trauma" bool,"burn_injury" int,"impossible_transthoracic_echocardiogram_tte" bool,"NOUSE" float)
SELECT * FROM table_train_9 WHERE pregnancy_or_lactation = 1
Name the high rebounds for wells fargo center 16,695
CREATE TABLE table_27700375_11 (high_rebounds VARCHAR,location_attendance VARCHAR)
SELECT high_rebounds FROM table_27700375_11 WHERE location_attendance = "Wells Fargo Center 16,695"
What is the Score with a Hoe that is etobicoke kangaroos?
CREATE TABLE table_42667 ("Date" text,"Time" text,"Home" text,"Away" text,"Score" text,"Ground" text)
SELECT "Score" FROM table_42667 WHERE "Home" = 'etobicoke kangaroos'
List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.
CREATE TABLE Student (Fname VARCHAR,Lname VARCHAR,Sex VARCHAR,Age VARCHAR,Major VARCHAR)
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'
give me the number of patients whose primary disease is t5 fracture?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "T5 FRACTURE"
Name the segment b for 167
CREATE TABLE table_19887 ("Series Ep." text,"Episode" real,"Segment A" text,"Segment B" text,"Segment C" text,"Segment D" text)
SELECT "Segment B" FROM table_19887 WHERE "Episode" = '167'
Who is the home team that played at MCG?
CREATE TABLE table_55216 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team score" FROM table_55216 WHERE "Venue" = 'mcg'
What is the total of PI GP played by Anton Rodin with a Reg GP less than 0?
CREATE TABLE table_name_73 (pl_gp VARCHAR,player VARCHAR,reg_gp VARCHAR)
SELECT COUNT(pl_gp) FROM table_name_73 WHERE player = "anton rodin" AND reg_gp < 0
What was the outcome when darija jurak ana s laurendon was the opponent?
CREATE TABLE table_8290 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text)
SELECT "Outcome" FROM table_8290 WHERE "Opponents" = 'darija jurak anaïs laurendon'
What is the career caps for half-back, when tests is more than 3?
CREATE TABLE table_name_73 (career_caps VARCHAR,position VARCHAR,tests VARCHAR)
SELECT career_caps FROM table_name_73 WHERE position = "half-back" AND tests > 3
Which Elevation (m) has a Prominence (m) smaller than 2,456, and a Peak of mount kyllini, and a Col (m) smaller than 506?
CREATE TABLE table_62847 ("Peak" text,"Country" text,"Elevation (m)" real,"Prominence (m)" real,"Col (m)" real)
SELECT MAX("Elevation (m)") FROM table_62847 WHERE "Prominence (m)" < '2,456' AND "Peak" = 'mount kyllini' AND "Col (m)" < '506'
What's the authority when the roll is 40?
CREATE TABLE table_name_7 (authority VARCHAR,roll VARCHAR)
SELECT authority FROM table_name_7 WHERE roll = 40
How much is the population density with a GDP at $188,112?
CREATE TABLE table_43018 ("Country" text,"Area (km\u00b2)" text,"Population (2011 est.)" text,"Population density (per km\u00b2)" text,"GDP (PPP) $M USD" text)
SELECT "Population density (per km\u00b2)" FROM table_43018 WHERE "GDP (PPP) $M USD" = '$188,112'
what is the properties of sodium when lithium is h a l o g e n s and rubidium is nacl (2.1)?
CREATE TABLE table_70787 ("Lithium" text,"Sodium" text,"Potassium" text,"Rubidium" text,"Caesium" text)
SELECT "Sodium" FROM table_70787 WHERE "Lithium" = 'h a l o g e n s' AND "Rubidium" = 'nacl (2.1)'
Which % GDP has a Year smaller than 2011, and an Expenditure larger than 41.3, and an Income smaller than 48, and a Surplus(Deficit) of (24.6)?
CREATE TABLE table_name_19 (_percentage_gdp VARCHAR,surplus_deficit_ VARCHAR,income VARCHAR,year VARCHAR,expenditure VARCHAR)
SELECT _percentage_gdp FROM table_name_19 WHERE year < 2011 AND expenditure > 41.3 AND income < 48 AND surplus_deficit_ = "(24.6)"
Which ERP W has a Class of A, and a Call sign of wffc?
CREATE TABLE table_69061 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" text,"Class" text,"FCC info" text)
SELECT "ERP W" FROM table_69061 WHERE "Class" = 'a' AND "Call sign" = 'wffc'
Which average 50m split had a 150m split of 1:40.00, with a placing of less than 2?
CREATE TABLE table_31859 ("Place" real,"Lane" real,"Name" text,"Nationality" text,"50m Split" real,"100m Split" text,"150m Split" text,"Time" text)
SELECT AVG("50m Split") FROM table_31859 WHERE "150m Split" = '1:40.00' AND "Place" < '2'
On what date was the game more than 5?
CREATE TABLE table_name_23 (date VARCHAR,game INTEGER)
SELECT date FROM table_name_23 WHERE game > 5
What is Date, when Opposing Teams is 'South Africa', and when Venus is 'Vodacom Park , Bloemfontein'?
CREATE TABLE table_59530 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text)
SELECT "Date" FROM table_59530 WHERE "Opposing Teams" = 'south africa' AND "Venue" = 'vodacom park , bloemfontein'
What is the blocks total number if the points is 4?
CREATE TABLE table_23346303_5 (blocks VARCHAR,points VARCHAR)
SELECT COUNT(blocks) FROM table_23346303_5 WHERE points = 4
was there any microbiology test result since 3 years ago for the foreign body of patient 54825?
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_items (row_id number,itemid number,label text,linksto text)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id numbe...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825) AND microbiologyevents.spec_type_desc = 'foreign body' AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-3 year')
What was the number of rounds on the Hidden Valley Raceway?
CREATE TABLE table_19079 ("Rd." real,"Race Title" text,"Circuit" text,"City / State" text,"Date" text,"Winner" text,"Team" text,"Report" text)
SELECT COUNT("Rd.") FROM table_19079 WHERE "Circuit" = 'Hidden Valley Raceway'
Find the number of departments in each school Plot them as bar chart, and I want to show by the y axis from high to low please.
CREATE TABLE EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)CREATE TABLE STUDENT (STU_NUM int,STU_LNAME varchar(15),STU_FNAME varchar(15),STU_INIT varchar(1),STU_DOB datetime,STU_HRS int,STU_CLASS varchar(2),STU_GPA ...
SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY COUNT(DISTINCT DEPT_NAME) DESC
What is the type for a general programming and the owner tv kanal 5?
CREATE TABLE table_59070 ("Name" text,"Owner" text,"Programming" text,"Type" text,"Encryption" text)
SELECT "Type" FROM table_59070 WHERE "Programming" = 'general' AND "Owner" = 'tv kanal 5'
For those records from the products and each product's manufacturer, a bar chart shows the distribution of founder and the sum of price , and group by attribute founder, and order by the x-axis in asc.
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 Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
What are the prerequisites to EARTH 142 ?
CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor va...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
show me the five year survival probability of patients who were prescribed clonidine hcl 0.1 mg po tabs after having been diagnosed with s/p breast biopsy?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
what is the division southwest when division south was ko uf and division east was osogovo
CREATE TABLE table_17881033_1 (division_southwest VARCHAR,division_south VARCHAR,division_east VARCHAR)
SELECT division_southwest FROM table_17881033_1 WHERE division_south = "Kožuf" AND division_east = "Osogovo"
What is the sum of the pick in round 17?
CREATE TABLE table_name_10 (pick INTEGER,round VARCHAR)
SELECT SUM(pick) FROM table_name_10 WHERE round = 17
did los perros del mal hold the championship title before ultimo gladiador and ultimo vampiro ?
CREATE TABLE table_204_245 (id number,"#" number,"wrestlers" text,"reign" number,"date" text,"days\nheld" number,"location" text,"event" text,"notes" text)
SELECT (SELECT "date" FROM table_204_245 WHERE "wrestlers" = 'los perros del mal') < (SELECT "date" FROM table_204_245 WHERE "wrestlers" = 'ultimo gladiador and ultimo vampiro')
Give me a bar chart that the X-axis is the date_moved_in and the Y-axis is Count them, please bin X-axis into Year interval, and show by the Y-axis from low to high.
CREATE TABLE Things (thing_id INTEGER,organization_id INTEGER,Type_of_Thing_Code CHAR(15),service_type_code CHAR(10),service_details VARCHAR(255))CREATE TABLE Services (service_id INTEGER,organization_id INTEGER,service_type_code CHAR(15),service_details VARCHAR(255))CREATE TABLE Customers (customer_id INTEGER,customer...
SELECT date_moved_in, COUNT(date_moved_in) FROM Customer_Events ORDER BY COUNT(date_moved_in)
What was the lowest FA Cup for a Malaysia Cup of 0?
CREATE TABLE table_37870 ("Player" text,"League" real,"Malaysia Cup" real,"FA Cup" real,"Total" real)
SELECT MIN("FA Cup") FROM table_37870 WHERE "Malaysia Cup" < '0'
How many winners scored exactly 202 (-11)?
CREATE TABLE table_21260421_1 (winner VARCHAR,score VARCHAR)
SELECT COUNT(winner) FROM table_21260421_1 WHERE score = "202 (-11)"
what is average age of patients whose death status is 0 and primary disease is st elevated myocardial infarction\cardiac cath?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH"
Name the total number of club worl cup for djibril cisse
CREATE TABLE table_19764939_1 (club_world_cup VARCHAR,player VARCHAR)
SELECT COUNT(club_world_cup) FROM table_19764939_1 WHERE player = "Djibril Cisse"
Name the air date that chris long directed
CREATE TABLE table_1892 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (million)" text)
SELECT "Original air date" FROM table_1892 WHERE "Directed by" = 'Chris Long'
Which Home team score had a Home team of Fitzroy?
CREATE TABLE table_name_13 (home_team VARCHAR)
SELECT home_team AS score FROM table_name_13 WHERE home_team = "fitzroy"
Tell me the shigella and yscn
CREATE TABLE table_name_15 (shigella VARCHAR,yersinia VARCHAR)
SELECT shigella FROM table_name_15 WHERE yersinia = "yscn"
What is the lowest week that has 7:15 p.m. as the time (cst) and fedexfield as the game site?
CREATE TABLE table_name_53 (week INTEGER,time__cst_ VARCHAR,game_site VARCHAR)
SELECT MIN(week) FROM table_name_53 WHERE time__cst_ = "7:15 p.m." AND game_site = "fedexfield"
What league has an average attendance of 244?
CREATE TABLE table_67931 ("Year" text,"League" text,"Reg. Season" text,"Playoffs" text,"Avg. attendance \u2020" text)
SELECT "League" FROM table_67931 WHERE "Avg. attendance \u2020" = '244'
what is average age of patients whose gender is f and discharge location is long term care hospital?
CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "LONG TERM CARE HOSPITAL"
Find the total rating ratio for each channel owner.
CREATE TABLE broadcast (channel_id number,program_id number,time_of_day text)CREATE TABLE program (program_id number,name text,origin text,launch number,owner text)CREATE TABLE channel (channel_id number,name text,owner text,share_in_percent number,rating_in_percent number)CREATE TABLE broadcast_share (channel_id numbe...
SELECT SUM(rating_in_percent), owner FROM channel GROUP BY owner
Find the name of students who didn't take any course from Biology department.
CREATE TABLE student (name VARCHAR,id VARCHAR)CREATE TABLE takes (id VARCHAR,course_id VARCHAR)CREATE TABLE course (course_id VARCHAR,dept_name VARCHAR)
SELECT name FROM student WHERE NOT id IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.dept_name = 'Biology')
What year did player steve jones, who had a t60 finish, win?
CREATE TABLE table_name_53 (year_s__won VARCHAR,finish VARCHAR,player VARCHAR)
SELECT year_s__won FROM table_name_53 WHERE finish = "t60" AND player = "steve jones"
What is the highest rank of the athlete with a Taijiquan higher than 9.64 and a total more than 19.69?
CREATE TABLE table_12300 ("Rank" real,"Athlete" text,"Taijiquan" real,"Taijijian" real,"Total" real)
SELECT MAX("Rank") FROM table_12300 WHERE "Taijiquan" > '9.64' AND "Total" > '19.69'
How many were in attendance for a result of D, at H venue, and Arsenal as an opponent?
CREATE TABLE table_37372 ("Date" text,"League position" text,"Opponents" text,"Venue" text,"Result" text,"Score F\u2013A" text,"Attendance" real)
SELECT "Attendance" FROM table_37372 WHERE "Result" = 'd' AND "Venue" = 'h' AND "Opponents" = 'arsenal'
Return the name of the party with the most members.
CREATE TABLE region (region_id number,region_name text,date text,label text,format text,catalogue text)CREATE TABLE member (member_id number,member_name text,party_id text,in_office text)CREATE TABLE party_events (event_id number,event_name text,party_id number,member_in_charge_id number)CREATE TABLE party (party_id nu...
SELECT T2.party_name FROM member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id ORDER BY COUNT(*) DESC LIMIT 1
Who are all of the candidates in the election featuring james r. domengeaux?
CREATE TABLE table_1342256_18 (candidates VARCHAR,incumbent VARCHAR)
SELECT candidates FROM table_1342256_18 WHERE incumbent = "James R. Domengeaux"
How many were the shares when the viewers reached 3.11 million?
CREATE TABLE table_21188 ("Episode number" real,"Episode" text,"Rating" text,"Share" real,"Rating/Share (18-49)" text,"Viewers (millions)" text,"Rank (Overall)" text)
SELECT COUNT("Share") FROM table_21188 WHERE "Viewers (millions)" = '3.11'
What is the rank of the player with less than 34 points?
CREATE TABLE table_41872 ("Rank" real,"Name" text,"Team" text,"Games" real,"Points" real)
SELECT SUM("Rank") FROM table_41872 WHERE "Points" < '34'
how many spanish speaking patients are operated with procedure coronary arteriography using two catheters?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.language = "SPAN" AND procedures.long_title = "Coronary arteriography using two catheters"
Stack bar chart of school_id vs All_Home based on acc road
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, School_ID FROM basketball_match GROUP BY All_Home, ACC_Road
Who was the U21 Mens winner when Mike Marsden was the mixed restricted winner and Claire Nelson was the U21 Womens winner?
CREATE TABLE table_74250 ("Date/Location" text,"Mens singles" text,"Womens Singles" text,"U21 Mens" text,"U21 Womens" text,"Mixed Restricted" text,"Mixed Veteran" text)
SELECT "U21 Mens" FROM table_74250 WHERE "Mixed Restricted" = 'Mike Marsden' AND "U21 Womens" = 'Claire Nelson'
In how many networks the local name of the franchise was 'in sickness and in health'?
CREATE TABLE table_12438767_1 (network VARCHAR,local_name VARCHAR)
SELECT COUNT(network) FROM table_12438767_1 WHERE local_name = "In Sickness and in Health"
find me the death status and primary language that patient with patient id 3623 prefers.
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ...
SELECT demographic.language, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "3623"
what is average age of patients whose admission type is emergency and year of birth is greater than 1821?
CREATE TABLE procedures (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_fla...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.dob_year > "1821"
What rank has an average of 6.33?
CREATE TABLE table_name_23 (rank INTEGER,average VARCHAR)
SELECT AVG(rank) FROM table_name_23 WHERE average = 6.33
what player scored 9/1
CREATE TABLE table_5735 ("Date" text,"Course" text,"Distance" text,"Race" text,"Class" text,"Position" text,"Jockey" text,"Odds" text)
SELECT "Jockey" FROM table_5735 WHERE "Odds" = '9/1'
How many of the people with accounts answered questions?.
CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ...
SELECT DISTINCT COUNT(u.Id) FROM Users AS u, Posts AS p WHERE p.PostTypeId = 2 AND u.Id = p.OwnerUserId