instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
what are the flights available after 1800 between SAN FRANCISCO and BOSTON | CREATE TABLE month (month_number int,month_name text)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE date_day (mo... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time > 1800 AND flight.to_airport = AIRPORT_SERVICE_1.airpor... |
Who is every main presenter for the year 2011? | CREATE TABLE table_26678 ("Region/Country" text,"Local name" text,"Main presenter" text,"Network" text,"Year premiered" real) | SELECT "Main presenter" FROM table_26678 WHERE "Year premiered" = '2011' |
Which final opponent's surface was hard (i) and participated on October 9, 2005? | CREATE TABLE table_name_26 (opponent_in_the_final VARCHAR,surface VARCHAR,date VARCHAR) | SELECT opponent_in_the_final FROM table_name_26 WHERE surface = "hard (i)" AND date = "october 9, 2005" |
During runs 332, what was the venue? | CREATE TABLE table_58151 ("Runs" text,"Player" text,"Opponent" text,"Venue" text,"Season" text) | SELECT "Venue" FROM table_58151 WHERE "Runs" = '332' |
Name the engine for ecurie lutetia | CREATE TABLE table_28190534_1 (engine VARCHAR,entrant VARCHAR) | SELECT engine FROM table_28190534_1 WHERE entrant = "Ecurie Lutetia" |
What was home team Essendon's opponents score? | CREATE TABLE table_33591 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_33591 WHERE "Home team" = 'essendon' |
what is the last ward id patient 11914 got in their first hospital visit. | 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount numbe... | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11914 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime DESC LIMIT 1 |
What is the location/ attendance for a 35-28 record? | CREATE TABLE table_name_4 (location_attendance VARCHAR,record VARCHAR) | SELECT location_attendance FROM table_name_4 WHERE record = "35-28" |
Name the james e. holmes for erselle young | CREATE TABLE table_3255 ("Information" text,"James E. Holmes" text,"Reidsville" text,"Rockingham County" text,"Western Rockingham Middle School" text) | SELECT "James E. Holmes" FROM table_3255 WHERE "Reidsville" = 'Erselle Young' |
i would like to fly from BOSTON to BALTIMORE | CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE flight_stop (flight_id int,stop_number int,... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO... |
Find names and ids of all documents with document type code BK. | CREATE TABLE Documents (document_name VARCHAR,document_id VARCHAR,document_type_code VARCHAR) | SELECT document_name, document_id FROM Documents WHERE document_type_code = "BK" |
Is 443 available for undergrads ? | CREATE TABLE area (course_id int,area varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program_course (program_id int,course_id int,workload int,categ... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 443 |
Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52? | CREATE TABLE table_56376 ("State" text,"Swimsuit" real,"Evening gown" real,"Interview" real,"Average" real) | SELECT "State" FROM table_56376 WHERE "Average" < '8.67' AND "Swimsuit" = '8.27' AND "Evening gown" = '8.78' AND "Interview" = '8.52' |
what is the date when the competition is 1996 tiger cup and the result is drew? | CREATE TABLE table_63979 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Date" FROM table_63979 WHERE "Competition" = '1996 tiger cup' AND "Result" = 'drew' |
Find the ids of all the order items whose product id is 11. | CREATE TABLE orders (order_id number,customer_id number,order_status text,date_order_placed time,order_details text)CREATE TABLE shipment_items (shipment_id number,order_item_id number)CREATE TABLE customers (customer_id number,customer_name text,customer_details text)CREATE TABLE products (product_id number,product_na... | SELECT order_item_id FROM order_items WHERE product_id = 11 |
Which class had a rank of 2nd? | CREATE TABLE table_name_52 (class VARCHAR,rank VARCHAR) | SELECT class FROM table_name_52 WHERE rank = "2nd" |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of price , and group by attribute name, and order X-axis in asc order. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name |
papers about character recognition from before 2010 | CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE venue (venueid int,venuename va... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'character recognition' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year < 2010 |
Bar graph to show maximal age from different sex, and could you list Sex from high to low order? | CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))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 Has_amenity (dormi... | SELECT Sex, MAX(Age) FROM Student GROUP BY Sex ORDER BY Sex DESC |
Opponent of @ atlanta flames had what game? | CREATE TABLE table_name_44 (game VARCHAR,opponent VARCHAR) | SELECT game FROM table_name_44 WHERE opponent = "@ atlanta flames" |
What Country is Catalogue # ASW 50248 (724385024825) from? | CREATE TABLE table_36896 ("Country" text,"Date" text,"Label" text,"Format" text,"Catalogue #" text) | SELECT "Country" FROM table_36896 WHERE "Catalogue #" = 'asw 50248 (724385024825)' |
what was the first care unit of patient 22204's ward until 2 years ago? | CREATE TABLE d_icd_diagnoses (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)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,cha... | SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22204) AND NOT transfers.careunit IS NULL AND DATETIME(transfers.intime) <= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY transfers.intime LIMIT 1 |
Can you tell me the sum of Money ($) that has the Score of 69-72-67-71=279, and the Player of loren roberts? | CREATE TABLE table_name_84 (money___ INTEGER,player VARCHAR,score VARCHAR) | SELECT SUM(money___) AS $__ FROM table_name_84 WHERE score = 69 - 72 - 67 - 71 = 279 AND player = "loren roberts" |
What date was the district incumbent Saxby Chambliss elected? | CREATE TABLE table_26336739_1 (elected INTEGER,incumbent VARCHAR) | SELECT MAX(elected) FROM table_26336739_1 WHERE incumbent = "Saxby Chambliss" |
Find the address line 1 and 2 of the customer with email 'vbogisich@example.org'. | CREATE TABLE staff (staff_id number,gender text,first_name text,last_name text,email_address text,phone_number text)CREATE TABLE complaints (complaint_id number,product_id number,customer_id number,complaint_outcome_code text,complaint_status_code text,complaint_type_code text,date_complaint_raised time,date_complaint_... | SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" |
What is the district for the party federalist and the candidates are william craik (f) 51.0% benjamin edwards 49.0%? | CREATE TABLE table_2668416_7 (district VARCHAR,party VARCHAR,candidates VARCHAR) | SELECT district FROM table_2668416_7 WHERE party = "Federalist" AND candidates = "William Craik (F) 51.0% Benjamin Edwards 49.0%" |
which surface was played on the least ? | CREATE TABLE table_204_127 (id number,"outcome" text,"no." number,"date" text,"tournament" text,"surface" text,"opponent" text,"score" text) | SELECT "surface" FROM table_204_127 GROUP BY "surface" ORDER BY COUNT(*) LIMIT 1 |
What is the lowest area of the region with a population less than 22,955,395 in Bangladesh with a density less than 1034? | CREATE TABLE table_68903 ("Rank" real,"Country/Region" text,"Population" real,"Area (km 2)" real,"Density (Pop. per km 2)" real) | SELECT MIN("Area (km 2 )") FROM table_68903 WHERE "Population" < '22,955,395' AND "Country/Region" = 'bangladesh' AND "Density (Pop. per km 2 )" < '1034' |
Which venue has Tickets Sold/ Available with a Gross Revenue (1979) of $665,232? | CREATE TABLE table_68530 ("Venue" text,"City" text,"Tickets Sold / Available" text,"Gross Revenue (1979)" text,"Gross Revenue (2012)" text) | SELECT "Tickets Sold / Available" FROM table_68530 WHERE "Gross Revenue (1979)" = '$665,232' |
What is every total for the University of the Cordilleras UC Dance Squad? | CREATE TABLE table_2523 ("Rank" real,"School" text,"Basic Elements" real,"Tumbling" real,"Stunts" text,"Pyramids" text,"Tosses" text,"Deductions" text,"Total" text) | SELECT "Total" FROM table_2523 WHERE "School" = 'University of the Cordilleras UC Dance Squad' |
what is the date when the round is sf? | CREATE TABLE table_77191 ("Date" text,"Round" text,"Opponent" text,"Venue" text,"Result" text,"Attendance" real) | SELECT "Date" FROM table_77191 WHERE "Round" = 'sf' |
In the county where Bush won 77.76%, how many total votes were cast? | CREATE TABLE table_13625792_1 (total__number VARCHAR,bush__percentage VARCHAR) | SELECT total__number FROM table_13625792_1 WHERE bush__percentage = "77.76%" |
How many pairs of numbers are under record on April 12? | CREATE TABLE table_18824 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT COUNT("Record") FROM table_18824 WHERE "Date" = 'April 12' |
Bar graph to show the average of high temperature from different day of week, and could you show y axis in ascending order? | 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 route (train_id int,station_id int)CREATE TABLE station (id int,network_name text,services text,local_authority text)CREATE TABLE train (id int,train_number int,name t... | SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week ORDER BY AVG(high_temperature) |
retrieve the patients' ids who are diagnosed with streptococcus unspecf since 2103. | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE ch... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_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 = 'streptococcus unspecf') AND STRFTIME('%y', diagnoses_icd.charttime) >= '21... |
Highest reputation users with a specific badge. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStat... | SELECT RANK() OVER (ORDER BY u.Reputation DESC) AS Rank, u.Id AS "user_link", u.Reputation, COUNT(b.Id) AS "count" FROM Badges AS b INNER JOIN Users AS u ON b.UserId = u.Id WHERE (b.Name = '##name?Famous Question##') GROUP BY u.Id, u.Reputation ORDER BY u.Reputation DESC LIMIT 500 |
all flights leaving WASHINGTON to SAN FRANCISCO that are FIRST class | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE c... | 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, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND fare_basis.class_type = 'FIRST' AND far... |
If the Played was played, what is the lost? | CREATE TABLE table_74942 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT "Lost" FROM table_74942 WHERE "Played" = 'played' |
Name the driver for race time being 2:34:21 | CREATE TABLE table_20856 ("Year" real,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race time" text,"Average speed (mph)" text,"Report" text) | SELECT "Driver" FROM table_20856 WHERE "Race time" = '2:34:21' |
What state is Ding and has a royal house of Ji? | CREATE TABLE table_12473 ("State" text,"Type" text,"Name" text,"Title" text,"Royal house" text,"From" text) | SELECT "State" FROM table_12473 WHERE "Royal house" = 'ji' AND "Name" = 'ding' |
How many tries against got the club with 62 tries for? | CREATE TABLE table_72449 ("Club" text,"Played" text,"Won" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text) | SELECT "Tries against" FROM table_72449 WHERE "Tries for" = '62' |
Which Track number has a Album title of , and a Title of ? | CREATE TABLE table_43805 ("Release date" text,"Album title" text,"Record label" text,"Disc number" text,"Track number" text,"Title" text) | SELECT "Track number" FROM table_43805 WHERE "Album title" = '文武双全升级版' AND "Title" = '老爸你别装酷' |
Which Election has a 2nd Member of reform act 1867 : constituency abolished? | CREATE TABLE table_12985 ("Election" text,"1st Member" text,"1st Party" text,"2nd Member" text,"2nd Party" text) | SELECT "Election" FROM table_12985 WHERE "2nd Member" = 'reform act 1867 : constituency abolished' |
Find the name of the customers who have at most two orders. | CREATE TABLE orders (order_id number,customer_id number,order_status text,date_order_placed time,order_details text)CREATE TABLE shipments (shipment_id number,order_id number,invoice_number number,shipment_tracking_number text,shipment_date time,other_shipment_details text)CREATE TABLE customers (customer_id number,cus... | SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING COUNT(*) <= 2 |
until 2102 how many patients were prescribed cefazolin (ancef) in dextrose ivpb 2 g during the same month after being diagnosed with cholecystitis - acute? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cholecystitis - acute' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2102') AS t1 JOIN (SELECT patient.uni... |
what is the number of patients whose admission type is urgent and with lab test item id 50980? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.itemid = "50980" |
On March 23, what is the site/stadium? | CREATE TABLE table_name_21 (site_stadium VARCHAR,date VARCHAR) | SELECT site_stadium FROM table_name_21 WHERE date = "march 23" |
tell me the number of medicaid insurance patients who had procedure icd9 code 4432. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.icd9_code = "4432" |
When against is 797 and wins is more than 10, what is the sum of draws? | CREATE TABLE table_64311 ("Club" text,"Wins" real,"Losses" real,"Draws" real,"Against" real) | SELECT COUNT("Draws") FROM table_64311 WHERE "Against" = '797' AND "Wins" > '10' |
How many total No Results are recorded for less than 6 wins? | CREATE TABLE table_name_21 (no_result VARCHAR,wins INTEGER) | SELECT COUNT(no_result) FROM table_name_21 WHERE wins < 6 |
What is the description of document status code 'working'? | CREATE TABLE documents_mailed (document_id number,mailed_to_address_id number,mailing_date time)CREATE TABLE ref_document_types (document_type_code text,document_type_description text)CREATE TABLE ref_document_status (document_status_code text,document_status_description text)CREATE TABLE employees (employee_id number,... | SELECT document_status_description FROM ref_document_status WHERE document_status_code = "working" |
find the maximum age of patients whose admission location is emergency room and primary disease is copd exacerbation. | 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 MAX(demographic.age) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "COPD EXACERBATION" |
What's the date when the location is Berlin? | CREATE TABLE table_38834 ("Distance" text,"Time" text,"Date" text,"Location" text,"Notes" text) | SELECT "Date" FROM table_38834 WHERE "Location" = 'berlin' |
Find the route of administration for medication with a GELCLAIR drug code. | 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 prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "GELCLAIR" |
What was the transfer fee for the player ending in 2011 and moving from Thrasyvoulos? | CREATE TABLE table_7725 ("Nat." text,"Name" text,"Moving from" text,"Type" text,"Transfer window" text,"Ends" real,"Transfer fee" text) | SELECT "Transfer fee" FROM table_7725 WHERE "Ends" = '2011' AND "Moving from" = 'thrasyvoulos' |
What is the attendance in a week earlier than 4, and result is w 31-20? | CREATE TABLE table_66377 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT AVG("Attendance") FROM table_66377 WHERE "Week" < '4' AND "Result" = 'w 31-20' |
In what genre did Microvision develop a game? | CREATE TABLE table_name_49 (genre VARCHAR,developer VARCHAR) | SELECT genre FROM table_name_49 WHERE developer = "microvision" |
What is the name of the player with a transfer window in summer, an undisclosed transfer fee, and is moving from brussels? | CREATE TABLE table_50446 ("Name" text,"Country" text,"Type" text,"Moving from" text,"Transfer window" text,"Transfer fee" text) | SELECT "Name" FROM table_50446 WHERE "Transfer window" = 'summer' AND "Transfer fee" = 'undisclosed' AND "Moving from" = 'brussels' |
I want to know the events for 106 bands | CREATE TABLE table_31778 ("Year" real,"Date" text,"Event" text,"Days" text,"Stages" text,"Acts" text) | SELECT "Event" FROM table_31778 WHERE "Acts" = '106 bands' |
What name has a qual 2 of 1:43.374? | CREATE TABLE table_name_97 (name VARCHAR,qual_2 VARCHAR) | SELECT name FROM table_name_97 WHERE qual_2 = "1:43.374" |
i'd like the earliest flight from DALLAS to BOSTON | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_tim... | 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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON... |
What was the highest place result in 2010 with a Clean and Jerk weight of 224kg? | CREATE TABLE table_name_92 (place INTEGER,year VARCHAR,clean_and_jerk VARCHAR) | SELECT MAX(place) FROM table_name_92 WHERE year = 2010 AND clean_and_jerk = "224kg" |
How many millions of U.S. viewers watched the episode with the production code of 6AKY07? | CREATE TABLE table_28027307_1 (us_viewers__millions_ VARCHAR,production_code VARCHAR) | SELECT us_viewers__millions_ FROM table_28027307_1 WHERE production_code = "6AKY07" |
For the vessel with a listed In service of 1, what is the origin given? | CREATE TABLE table_name_57 (origin VARCHAR,in_service VARCHAR) | SELECT origin FROM table_name_57 WHERE in_service = 1 |
give the number of patients whose insurance is government and lab test name is hematocrit, other fluid. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "Hematocrit, Other Fluid" |
what is the report where the location is kyalami? | CREATE TABLE table_16748 ("Rnd" real,"Race" text,"Date" text,"Location" text,"Pole Position" text,"Fastest Lap" text,"Race Winner" text,"Constructor" text,"Report" text) | SELECT "Report" FROM table_16748 WHERE "Location" = 'Kyalami' |
Goals that has a Position of 14th of 24, and a League of football conference has what sum? | CREATE TABLE table_15161 ("Year" text,"League" text,"Position" text,"Leading Scorer" text,"Goals" real) | SELECT SUM("Goals") FROM table_15161 WHERE "Position" = '14th of 24' AND "League" = 'football conference' |
Visualize a scatter chart about the correlation between Team_ID and School_ID , and group by attribute Team_Name. | 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 Team_ID, School_ID FROM basketball_match GROUP BY Team_Name |
What is the Location when the name is telmatosaurus? | CREATE TABLE table_name_23 (location VARCHAR,name VARCHAR) | SELECT location FROM table_name_23 WHERE name = "telmatosaurus" |
Name the least rank subcontinent for bangladesh | CREATE TABLE table_25049 ("Rank Subcontinent" real,"Rank Asia" real,"Rank World" real,"Country" text,"2011 GDP (PPP) billions of USD" text) | SELECT MIN("Rank Subcontinent") FROM table_25049 WHERE "Country" = 'Bangladesh' |
Who is the home team when Preston North End is the away team? | CREATE TABLE table_name_89 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team FROM table_name_89 WHERE away_team = "preston north end" |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the amount of name , and group by attribute name, and rank from high to low by the bars 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 T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC |
How many Byes have Wins smaller than 11, and a Wimmera FL of minyip murtoa, and Losses smaller than 6? | CREATE TABLE table_65612 ("Wimmera FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT COUNT("Byes") FROM table_65612 WHERE "Wins" < '11' AND "Wimmera FL" = 'minyip murtoa' AND "Losses" < '6' |
What was the year of previous participation for the school in the Kagoshima prefecture? | CREATE TABLE table_2518850_4 (year_of_previous_participation VARCHAR,prefecture VARCHAR) | SELECT year_of_previous_participation FROM table_2518850_4 WHERE prefecture = "Kagoshima" |
Who wrote Season 8? | CREATE TABLE table_16617025_1 (written_by VARCHAR,season__number VARCHAR) | SELECT written_by FROM table_16617025_1 WHERE season__number = 8 |
show me the patient ids who are diagnosed with b-complex defic nec in 2101. | CREATE TABLE d_labitems (row_id number,itemid number,label 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 number,intime time,outtime time)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_... | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_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 = 'b-complex defic nec') AND STRFTIME('%y', diagnoses_icd.charttime) = '2101'... |
Which team has an away score of 18.14 (122)? | CREATE TABLE table_55148 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_55148 WHERE "Away team score" = '18.14 (122)' |
who was the highest ranking player to withdraw from the 2010 french open tournament ? | CREATE TABLE table_204_188 (id number,"rank" number,"player" text,"points" number,"points defending" number,"points won" number,"new points" number,"withdrew due to" text) | SELECT "player" FROM table_204_188 ORDER BY "rank" LIMIT 1 |
What aorist has bude in present tense? | CREATE TABLE table_27298240_26 (aorist VARCHAR,present VARCHAR) | SELECT aorist FROM table_27298240_26 WHERE present = "bude" |
Which date was the show aired on the RTL Televizija network? | CREATE TABLE table_name_90 (date_aired VARCHAR,network VARCHAR) | SELECT date_aired FROM table_name_90 WHERE network = "rtl televizija" |
Which country won in 1988? | CREATE TABLE table_61581 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Country" FROM table_61581 WHERE "Year(s) won" = '1988' |
Which network was located in Illinois? | CREATE TABLE table_27871460_2 (network VARCHAR,state_or_territory VARCHAR) | SELECT network FROM table_27871460_2 WHERE state_or_territory = "Illinois" |
What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with. | CREATE TABLE medicine_enzyme_interaction (medicine_id VARCHAR)CREATE TABLE medicine (id VARCHAR,Name VARCHAR,FDA_approved VARCHAR) | SELECT T1.id, T1.Name, T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC |
What is the last year that someone is first elected? | CREATE TABLE table_18681 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT MAX("First elected") FROM table_18681 |
How many wins when the average start is 29.0? | CREATE TABLE table_24648 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text) | SELECT COUNT("Wins") FROM table_24648 WHERE "Avg. Start" = '29.0' |
For those records from the products and each product's manufacturer, visualize the relationship between code and code . | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code |
Name the least podiums for 0 wins and 2005 season for 321 points | CREATE TABLE table_23703 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"F/Laps" real,"Podiums" real,"Points" text,"Position" text) | SELECT MIN("Podiums") FROM table_23703 WHERE "Wins" = '0' AND "Season" = '2005' AND "Points" = '321' |
What is the lowest overall amount of w's? | CREATE TABLE table_31198 ("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("W") FROM table_31198 |
Questions which you answered, by title keyword. | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE PostHistor... | SELECT a.Id AS "post_link", a.Body FROM Posts AS a INNER JOIN Posts AS b ON a.ParentId = b.Id WHERE a.OwnerUserId = '##UserId##' AND LOWER(b.Title) LIKE '%##Keyword##%' ORDER BY a.Id DESC |
What is Darrius Heyward-Bey's average with more than 20 yards and less than 80 long? | CREATE TABLE table_34231 ("Player" text,"Rec." real,"Yards" real,"Avg." real,"Long" real) | SELECT COUNT("Avg.") FROM table_34231 WHERE "Yards" > '20' AND "Player" = 'darrius heyward-bey' AND "Long" < '80' |
What was the score for the player from the United states that was +1 to par? | CREATE TABLE table_name_64 (score VARCHAR,to_par VARCHAR,country VARCHAR) | SELECT score FROM table_name_64 WHERE to_par = "+1" AND country = "united states" |
what is the difference in the year published between iso/iec 15288 and iso/ice 20000-1 ? | CREATE TABLE table_204_200 (id number,"iso/iec standard" text,"title" text,"status" text,"description" text,"wg" number) | SELECT ABS((SELECT "status" FROM table_204_200 WHERE "iso/iec standard" = 'iso/iec 15288') - (SELECT "status" FROM table_204_200 WHERE "iso/iec standard" = 'iso/iec 20000-1')) |
Name the winner for nick nuyens for general classification and stage of 2 | CREATE TABLE table_name_96 (winner VARCHAR,general_classification VARCHAR,stage VARCHAR) | SELECT winner FROM table_name_96 WHERE general_classification = "nick nuyens" AND stage = "2" |
Which Bronze has a Total smaller than 2, and a Silver larger than 0, and a Gold smaller than 0? | CREATE TABLE table_name_69 (bronze INTEGER,gold VARCHAR,total VARCHAR,silver VARCHAR) | SELECT SUM(bronze) FROM table_name_69 WHERE total < 2 AND silver > 0 AND gold < 0 |
list airlines that fly from SEATTLE to SALT LAKE CITY | CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections ... | SELECT DISTINCT airline.airline_code FROM airline, 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 = 'SEATTLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_n... |
how many patients whose diagnoses short title is dmii oth uncntrld? | 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 WHERE diagnoses.short_title = "DMII oth uncntrld" |
What is the Venue of the Friendly Competition with a Score of 1 4? | CREATE TABLE table_60429 ("Date" text,"Venue" text,"Score" text,"Competition" text,"Report" text) | SELECT "Venue" FROM table_60429 WHERE "Competition" = 'friendly' AND "Score" = '1–4' |
Show me about the distribution of Team_Name and Team_ID in a bar chart, sort X-axis from low to high order. | 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_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT Team_Name, Team_ID FROM basketball_match ORDER BY Team_Name |
What is 1 vs 2 when total is more than 28 and 2 vs 3 is 8? | CREATE TABLE table_12199 ("Preferences" text,"1. vs 2." real,"1. vs 3." real,"2. vs 3." real,"Total" real) | SELECT "1. vs 2." FROM table_12199 WHERE "Total" > '28' AND "2. vs 3." = '8' |
Justin Wilson has what has his best time? | CREATE TABLE table_name_99 (best VARCHAR,name VARCHAR) | SELECT best FROM table_name_99 WHERE name = "justin wilson" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.