instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Name the class 3 for silverstone rmit university | CREATE TABLE table_22961 ("Year" text,"Location" text,"Class 1" text,"Best UK team" text,"Class 1-200" text,"Class 3" text,"Class 1a" text) | SELECT "Class 3" FROM table_22961 WHERE "Location" = 'Silverstone' AND "Class 1" = 'RMIT University' |
what's the number of days that have passed since patient 87232 last stayed in careunit micu on the current hospital visit? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)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... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 87232 AND admissions.dischtime IS NULL) AND transfers.careunit = 'micu' ORDER BY transfers.intime DESC LIMIT 1 |
Week smaller than 4, and a Game Site of rca dome, and a Opponent of new england patriots involves what date? | CREATE TABLE table_name_12 (date VARCHAR,opponent VARCHAR,week VARCHAR,game_site VARCHAR) | SELECT date FROM table_name_12 WHERE week < 4 AND game_site = "rca dome" AND opponent = "new england patriots" |
Show the name of each editor and the number of journal committees they are on using a bar chart, and sort the total number in descending order please. | CREATE TABLE journal (Journal_ID int,Date text,Theme text,Sales int)CREATE TABLE editor (Editor_ID int,Name text,Age real)CREATE TABLE journal_committee (Editor_ID int,Journal_ID int,Work_Type text) | SELECT Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Editor_ID ORDER BY COUNT(*) DESC |
What is the 1st leg of the UEFA Champions League Compeition in the Skonto Riga Club? | CREATE TABLE table_name_52 (competition VARCHAR,club VARCHAR) | SELECT 1 AS st_leg FROM table_name_52 WHERE competition = "uefa champions league" AND club = "skonto riga" |
count the number of patients that have had a intraaortic balloon pump removal procedure two or more times since 2103. | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,discha... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'intraaortic balloon pump removal' AND STRFTIME('%y', treatment.treatmenttime) >= '2103') GROUP BY patient.... |
What country has the label Control? | CREATE TABLE table_name_57 (country VARCHAR,label VARCHAR) | SELECT country FROM table_name_57 WHERE label = "control" |
What attendance does 1-6 record have? | CREATE TABLE table_name_46 (attendance INTEGER,record VARCHAR) | SELECT SUM(attendance) FROM table_name_46 WHERE record = "1-6" |
What is the goal difference sum that has goals against smaller than 33, draws larger than 13? | CREATE TABLE table_55807 ("Position" real,"Club" text,"Played" real,"Points" text,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real) | SELECT SUM("Goal Difference") FROM table_55807 WHERE "Goals against" < '33' AND "Draws" > '13' |
Who wrote the episode with the code xle05012? | CREATE TABLE table_30488 ("No." real,"#" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (million)" text) | SELECT "Written by" FROM table_30488 WHERE "Production code" = 'XLE05012' |
What is the episode on NHK with average ratings of 9.2%? | CREATE TABLE table_66113 ("Japanese Title" text,"Romaji Title" text,"TV Station" text,"Episodes" real,"Average Ratings" text) | SELECT COUNT("Episodes") FROM table_66113 WHERE "TV Station" = 'nhk' AND "Average Ratings" = '9.2%' |
How many writers wrote the episode 'Woke Up Dead'? | CREATE TABLE table_30532 ("No." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (million)" text) | SELECT COUNT("Written by") FROM table_30532 WHERE "Title" = 'Woke Up Dead' |
When asv n rnberg-s d is the mittelfranken s d what is the season? | CREATE TABLE table_23224961_2 (season VARCHAR,mittelfranken_süd VARCHAR) | SELECT season FROM table_23224961_2 WHERE mittelfranken_süd = "ASV Nürnberg-Süd" |
thank you for that information now i would like to book a flight from PHILADELPHIA to BOSTON on the night of 4 16 around 9 o'clock | 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, date_day, days, flight WHERE (((flight.departure_time BETWEEN 2130 AND 2030) AND date_day.day_number = 16 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_... |
Name the candidates for felix walker | CREATE TABLE table_28895 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_28895 WHERE "Incumbent" = 'Felix Walker' |
Name the enrollment for 2007-08 | CREATE TABLE table_23204 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" text) | SELECT "Enrollment" FROM table_23204 WHERE "Joined" = '2007-08' |
please list all flights from SAN FRANCISCO to PITTSBURGH on sunday | CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_spe... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 27 AND date_day.month_number = 8 AN... |
For those employees who did not have any job in the past, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varcha... | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID |
Show the number of apartment bookings for each year and bin booking start date by year interval in a bar chart, and could you display the number of booking start date from high to low order? | CREATE TABLE Apartments (apt_id INTEGER,building_id INTEGER,apt_type_code CHAR(15),apt_number CHAR(10),bathroom_count INTEGER,bedroom_count INTEGER,room_count CHAR(5))CREATE TABLE View_Unit_Status (apt_id INTEGER,apt_booking_id INTEGER,status_date DATETIME,available_yn BIT)CREATE TABLE Apartment_Facilities (apt_id INTE... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id ORDER BY COUNT(booking_start_date) DESC |
What is Postposition, when Noun Root (Meaning) is 'mshobl- (parent)'? | CREATE TABLE table_76302 ("noun root (meaning)" text,"case suffix (case)" text,"postposition" text,"full word" text,"English meaning" text) | SELECT "postposition" FROM table_76302 WHERE "noun root (meaning)" = 'mshobl- (parent)' |
What shows for 2nd round when the team 1 was Rc Strasbourg (d1)? | CREATE TABLE table_name_63 (team_1 VARCHAR) | SELECT 2 AS nd_round FROM table_name_63 WHERE team_1 = "rc strasbourg (d1)" |
What is Score, when Edition is 2011, and when Surface is Hard (i)? | CREATE TABLE table_62016 ("Outcome" text,"Edition" real,"Round" text,"Opponent Team" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Score" FROM table_62016 WHERE "Edition" = '2011' AND "Surface" = 'hard (i)' |
after rosenborg , which team has the most cup wins ? | CREATE TABLE table_203_683 (id number,"season" text,"league" text,"gold" text,"silver" text,"bronze" text,"winning manager" text) | SELECT "gold" FROM table_203_683 WHERE "gold" <> 'rosenborg' GROUP BY "gold" ORDER BY COUNT(*) DESC LIMIT 1 |
What was the date for game 9? | CREATE TABLE table_23881 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Bruins points" real,"Opponents" real,"Record" text) | SELECT "Date" FROM table_23881 WHERE "Game" = '9' |
What's the largest Fall 08 number when fall 09 is less than 82, fall 06 is 5, and fall 05 is less than 3? | CREATE TABLE table_38829 ("States" text,"Fall 05" real,"Fall 06" real,"Fall 07" real,"Fall 08" real,"Fall 09" real) | SELECT MAX("Fall 08") FROM table_38829 WHERE "Fall 09" < '82' AND "Fall 06" = '5' AND "Fall 05" < '3' |
What was the players position in 2013 who had 29 seasons in the second tier | CREATE TABLE table_20174 ("Club" text,"Position in 2013" text,"First season" real,"First season of current spell" real,"Number of seasons in Superettan" real,"Number of seasons in second tier" text) | SELECT "Position in 2013" FROM table_20174 WHERE "Number of seasons in second tier" = '29' |
Which home team an Away team score of 7.9 (51)? | CREATE TABLE table_51922 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Date" text) | SELECT "Home team" FROM table_51922 WHERE "Away team score" = '7.9 (51)' |
What was the larger number of players that played in 4 events that 2 wins but were less than 6 in the top 10? | CREATE TABLE table_5997 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real) | SELECT MAX("Top-25") FROM table_5997 WHERE "Events" > '4' AND "Wins" = '2' AND "Top-10" < '6' |
What kind of Wind has an Athlete of kerron stewart? | CREATE TABLE table_name_26 (wind VARCHAR,athlete VARCHAR) | SELECT wind FROM table_name_26 WHERE athlete = "kerron stewart" |
What is the production code for 'State of Grace'? | CREATE TABLE table_30811 ("Series #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT MAX("Production code") FROM table_30811 WHERE "Title" = 'State of Grace' |
What was the score to par for 156 strokes? | CREATE TABLE table_name_37 (to_par VARCHAR,total INTEGER) | SELECT COUNT(to_par) FROM table_name_37 WHERE total > 156 |
has patient 021-49082 been given any medication when they came to the hospital last time? | 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 COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-49082' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.... |
LATIN 514 has been a subject choice for how long ? | CREATE TABLE area (course_id int,area varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled ... | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'LATIN' AND course.number = 514 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 |
What's the gender of the students taught in the school founded in 1894? | CREATE TABLE table_22941 ("School" text,"Year Founded" text,"Denomination" text,"Language" text,"Grades" text,"Gender" text,"Private/Public" text) | SELECT "Gender" FROM table_22941 WHERE "Year Founded" = '1894' |
who had high assists on november 12? | CREATE TABLE table_27756314_6 (high_assists VARCHAR,date VARCHAR) | SELECT high_assists FROM table_27756314_6 WHERE date = "November 12" |
What were the results of the womens u20 when the mens 45 was Sunwest Razorbacks def Northern Eagles? | CREATE TABLE table_20997 ("Year" real,"Mens Open" text,"Womens Open" text,"Mixed Open" text,"Mens u20" text,"Womens u20" text,"Senior Mixed" text,"Mens 30" text,"Womens 30" text,"Mens 35" text,"Womens 35" text,"Mens 40" text,"Womens 40" text,"Mens 45" text,"Mens 50" text) | SELECT "Womens u20" FROM table_20997 WHERE "Mens 45" = 'SunWest Razorbacks def Northern Eagles' |
What is the highest measure number? | CREATE TABLE table_256286_39 (meas_num INTEGER) | SELECT MAX(meas_num) FROM table_256286_39 |
What is the engine code for the model xdrive35i? | CREATE TABLE table_63381 ("Model" text,"Years" text,"Engine code" text,"Power" text,"Torque" text) | SELECT "Engine code" FROM table_63381 WHERE "Model" = 'xdrive35i' |
i want to book a flight from SALT LAKE CITY to WESTCHESTER COUNTY | CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE flight_fare (flight... | 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 = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... |
what is the iata when the city is leipzig? | CREATE TABLE table_48139 ("City" text,"Country" text,"IATA" text,"ICAO" text,"Airport" text) | SELECT "IATA" FROM table_48139 WHERE "City" = 'leipzig' |
who are all the players for mission viejo high school | CREATE TABLE table_11677691_12 (player VARCHAR,school VARCHAR) | SELECT player FROM table_11677691_12 WHERE school = "Mission Viejo High school" |
i would like to fly from PITTSBURGH to ATLANTA on US | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id i... | 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTS... |
Election results of 1976 | CREATE TABLE table_18303 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_18303 WHERE "First elected" = '1976' |
What is the lowest Points when against is 50, and there are less than 20 played? | CREATE TABLE table_name_80 (points INTEGER,against VARCHAR,played VARCHAR) | SELECT MIN(points) FROM table_name_80 WHERE against = 50 AND played < 20 |
what is the grid when the driver is mario andretti and the laps is less than 54? | CREATE TABLE table_name_39 (grid INTEGER,driver VARCHAR,laps VARCHAR) | SELECT MAX(grid) FROM table_name_39 WHERE driver = "mario andretti" AND laps < 54 |
How many measures had a yes vote of 216545? | CREATE TABLE table_27931 ("meas. num." real,"passed" text,"YES votes" real,"NO votes" real,"% YES" text,"Const. Amd.?" text,"type" text,"description" text) | SELECT COUNT("passed") FROM table_27931 WHERE "YES votes" = '216545' |
What is the location of the Asian Games after 2002 when Kim Hyun-soo won the gold? | CREATE TABLE table_5297 ("Year" real,"Location" text,"Gold" text,"Silver" text,"Bronze" text) | SELECT "Location" FROM table_5297 WHERE "Year" > '2002' AND "Gold" = 'kim hyun-soo' |
provide the number of patients whose primary disease is morbid obesity/sda and age is less than 62? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.age < "62" |
what are the top four most frequent procedures given to patients in the same month after the diagnosis of hypotension nec this year? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_items (row_id number,i... | 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, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... |
Which team scored less than 35 points? | CREATE TABLE table_35670 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text) | SELECT "Team" FROM table_35670 WHERE "Points" < '35' |
What is the date that the winner driver is Stirling Moss in the race named vi grand prix de caen? | CREATE TABLE table_name_91 (date VARCHAR,winning_driver VARCHAR,race_name VARCHAR) | SELECT date FROM table_name_91 WHERE winning_driver = "stirling moss" AND race_name = "vi grand prix de caen" |
What is the table when the team is slovan bratislava? | CREATE TABLE table_29718 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Table" text,"Incoming manager" text,"Date of appointment" text) | SELECT "Table" FROM table_29718 WHERE "Team" = 'Slovan Bratislava' |
What is the average round of the s position player from the college of Mississippi and has an overall less than 214? | CREATE TABLE table_name_79 (round INTEGER,overall VARCHAR,position VARCHAR,college VARCHAR) | SELECT AVG(round) FROM table_name_79 WHERE position = "s" AND college = "mississippi" AND overall < 214 |
Show me about the distribution of Sex and the amount of Sex , and group by attribute Sex in a bar chart, list by the bars in ascending. | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real) | SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY Sex |
what is the 1st prize for may 21 | CREATE TABLE table_35801 ("Date" text,"Tournament" text,"Location" text,"Winner" text,"Score" text,"1st prize ($)" real) | SELECT SUM("1st prize ( $ )") FROM table_35801 WHERE "Date" = 'may 21' |
What is the name of the storm active during season aggregates? | CREATE TABLE table_name_48 (name VARCHAR,dates_active VARCHAR) | SELECT name FROM table_name_48 WHERE dates_active = "season aggregates" |
Which Competition has a Year smaller than 2009, and Notes of 56.16 m? | CREATE TABLE table_14031 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Notes" text) | SELECT "Competition" FROM table_14031 WHERE "Year" < '2009' AND "Notes" = '56.16 m' |
What courses are worth 10 credits ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE comment_instructor (instruc... | SELECT DISTINCT name, number FROM course WHERE credits = 10 AND department = 'EECS' |
Show sum of budget in different year and group by department creation time with a line chart, and order x axis from high to low order. | CREATE TABLE head (head_ID int,name text,born_state text,age real)CREATE TABLE department (Department_ID int,Name text,Creation text,Ranking int,Budget_in_Billions real,Num_Employees real)CREATE TABLE management (department_ID int,head_ID int,temporary_acting text) | SELECT Creation, SUM(Budget_in_Billions) FROM department GROUP BY Creation ORDER BY Creation DESC |
Who won mens singles the year sveinn logi s lvason tryggvi nilsen won mens doubles and elsa nielsen won womens singles | CREATE TABLE table_19681 ("Year" real,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT "Mens singles" FROM table_19681 WHERE "Mens doubles" = 'Sveinn Logi Sölvason Tryggvi Nilsen' AND "Womens singles" = 'Elsa Nielsen' |
Who won the season of 1998? | CREATE TABLE table_10318 ("Year" real,"Premier" text,"Runner Up" text,"Scores" text,"Venue" text,"Crowd" real,"Margin" real,"Winner Season" text,"Runner Up Season" text) | SELECT "Winner Season" FROM table_10318 WHERE "Year" = '1998' |
What is the average grid for giorgio pantano? | CREATE TABLE table_name_70 (grid INTEGER,driver VARCHAR) | SELECT AVG(grid) FROM table_name_70 WHERE driver = "giorgio pantano" |
What is the Record when Evangelista Cyborg was the opponent? | CREATE TABLE table_name_40 (record VARCHAR,opponent VARCHAR) | SELECT record FROM table_name_40 WHERE opponent = "evangelista cyborg" |
what is first weight of patient 006-158338 in this month. | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-158338') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month',... |
What is the Canton of Vaud's highest point? | CREATE TABLE table_63630 ("Rank" real,"Canton" text,"Highest point" text,"Highest elevation" text,"Lowest point" text,"Lowest elevation" text) | SELECT "Highest point" FROM table_63630 WHERE "Canton" = 'vaud' |
Return me a line chart to show the frequency of the year attribute by binning into a weekday interval, list by the x-axis in desc. | CREATE TABLE appearances (year INTEGER,team_id TEXT,league_id TEXT,player_id TEXT,g_all NUMERIC,gs NUMERIC,g_batting INTEGER,g_defense NUMERIC,g_p INTEGER,g_c INTEGER,g_1b INTEGER,g_2b INTEGER,g_3b INTEGER,g_ss INTEGER,g_lf INTEGER,g_cf INTEGER,g_rf INTEGER,g_of INTEGER,g_dh NUMERIC,g_ph NUMERIC,g_pr NUMERIC)CREATE TAB... | SELECT year, COUNT(year) FROM home_game ORDER BY year DESC |
Show the theme for exhibitions with both records of an attendance below 100 and above 500. | CREATE TABLE exhibition (theme VARCHAR,exhibition_id VARCHAR)CREATE TABLE exhibition_record (exhibition_id VARCHAR,attendance INTEGER) | SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500 |
What is the average Year for the Royal Canadian Mint Engravers Artist when the Mintage is under 200? | CREATE TABLE table_54945 ("Year" real,"Artist" text,"Composition" text,"Mintage" real,"Issue Price" text) | SELECT AVG("Year") FROM table_54945 WHERE "Artist" = 'royal canadian mint engravers' AND "Mintage" < '200' |
What the date of the game of the team that plays in princes park? | CREATE TABLE table_32355 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_32355 WHERE "Venue" = 'princes park' |
What is the name of the mill constructed of red brick in 1910 with a reference number lower than 55? | CREATE TABLE table_64817 ("Ref#" real,"Name" text,"Built" real,"Location" text,"Construction" text) | SELECT "Name" FROM table_64817 WHERE "Ref#" < '55' AND "Built" = '1910' AND "Construction" = 'red brick' |
Which Outcome has a Opponent of lindsay lee-waters? | CREATE TABLE table_name_83 (outcome VARCHAR,opponent VARCHAR) | SELECT outcome FROM table_name_83 WHERE opponent = "lindsay lee-waters" |
Name the result for linn nyg rd | CREATE TABLE table_name_63 (result VARCHAR,artist VARCHAR) | SELECT result FROM table_name_63 WHERE artist = "linn nygård" |
How many years did lin gaoyuan wu jiaji play mens doubles? | CREATE TABLE table_30314 ("Year Location" text,"Mens Singles" text,"Womens Singles" text,"Mens Doubles" text,"Womens Doubles" text) | SELECT COUNT("Year Location") FROM table_30314 WHERE "Mens Doubles" = 'Lin Gaoyuan Wu Jiaji' |
Number of posts in recent 1 month. | CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE Users (Id number,R... | SELECT COUNT(*) FROM Posts WHERE CreationDate > '2020-08-21' AND Body LIKE '%http%' |
What is the year of the season if the intermediate (South) winners is Southmead Athletic? | CREATE TABLE table_23014923_1 (season VARCHAR,intermediate__south__winners VARCHAR) | SELECT season FROM table_23014923_1 WHERE intermediate__south__winners = "Southmead Athletic" |
What 1st leg has 52-70 as the agg.? | CREATE TABLE table_42379 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "1st leg" FROM table_42379 WHERE "Agg." = '52-70' |
ON WHAT DATE DID THE HOME TEAM SCORE 12.16 (88)? | CREATE TABLE table_33670 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_33670 WHERE "Home team score" = '12.16 (88)' |
What is the player when the team is oakland raiders? | CREATE TABLE table_63732 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT "Player" FROM table_63732 WHERE "Team" = 'oakland raiders' |
what competition is lorenzo 's top position in ? | CREATE TABLE table_203_734 (id number,"year" number,"competition" text,"venue" text,"position" text,"event" text,"notes" text) | SELECT "competition" FROM table_203_734 ORDER BY "position" LIMIT 1 |
How many different kickoffs happened when the oppenent was at Rhein Fire? | CREATE TABLE table_26275503_2 (kickoff VARCHAR,opponent VARCHAR) | SELECT COUNT(kickoff) FROM table_26275503_2 WHERE opponent = "at Rhein Fire" |
When Lincoln City was the away team what is the tie number? | CREATE TABLE table_61469 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Tie no" FROM table_61469 WHERE "Away team" = 'lincoln city' |
Name the fewest points of 5 place | CREATE TABLE table_name_86 (points INTEGER,place VARCHAR) | SELECT MIN(points) FROM table_name_86 WHERE place = 5 |
Users with the lowest rep to total posts ratio. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId... | SELECT u.Id, u.DisplayName, u.Reputation, COUNT(*) AS "total_number_of_posts", CAST(u.Reputation AS FLOAT) / COUNT(*) AS Ratio FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE p.PostTypeId IN (1, 2) AND u.Reputation > 100 GROUP BY u.Id, u.DisplayName, u.Reputation ORDER BY Ratio LIMIT 1000 |
What was the club team for Kyle de Coste? | CREATE TABLE table_name_98 (club_team VARCHAR,player VARCHAR) | SELECT club_team FROM table_name_98 WHERE player = "kyle de coste" |
how many games did the mercury play in june ? | CREATE TABLE table_203_689 (id number,"date" text,"opponent" text,"score" text,"result" text,"record" text) | SELECT COUNT(*) FROM table_203_689 WHERE "date" = 6 |
Who directed the episode titled 'Redemptio'? | CREATE TABLE table_2902 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "Directed by" FROM table_2902 WHERE "Title" = 'Redemptio' |
Name the Years as tallest has a Height metres / ft of 07.0 150 / 493 [b ]? | CREATE TABLE table_59048 ("Name" text,"Location" text,"Years as tallest" text,"Height metres / ft" text,"Floors" text) | SELECT "Years as tallest" FROM table_59048 WHERE "Height metres / ft" = '07.0 150 / 493 [b ]' |
What type of engine does the model with model designation 97100 have? | CREATE TABLE table_23975 ("Model Type" text,"Model Designation" text,"Engine" text,"Wheelbase (mm/inch)" text,"GVW (kg/ton)" text,"Axle Ratio" text) | SELECT "Engine" FROM table_23975 WHERE "Model Designation" = '97100' |
What position and school/club team of Oklahoma state has an overall less than 410 and a round smaller than 5? | CREATE TABLE table_4717 ("Round" real,"Overall" real,"Player" text,"Position" text,"School/Club Team" text) | SELECT "Position" FROM table_4717 WHERE "Overall" < '410' AND "Round" < '5' AND "School/Club Team" = 'oklahoma state' |
tell me the total amount of input that patient 5310 has received on last month/01? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_items (row_id number,i... | SELECT SUM(inputevents_cv.amount) 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 = 5310)) AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(),... |
Which round is a lower score than 21.5? | CREATE TABLE table_68909 ("Round" text,"Name" text,"Song" text,"Score" real,"Status" text) | SELECT "Round" FROM table_68909 WHERE "Score" < '21.5' |
What are the years that have a duration of 15 years and giulia poggi as the character? | CREATE TABLE table_65587 ("Actor" text,"Character" text,"Soap Opera" text,"Years" text,"Duration" text) | SELECT "Years" FROM table_65587 WHERE "Duration" = '15 years' AND "Character" = 'giulia poggi' |
when was the last time that patient 027-136480 received the bronchodilator - metered dose procedure since 2105? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicm... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-136480')) AND treatment.treatmentname = 'bronchodilator - met... |
Which Decile has an Authority of state, a Roll smaller than 61, and an Area of kotemaori? | CREATE TABLE table_name_34 (decile VARCHAR,area VARCHAR,authority VARCHAR,roll VARCHAR) | SELECT decile FROM table_name_34 WHERE authority = "state" AND roll < 61 AND area = "kotemaori" |
What is the average Year when the Competition was friendly, and a Club of everton? | CREATE TABLE table_name_28 (year INTEGER,competition VARCHAR,club VARCHAR) | SELECT AVG(year) FROM table_name_28 WHERE competition = "friendly" AND club = "everton" |
How many patients aged below 43 years old are diagnosed with prob-head/neck/trunk nos? | 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 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,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "43" AND diagnoses.short_title = "Prob-head/neck/trunk NOS" |
What's the total losses when there are 8 wins and less than 2 byes? | CREATE TABLE table_64004 ("Wimmera FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT SUM("Losses") FROM table_64004 WHERE "Wins" = '8' AND "Byes" < '2' |
Which college had an overall smaller than 315 in round 17? | CREATE TABLE table_name_41 (college VARCHAR,overall VARCHAR,round VARCHAR) | SELECT college FROM table_name_41 WHERE overall < 315 AND round = 17 |
What is the name of the baseball stadium for the school with the Murray Center basketball arena? | CREATE TABLE table_23257 ("School" text,"Baseball stadium" text,"Softball stadium" text,"Basketball arena" text,"Capacity" text) | SELECT "Baseball stadium" FROM table_23257 WHERE "Basketball arena" = 'The Murray Center' |
What is the Location for the buick-goodwrench open? | CREATE TABLE table_name_40 (location VARCHAR,tournament VARCHAR) | SELECT location FROM table_name_40 WHERE tournament = "buick-goodwrench open" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.