instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What comparable country has a national share of 1.08? | CREATE TABLE table_1629 ("Rank" real,"Administrative Division" text,"Area (km\u00b2)" real,"Area (sq mi)" real,"National Share (%)" text,"Comparable Country" text) | SELECT "Comparable Country" FROM table_1629 WHERE "National Share (%)" = '1.08' |
Draw a scatterplot of team id vs school_id where team id is on the x-axis and points are colored by ACC_Road | 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_ID, School_ID FROM basketball_match GROUP BY ACC_Road |
What was the year that had Anugerah Bintang Popular Berita Harian 23 as competition? | CREATE TABLE table_name_30 (year VARCHAR,competition VARCHAR) | SELECT COUNT(year) FROM table_name_30 WHERE competition = "anugerah bintang popular berita harian 23" |
When 3.89 is the production code how many season numbers are there? | CREATE TABLE table_26804862_1 (season__number VARCHAR,production_code VARCHAR) | SELECT COUNT(season__number) FROM table_26804862_1 WHERE production_code = "3.89" |
Name the Date and an Opponent which has a f Position and Career Games of 123 games? | CREATE TABLE table_48076 ("Total Points" real,"Name" text,"Career Games" text,"Position" text,"Years Played" text,"Scored 1,500 Points" text,"Date and Opponent" text) | SELECT "Date and Opponent" FROM table_48076 WHERE "Position" = 'f' AND "Career Games" = '123 games' |
What school or team does Al Jefferson play for? | CREATE TABLE table_252 ("Player" text,"No." text,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text) | SELECT "School/Club Team" FROM table_252 WHERE "Player" = 'Al Jefferson' |
what is maximum days of hospital stay of patients whose primary disease is st elevated myocardial infarction\cardiac cath? | 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 MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" |
Is CJS 591 offering sections on days other than Monday next semester ? | 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 course_offering.section_number FROM course, course_offering, semester WHERE course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND course.department = 'CJS' AND course.number = 591 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.ye... |
How many different engines are there for the model with model designation 97G00? | CREATE TABLE table_23970 ("Model Type" text,"Model Designation" text,"Engine" text,"Wheelbase (mm/inch)" text,"GVW (kg/ton)" text,"Axle Ratio" text) | SELECT COUNT("Engine") FROM table_23970 WHERE "Model Designation" = '97G00' |
What is the Website of the Cheadle Hulme School with a Report of Ofsted for Ages 4-19? | CREATE TABLE table_8416 ("School" text,"Locality" text,"Ages" text,"Report" text,"Website" text) | SELECT "Website" FROM table_8416 WHERE "Report" = 'ofsted' AND "Ages" = '4-19' AND "Locality" = 'cheadle hulme' |
Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products. | CREATE TABLE department_store_chain (dept_store_chain_id number,dept_store_chain_name text)CREATE TABLE addresses (address_id number,address_details text)CREATE TABLE order_items (order_item_id number,order_id number,product_id number)CREATE TABLE staff_department_assignments (staff_id number,department_id number,date_... | SELECT AVG(total_amount_purchased), AVG(total_value_purchased) FROM product_suppliers WHERE supplier_id = (SELECT supplier_id FROM product_suppliers GROUP BY supplier_id ORDER BY COUNT(*) DESC LIMIT 1) |
What is Points Against, when Try Diff is +22? | CREATE TABLE table_name_88 (points_against VARCHAR,try_diff VARCHAR) | SELECT points_against FROM table_name_88 WHERE try_diff = "+22" |
Which team 1 has team 2, Gomera? | CREATE TABLE table_42405 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "Team 1" FROM table_42405 WHERE "Team 2" = 'gomera' |
In 1983, what was the RAtt? | CREATE TABLE table_54935 ("Year" text,"Team" text,"Comp" text,"Rate" text,"RAtt" text,"RYds" text,"RAvg" text) | SELECT "RAtt" FROM table_54935 WHERE "Year" = '1983' |
What is the Round din Ullevaal? | CREATE TABLE table_49400 ("Date" text,"Venue" text,"Opponents" text,"Score" text,"Round" text) | SELECT "Round" FROM table_49400 WHERE "Venue" = 'ullevaal' |
What is the Venue for Goal number 1? | CREATE TABLE table_78078 ("Goal" real,"Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Venue" FROM table_78078 WHERE "Goal" = '1' |
how many chinese places are there in the bay area ? | CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar) | SELECT COUNT(*) FROM geographic, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'chinese' |
who directed and produced 176452? | CREATE TABLE table_26561498_1 (directed_by VARCHAR,production_code VARCHAR) | SELECT directed_by FROM table_26561498_1 WHERE production_code = 176452 |
What date has 136-134 as the score? | CREATE TABLE table_name_83 (date VARCHAR,score VARCHAR) | SELECT date FROM table_name_83 WHERE score = "136-134" |
is there any record of microbiology test done for patient 32163 this year? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_diagnoses (row_id... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32163) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
How many original air dates totaled 26.06 million viewers? | CREATE TABLE table_22210 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT COUNT("Original air date") FROM table_22210 WHERE "U.S. viewers (millions)" = '26.06' |
Name the courses that I need to take before MUSPERF 781 . | 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 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... |
5th career/salary of automotive designer ($350,000-degree) had what career card? | CREATE TABLE table_38690 ("Career Card" text,"Starting career/salary" text,"2nd career/salary" text,"3rd career/salary" text,"4th career/salary" text,"5th career/salary" text,"6th career/salary" text) | SELECT "Career Card" FROM table_38690 WHERE "5th career/salary" = 'automotive designer ($350,000-degree)' |
What is the first number in series that had the production code 1ACX03? | CREATE TABLE table_19528 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT MAX("No. in series") FROM table_19528 WHERE "Production code" = '1ACX03' |
During which years was the model with the Engine code of m54b25 manufactured? | CREATE TABLE table_name_11 (years VARCHAR,engine_code VARCHAR) | SELECT years FROM table_name_11 WHERE engine_code = "m54b25" |
What was the highest attendance at Junction Oval? | CREATE TABLE table_name_90 (crowd INTEGER,venue VARCHAR) | SELECT MAX(crowd) FROM table_name_90 WHERE venue = "junction oval" |
Name the Weight which has a Name of bal zs h rai category:articles with hcards? | CREATE TABLE table_name_10 (weight VARCHAR,name VARCHAR) | SELECT weight FROM table_name_10 WHERE name = "balázs hárai category:articles with hcards" |
How long was the great manchester run? | CREATE TABLE table_28358 ("Road race" text,"Distance" text,"Location" text,"Country" text,"Month held" text) | SELECT "Distance" FROM table_28358 WHERE "Road race" = 'Great Manchester Run' |
What is the catalogue number for Brazil? | CREATE TABLE table_name_8 (catalogue__number VARCHAR,country VARCHAR) | SELECT catalogue__number FROM table_name_8 WHERE country = "brazil" |
provide the number of patients whose admission location is phys referral/normal deli and drug code is cefe1i? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.formulary_drug_cd = "CEFE1I" |
what kind of ground transportation is there in PHILADELPHIA | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_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 va... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PHILADELPHIA' AND ground_service.city_code = city.city_code |
What is Score, when Attendance is '303'? | CREATE TABLE table_12731 ("Tie no" real,"Home team" text,"Score" text,"Away team" text,"Attendance" real) | SELECT "Score" FROM table_12731 WHERE "Attendance" = '303' |
How many different products are produced in each headquarter city. Visualize by bar chart. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code |
Who was the athlete with react of 0.185? | CREATE TABLE table_63296 ("Rank" real,"Lane" real,"Athlete" text,"Nationality" text,"Time" real,"React" real) | SELECT "Athlete" FROM table_63296 WHERE "React" = '0.185' |
what is the earliest departure time from BOSTON to DENVER | CREATE TABLE code_description (code varchar,description text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,f... | SELECT DISTINCT flight.departure_time 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 = 'D... |
What away is there for the q3 round? | CREATE TABLE table_61376 ("Round" text,"Opponents" text,"Home" text,"Away" text,"Aggregate" text) | SELECT "Away" FROM table_61376 WHERE "Round" = 'q3' |
What is BYU's lowest pick? | CREATE TABLE table_39614 ("Round" real,"Pick #" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT MIN("Pick #") FROM table_39614 WHERE "College" = 'byu' |
The episode written by Rebecca Dameron aired on what date? | CREATE TABLE table_11111116_6 (original_air_date VARCHAR,written_by VARCHAR) | SELECT original_air_date FROM table_11111116_6 WHERE written_by = "Rebecca Dameron" |
Nigeria had the fastest time once. | CREATE TABLE table_17601 ("Rank" real,"Fastest time (s)" text,"Wind (m/s)" text,"Athlete" text,"Nation" text,"Date" text,"Location" text) | SELECT COUNT("Fastest time (s)") FROM table_17601 WHERE "Nation" = 'Nigeria' |
display the department name, city, and state province for each department. | CREATE TABLE countries (country_id text,country_name text,region_id number)CREATE TABLE locations (location_id number,street_address text,postal_code text,city text,state_province text,country_id text)CREATE TABLE employees (employee_id number,first_name text,last_name text,email text,phone_number text,hire_date time,j... | SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id |
What's the opponent for July 2? | CREATE TABLE table_name_12 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_12 WHERE date = "july 2" |
What 2nd Party has an Election of 1885? | CREATE TABLE table_60552 ("Election" text,"1st Member" text,"1st Party" text,"2nd Member" text,"2nd Party" text) | SELECT "2nd Party" FROM table_60552 WHERE "Election" = '1885' |
What has Luke S Zettlemoyer published in the last 8 years ? | CREATE TABLE writes (paperid int,authorid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE field (fieldid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE dataset (datas... | SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'Luke S Zettlemoyer' AND paper.year >= YEAR(CURDATE()) - 8 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
How many different cities are represented by contestants whose height stands at 1.80? | CREATE TABLE table_24997 ("Province,Community" text,"Contestant" text,"Age" real,"Height" text,"Hometown" text,"Geographical Regions" text) | SELECT COUNT("Hometown") FROM table_24997 WHERE "Height" = '1.80' |
What is the Location when the Opponent shows vs. #23 south carolina? | CREATE TABLE table_name_83 (location VARCHAR,opponent VARCHAR) | SELECT location FROM table_name_83 WHERE opponent = "vs. #23 south carolina" |
What is the name of the Opponent when the Result was w48-0? | CREATE TABLE table_37991 ("Date" text,"Opponent" text,"Site" text,"Result" text,"Attendance" text) | SELECT "Opponent" FROM table_37991 WHERE "Result" = 'w48-0' |
Distribution of HNQs based on hours until entering. | CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDat... | WITH times_cte AS (SELECT p.Id AS pid, p.CreationDate AS cre, ph.CreationDate AS hot, FLOOR(CAST(CAST((JULIANDAY(CreationDate) - JULIANDAY(p.CreationDate)) * 1440.0 AS INT) AS FLOAT) / 60) AS time FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE ph.PostHistoryTypeId = 52) SELECT time, COUNT(pid) A... |
Name the winning driver for mobilecast impul and twin ring motegi | CREATE TABLE table_name_98 (winning_driver VARCHAR,winning_team VARCHAR,circuit VARCHAR) | SELECT winning_driver FROM table_name_98 WHERE winning_team = "mobilecast impul" AND circuit = "twin ring motegi" |
patient 004-86136 was diagnosed during their first hospital visit for the last time with what? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature ... | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-86136' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... |
What is the name of the player when the category is 3-pt field goal percentage? | CREATE TABLE table_28628309_9 (player VARCHAR,category VARCHAR) | SELECT player FROM table_28628309_9 WHERE category = "3-pt field goal percentage" |
how many chinese restaurants are there in the bay area ? | CREATE TABLE geographic (city_name varchar,county varchar,region varchar)CREATE TABLE restaurant (id int,name varchar,food_type varchar,city_name varchar,rating "decimal)CREATE TABLE location (restaurant_id int,house_number int,street_name varchar,city_name varchar) | SELECT COUNT(*) FROM geographic, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'chinese' |
Which show had a part 3 before 2011? | CREATE TABLE table_52920 ("Year" real,"Show" text,"Season" real,"Episode title" text,"Episode" real) | SELECT "Show" FROM table_52920 WHERE "Year" < '2011' AND "Episode title" = 'part 3' |
How many provinces are named Wellington? | CREATE TABLE table_3776 ("Province" text,"Formed date" text,"Formed from" text,"Dissolution date" text,"Reason" text) | SELECT COUNT("Formed date") FROM table_3776 WHERE "Province" = 'Wellington' |
What is the lowest grid that Paul Tracy had when he had over 4 points? | CREATE TABLE table_15406 ("Name" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Points" real) | SELECT MIN("Grid") FROM table_15406 WHERE "Name" = 'paul tracy' AND "Points" > '4' |
what flight from BOSTON to ATLANTA arrives earliest in ATLANTA | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varcha... | 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 = 'ATLANT... |
what is the avaerage of patients whose admission location is phys referral/normal deli and have stayed in the hospital for 29 days? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.days_stay = "29" |
Return a bar chart about the distribution of meter_600 and meter_100 , and rank by the Y in descending. | CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te... | SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_100 DESC |
When carmelo anthony (39) has the highest amount of points where is the location and what is the attendance? | CREATE TABLE table_25873 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text) | SELECT "Location Attendance" FROM table_25873 WHERE "High points" = 'Carmelo Anthony (39)' |
Who was the actor/actress with a last appearance of 1 january 2010 and total is 20 and character is vanessa 'nessa' jenkins? | CREATE TABLE table_3442 ("Actor/Actress" text,"Character" text,"First Appearance" text,"Last Appearance" text,"Duration" text,"Total" real) | SELECT "Actor/Actress" FROM table_3442 WHERE "Last Appearance" = '1 January 2010' AND "Total" = '20' AND "Character" = 'Vanessa ''Nessa'' Jenkins' |
Find meter_300 and ID , and visualize them by a bar chart, and show bar in asc order. | CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Ev... | SELECT meter_300, ID FROM swimmer ORDER BY meter_300 |
A bar chart that computes the total number of wines with a price is bigger than 100. Next, Bin the year into the weekday interval. | 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)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT) | SELECT Year, COUNT(Year) FROM wine WHERE Price > 100 |
On average, what is the number of silver medals for nations ranking higher than 7, with a total of 6 medals and fewer than 2 bronze medals? | CREATE TABLE table_name_38 (silver INTEGER,bronze VARCHAR,rank VARCHAR,total VARCHAR) | SELECT AVG(silver) FROM table_name_38 WHERE rank > 7 AND total = 6 AND bronze < 2 |
What was the date of the game held at the Al-Rashid Stadium, Dubai? | CREATE TABLE table_40732 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Date" FROM table_40732 WHERE "Venue" = 'al-rashid stadium, dubai' |
Which 2nd Party has an Election of 1837? | CREATE TABLE table_name_96 (election VARCHAR) | SELECT 2 AS nd_party FROM table_name_96 WHERE election = "1837" |
What are the dates and locations of performances? | CREATE TABLE performance (Date VARCHAR,LOCATION VARCHAR) | SELECT Date, LOCATION FROM performance |
Name the max top 5 for 5.0 avg finish | CREATE TABLE table_20991 ("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 MAX("Top 5") FROM table_20991 WHERE "Avg. Finish" = '5.0' |
Fetch me the most cited publications for Artificial Intelligence | CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE paperdataset (paperid int,datasetid ... | SELECT DISTINCT cite.citedpaperid, COUNT(cite.citingpaperid) FROM cite, keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Artificial Intelligence' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = cite.citedpaperid AND paper.paperid = paperkeyphrase.paperid GROUP BY cite.citedpa... |
Which nation has the most nuclear plants under construction? | CREATE TABLE nuclear_power_plants (id text,name text,latitude text,longitude text,country text,status text,reactortype text,reactormodel text,constructionstartat text,operationalfrom text,operationalto text,capacity text,lastupdatedat text,source text) | SELECT country FROM nuclear_power_plants WHERE status = "Under Construction" GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1 |
Which team had a 2008-3 2008 draft? | CREATE TABLE table_name_1 (school_club_team VARCHAR,draft VARCHAR) | SELECT school_club_team FROM table_name_1 WHERE draft = "2008-3 2008" |
In what round smaller than 10, was the center les studdard picked in? | CREATE TABLE table_67014 ("Round" real,"Pick" real,"Name" text,"Position" text,"College" text) | SELECT MIN("Pick") FROM table_67014 WHERE "Position" = 'center' AND "Name" = 'les studdard' AND "Round" < '10' |
what type of game has the resuts of 1:0? | CREATE TABLE table_name_78 (type_of_game VARCHAR,results¹ VARCHAR) | SELECT type_of_game FROM table_name_78 WHERE results¹ = "1:0" |
what are the five most commonly ordered drugs for patients who received physiotherapy of chest previously during the same hospital visit, this year? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitsta... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'physiotherapy o... |
count the number of times patient 23858 has been given a tpn d15.0 until 75 months ago. | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23858)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tpn d15.0' A... |
What was the original air date for episode number 96 in the series? | CREATE TABLE table_29101 ("Series #" real,"Episode #" real,"Title" text,"Director" text,"Writer" text,"Original airdate" text) | SELECT "Original airdate" FROM table_29101 WHERE "Series #" = '96' |
Who did the high rebounds in the game in which Brandon Jennings (8) did the high assists? | CREATE TABLE table_22871316_6 (high_rebounds VARCHAR,high_assists VARCHAR) | SELECT high_rebounds FROM table_22871316_6 WHERE high_assists = "Brandon Jennings (8)" |
What is Player, when Class is 'senior', when Position is 'shooting guard', and when School is 'Bradley'? | CREATE TABLE table_50155 ("Season" text,"Player" text,"School" text,"Position" text,"Class" text) | SELECT "Player" FROM table_50155 WHERE "Class" = 'senior' AND "Position" = 'shooting guard' AND "School" = 'bradley' |
What is the English title for years after 1981 originating from Argentina? | CREATE TABLE table_15529 ("Year" real,"English title" text,"Original title" text,"Country" text,"Director" text) | SELECT "English title" FROM table_15529 WHERE "Year" > '1981' AND "Country" = 'argentina' |
I want to see trend of the number of season by season, and order by the X-axis in ascending. | CREATE TABLE stadium (id int,name text,Home_Games int,Average_Attendance real,Total_Attendance real,Capacity_Percentage real)CREATE TABLE injury_accident (game_id int,id int,Player text,Injury text,Number_of_matches text,Source text)CREATE TABLE game (stadium_id int,id int,Season int,Date text,Home_team text,Away_team ... | SELECT Season, COUNT(Season) FROM game GROUP BY Season ORDER BY Season |
Show last names for all student who are on scholarship. | CREATE TABLE Sportsinfo (StuID VARCHAR,onscholarship VARCHAR)CREATE TABLE Student (Lname VARCHAR,StuID VARCHAR) | SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.onscholarship = 'Y' |
Who was the driver in 1986? | CREATE TABLE table_25213 ("Year" text,"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_25213 WHERE "Year" = '1986' |
For those records from the products and each product's manufacturer, give me the comparison about the sum of price over the headquarter , and group by attribute headquarter by a bar chart. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter |
What is the average Against, when Status is '2007 Rugby World Cup', and when Opposing Teams is 'U.S.A.'? | CREATE TABLE table_59531 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT AVG("Against") FROM table_59531 WHERE "Status" = '2007 rugby world cup' AND "Opposing Teams" = 'u.s.a.' |
what are the top four most frequent specimen tests a patient had within 2 months after being diagnosed with ped cycl acc-ped cyclist since 2105? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id numbe... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... |
What is the verb meaning of the word with part 2 'bant'? | CREATE TABLE table_72910 ("Class" text,"Part 1" text,"Part 2" text,"Part 3" text,"Part 4" text,"Verb meaning" text) | SELECT "Verb meaning" FROM table_72910 WHERE "Part 2" = 'bant' |
What K League classic had less than 10 teams? | CREATE TABLE table_name_3 (k_league_classic VARCHAR,teams INTEGER) | SELECT k_league_classic FROM table_name_3 WHERE teams < 10 |
Which Proto-Oceanic has a Proto-Polynesian of *lima? | CREATE TABLE table_41804 ("Number" text,"Proto-Austronesian" text,"Proto-Malayo-Polynesian" text,"Proto-Oceanic" text,"Proto-Polynesian" text) | SELECT "Proto-Oceanic" FROM table_41804 WHERE "Proto-Polynesian" = '*lima' |
If I need to fulfill the ULCS requirement , what 's the easiest class I can take ? | CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... |
What's the value for utah when texas is humphrey? | CREATE TABLE table_62539 ("Year" text,"Arizona" text,"California" text,"Colorado" text,"Nevada" text,"New Mexico" text,"Oklahoma" text,"Texas" text,"Utah" text) | SELECT "Utah" FROM table_62539 WHERE "Texas" = 'humphrey' |
Closures and reopenings attributed to an user. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId numbe... | SELECT PH.PostId, P.Title FROM PostHistory AS PH INNER JOIN Posts AS P ON P.Id = PH.PostId WHERE PH.UserId = '##UserId##' AND PH.PostHistoryTypeId = 10 ORDER BY P.CreationDate |
Which Artist has the Label of Columbia and the Standard number of COCC-72073? | CREATE TABLE table_name_86 (artist VARCHAR,label VARCHAR,standard_number VARCHAR) | SELECT artist FROM table_name_86 WHERE label = "columbia" AND standard_number = "cocc-72073" |
give me the number of patients whose marital status is married and procedure long title is non-invasive mechanical ventilation? | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Non-invasive mechanical ventilation" |
Top React-Native users in Turkey. | CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayN... | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =... |
What is the average draw number of an entrant with a time of 22:29? | CREATE TABLE table_65339 ("Draw" real,"Entrant" text,"Brand" text,"Order" text,"Eliminated by" text,"Time" text) | SELECT AVG("Draw") FROM table_65339 WHERE "Time" = '22:29' |
Which Class has a Year(s) of Manufacture of 1899? | CREATE TABLE table_78836 ("Class" text,"Number(s)" text,"Quantity" real,"Year(s) of Manufacture" text,"Type" text) | SELECT "Class" FROM table_78836 WHERE "Year(s) of Manufacture" = '1899' |
What courses are the prerequisites to SM 217 ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE course_offering (offering_id int,course_id int,semes... | 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... |
What Team has the Engine of Chevrolet 6.0 V8, the Manufacturer of Opel, and the Driver Chris Jackson? | CREATE TABLE table_name_51 (team VARCHAR,driver VARCHAR,engine VARCHAR,manufacturer VARCHAR) | SELECT team FROM table_name_51 WHERE engine = "chevrolet 6.0 v8" AND manufacturer = "opel" AND driver = "chris jackson" |
what are the order id and customer id of the oldest order? | CREATE TABLE customers (customer_id number,customer_name text,customer_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 shipment_items (shipment_id number,order_item_id number)CREATE TA... | SELECT order_id, customer_id FROM orders ORDER BY date_order_placed LIMIT 1 |
Who picked a player from Weber State? | CREATE TABLE table_20902 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "CFL Team" FROM table_20902 WHERE "College" = 'Weber State' |
How many championships were won for arena football? | CREATE TABLE table_21564794_3 (championships_in_st_louis VARCHAR,sport VARCHAR) | SELECT championships_in_st_louis FROM table_21564794_3 WHERE sport = "Arena Football" |
What is the position for the Rockets years of 2004-05? | CREATE TABLE table_name_75 (position VARCHAR,years_for_rockets VARCHAR) | SELECT position FROM table_name_75 WHERE years_for_rockets = "2004-05" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.