instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the number of votes when Ron Paul is the candidate with less than 0 counties? | CREATE TABLE table_40175 ("Candidate" text,"Votes" real,"Percentage" text,"Counties" real,"Delegates" real) | SELECT COUNT("Votes") FROM table_40175 WHERE "Candidate" = 'ron paul' AND "Counties" < '0' |
what is the total amount of times porsche is a constructor ? | CREATE TABLE table_203_406 (id number,"entrant" text,"constructor" text,"chassis" text,"engine" text,"tyre" text,"driver" text,"rounds" text) | SELECT COUNT(DISTINCT "entrant") FROM table_203_406 WHERE "constructor" = 'porsche' |
What title episode did Paris Barclay direct? | CREATE TABLE table_20726262_2 (title VARCHAR,directedby VARCHAR) | SELECT title FROM table_20726262_2 WHERE directedby = "Paris Barclay" |
Show me about the distribution of date_address_to and the sum of monthly_rental bin date_address_to by time in a bar chart. | CREATE TABLE Students (student_id INTEGER,address_id INTEGER,first_name VARCHAR(80),middle_name VARCHAR(40),last_name VARCHAR(40),cell_mobile_number VARCHAR(40),email_address VARCHAR(40),date_first_rental DATETIME,date_left_university DATETIME,other_student_details VARCHAR(255))CREATE TABLE Student_Addresses (student_i... | SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC |
How many seasons featured 29 conversions? | CREATE TABLE table_23734 ("Season" text,"Games" real,"Tries" real,"Conversions" real,"Penalties" real,"Drop Goals" real,"Total Points" real) | SELECT COUNT("Penalties") FROM table_23734 WHERE "Conversions" = '29' |
How many episodes were directed by Sarah Pia Anderson? | CREATE TABLE table_25896 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT COUNT("Title") FROM table_25896 WHERE "Directed by" = 'Sarah Pia Anderson' |
Plot how many date in location from over date in location from in a line chart, and list by the X from low to high. | CREATE TABLE Ref_Calendar (Calendar_Date DATETIME,Day_Number INTEGER)CREATE TABLE Documents_to_be_Destroyed (Document_ID INTEGER,Destruction_Authorised_by_Employee_ID INTEGER,Destroyed_by_Employee_ID INTEGER,Planned_Destruction_Date DATETIME,Actual_Destruction_Date DATETIME,Other_Details VARCHAR(255))CREATE TABLE Docum... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From ORDER BY Date_in_Location_From |
How many players scored the most points on game 4? | CREATE TABLE table_13762472_3 (high_points VARCHAR,game VARCHAR) | SELECT COUNT(high_points) FROM table_13762472_3 WHERE game = 4 |
How many years of NBA experience does the player who plays position g for the Portland Trail Blazers? | CREATE TABLE table_76759 ("Player" text,"Pos." text,"Nationality" text,"Team" text,"Previous team" text,"Years of NBA experience [a ]" real,"Career with the franchise [b ]" text) | SELECT "Years of NBA experience [a ]" FROM table_76759 WHERE "Pos." = 'g' AND "Team" = 'portland trail blazers' |
For each state, find the total account balance of customers whose credit score is above 100. | CREATE TABLE customer (state VARCHAR,acc_bal INTEGER,credit_score INTEGER) | SELECT SUM(acc_bal), state FROM customer WHERE credit_score > 100 GROUP BY state |
What was the 2nd leg score if the team 1 is Deportivo Pasto? | CREATE TABLE table_3806 ("Team #1" text,"Points" text,"Team #2" text,"1st leg" text,"2nd leg" text) | SELECT "2nd leg" FROM table_3806 WHERE "Team #1" = 'Deportivo Pasto' |
When Giovanni Gaetano Orsini was the elector who was the elevator? | CREATE TABLE table_name_63 (elevator VARCHAR,elector VARCHAR) | SELECT elevator FROM table_name_63 WHERE elector = "giovanni gaetano orsini" |
Which Bronze has a Silver larger than 1, a Total larger than 3, a Nation of turkey, and a Gold smaller than 2? | CREATE TABLE table_name_53 (bronze INTEGER,gold VARCHAR,nation VARCHAR,silver VARCHAR,total VARCHAR) | SELECT SUM(bronze) FROM table_name_53 WHERE silver > 1 AND total > 3 AND nation = "turkey" AND gold < 2 |
What is the Election date for Member william richmond category:articles with hcards? | CREATE TABLE table_31590 ("Member" text,"Electorate" text,"Province" text,"MP's term" text,"Election date" text) | SELECT "Election date" FROM table_31590 WHERE "Member" = 'william richmond category:articles with hcards' |
find me paper on using Neural for Relation Extraction | CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,jou... | SELECT DISTINCT paperkeyphrase.paperid FROM keyphrase, paperkeyphrase WHERE keyphrase.keyphrasename IN ('Neural', 'Relation Extraction') GROUP BY paperkeyphrase.paperid HAVING COUNT(DISTINCT keyphrase.keyphraseid) = 1 |
For those employees who was hired before 2002-06-21, a line chart shows the change of commission_pct over hire_date, and I want to display in desc by the x-axis. | CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE employees (EMP... | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE DESC |
What is the total crowd size when the away team scores 14.6 (90)? | CREATE TABLE table_33085 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT SUM("Crowd") FROM table_33085 WHERE "Away team score" = '14.6 (90)' |
What was the score of the game for April 16? | CREATE TABLE table_name_62 (loss VARCHAR,date VARCHAR) | SELECT loss FROM table_name_62 WHERE date = "april 16" |
For those records from the products and each product's manufacturer, what is the relationship between code and code , and group by attribute founder? | 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 GROUP BY Founder |
What are the names of all tracks that are on playlists titled Movies? | CREATE TABLE genres (id number,name text)CREATE TABLE media_types (id number,name text)CREATE TABLE customers (id number,first_name text,last_name text,company text,address text,city text,state text,country text,postal_code text,phone text,fax text,email text,support_rep_id number)CREATE TABLE employees (id number,last... | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies" |
How many Annual Meeting events happened in the United Kingdom region? | CREATE TABLE party (region_id VARCHAR,party_id VARCHAR)CREATE TABLE party_events (party_id VARCHAR,Event_Name VARCHAR)CREATE TABLE region (region_id VARCHAR,region_name VARCHAR) | SELECT COUNT(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id = t2.region_id JOIN party_events AS t3 ON t2.party_id = t3.party_id WHERE t1.region_name = "United Kingdom" AND t3.Event_Name = "Annaual Meeting" |
When was the earliest year that kakha kaladze moved to milan with a rank above 9? | CREATE TABLE table_14327 ("Rank" real,"Year" real,"Name" text,"Moving from" text,"Moving to" text) | SELECT MIN("Year") FROM table_14327 WHERE "Moving to" = 'milan' AND "Name" = 'kakha kaladze' AND "Rank" < '9' |
What is the average against of Murrayfield, Edinburgh? | CREATE TABLE table_59515 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT AVG("Against") FROM table_59515 WHERE "Venue" = 'murrayfield, edinburgh' |
from WASHINGTON to PHILADELPHIA departing in the afternoon | CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE code_description (code varchar,description text)CREATE T... | 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, state WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_nam... |
What is Date, when Record is '1-1'? | CREATE TABLE table_12221 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Date" FROM table_12221 WHERE "Record" = '1-1' |
Name the gamecenter that has attendance of 65,212 | CREATE TABLE table_name_17 (gamecenter VARCHAR,attendance VARCHAR) | SELECT gamecenter FROM table_name_17 WHERE attendance = "65,212" |
Bar chart x axis headquarters y axis the total number, and sort y-axis in asc order. | CREATE TABLE people (People_ID int,Age int,Name text,Nationality text,Graduation_College text)CREATE TABLE employment (Company_ID int,People_ID int,Year_working int)CREATE TABLE company (Company_ID real,Name text,Headquarters text,Industry text,Sales_in_Billion real,Profits_in_Billion real,Assets_in_Billion real,Market... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY COUNT(*) |
how many games did they play total ? | CREATE TABLE table_204_180 (id number,"date" text,"opponent#" text,"rank#" text,"site" text,"result" text,"attendance" number) | SELECT COUNT(*) FROM table_204_180 |
What was the score at North Shore Events Centre? | CREATE TABLE table_name_9 (score VARCHAR,venue VARCHAR) | SELECT score FROM table_name_9 WHERE venue = "north shore events centre" |
what is primary disease and diagnoses icd9 code of subject name ida cook? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Ida Cook" |
Show the title and score of the movie with a pie chart. | CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Reviewer (rID int,name text) | SELECT title, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID |
Name the number at march when class is j66 | CREATE TABLE table_15608800_2 (number_at_march VARCHAR,class VARCHAR) | SELECT number_at_march FROM table_15608800_2 WHERE class = "J66" |
Name for me all PreMajor classes . | CREATE TABLE program_course (program_id int,course_id int,workload int,category 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 requirement (require... | SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id |
In which season was there a competition in the Champions League? | CREATE TABLE table_52391 ("Season" text,"Competition" text,"Round" text,"Club" text,"Score" text) | SELECT "Season" FROM table_52391 WHERE "Competition" = 'champions league' |
What is the id of the reviewer whose name has substring Mike ? | CREATE TABLE rating (rid number,mid number,stars number,ratingdate time)CREATE TABLE movie (mid number,title text,year number,director text)CREATE TABLE reviewer (rid number,name text) | SELECT rid FROM reviewer WHERE name LIKE "%Mike%" |
What is the nickname of the school located in Fairfax, VA? | CREATE TABLE table_name_98 (nickname VARCHAR,location VARCHAR) | SELECT nickname FROM table_name_98 WHERE location = "fairfax, va" |
Tell me the location for altitude being less thaan 6102 | CREATE TABLE table_name_31 (location VARCHAR,altitude__metres_ INTEGER) | SELECT location FROM table_name_31 WHERE altitude__metres_ < 6102 |
what's the thursday iuppiter (jupiter) with friday venus (venus) being vendredi | CREATE TABLE table_17769 ("Day: (see Irregularities)" text,"Sunday S\u014dl (Sun)" text,"Monday Luna (Moon)" text,"Tuesday Mars (Mars)" text,"Wednesday Mercurius (Mercury)" text,"Thursday Iuppiter (Jupiter)" text,"Friday Venus (Venus)" text,"Saturday Saturnus (Saturn)" text) | SELECT "Thursday Iuppiter (Jupiter)" FROM table_17769 WHERE "Friday Venus (Venus)" = 'vendredi' |
Name the number in series for production code being 204 | CREATE TABLE table_25810656_3 (no_in_series VARCHAR,production_code VARCHAR) | SELECT no_in_series FROM table_25810656_3 WHERE production_code = 204 |
Who was the runner-up in the Michelob Light Open at Kingsmill? | CREATE TABLE table_11054 ("Date" text,"Tournament" text,"Winning score" text,"To par" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Runner(s)-up" FROM table_11054 WHERE "Tournament" = 'michelob light open at kingsmill' |
which primary disease is the patient stephanie suchan suffering from? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT demographic.diagnosis FROM demographic WHERE demographic.name = "Stephanie Suchan" |
What is the nomination title used for the original film, Zwartboek? | CREATE TABLE table_6986 ("Year" text,"Film title used in nomination" text,"Original title" text,"Main Language(s)" text,"Result" text) | SELECT "Film title used in nomination" FROM table_6986 WHERE "Original title" = 'zwartboek' |
Which overall pick number went to college at Youngstown State? | CREATE TABLE table_16061 ("Round" real,"Choice" real,"Overall" real,"Player name" text,"Position" text,"College" text) | SELECT MIN("Overall") FROM table_16061 WHERE "College" = 'Youngstown State' |
Name the number of draws for when conceded is 25 | CREATE TABLE table_19648 ("Position" real,"Team" text,"Played" real,"Wins" real,"Draws" real,"Losses" real,"Scored" real,"Conceded" real,"Points" real) | SELECT COUNT("Draws") FROM table_19648 WHERE "Conceded" = '25' |
what is the score when the surface is hard and outcome is runner-up? | CREATE TABLE table_name_85 (score VARCHAR,surface VARCHAR,outcome VARCHAR) | SELECT score FROM table_name_85 WHERE surface = "hard" AND outcome = "runner-up" |
What is the highest localities? | CREATE TABLE table_28243 ("Metropolitan ring" text,"Localities" real,"Total" real,"Jews and others 1" real,"Thereof: Jews" real,"Arabs" real,"Population density (per km\u00b2)" text,"Annual Population growth rate" text) | SELECT MAX("Localities") FROM table_28243 |
which county is the only one to have an area less than 1,000 square kilometers ? | CREATE TABLE table_204_778 (id number,"code" number,"county" text,"former province" text,"area (km2)" number,"population\ncensus 2009" number,"capital" text) | SELECT "county" FROM table_204_778 WHERE "area (km2)" < 1000 |
What week of the season had a date of october 5, 1975? | CREATE TABLE table_name_24 (week INTEGER,date VARCHAR) | SELECT MIN(week) FROM table_name_24 WHERE date = "october 5, 1975" |
Which team is located in Westland and was previously in the Western Lakes Activities Association? | CREATE TABLE table_52250 ("Team" text,"Location" text,"Joined" real,"Conference" text,"Division" text,"Previous Conference" text) | SELECT "Team" FROM table_52250 WHERE "Previous Conference" = 'western lakes activities association' AND "Location" = 'westland' |
When was the last win of Celtic? | CREATE TABLE table_34526 ("Club" text,"Wins" text,"Last win" text,"Runners-up" text,"Last final lost" text) | SELECT "Last win" FROM table_34526 WHERE "Club" = 'celtic' |
How many losses have points against greater than 592, with high park demons as the club, and points for greater than 631? | CREATE TABLE table_40058 ("Club" text,"Wins" real,"Loses" real,"Points For" real,"Points Against" real,"Percentage" text,"Points" real) | SELECT COUNT("Loses") FROM table_40058 WHERE "Points Against" > '592' AND "Club" = 'high park demons' AND "Points For" > '631' |
A bar chart for finding the number of the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties?, I want to list by the total number from high to low. | CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroller text,Attorney_General text,US_Senate text)CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text,Party int,First_Elected real,Committee text)CREATE TABLE county (County_Id int,Co... | SELECT Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY COUNT(Comptroller) DESC |
Name the country moving to chelsea | CREATE TABLE table_51863 ("Name" text,"Country" text,"Status" text,"Moving to" text,"Transfer window" text,"Transfer fee" text) | SELECT "Country" FROM table_51863 WHERE "Moving to" = 'chelsea' |
What are the highest points for Justin Lofton when his top 10 is lower than 5? | CREATE TABLE table_name_14 (points INTEGER,driver VARCHAR,top_10 VARCHAR) | SELECT MAX(points) FROM table_name_14 WHERE driver = "justin lofton" AND top_10 < 5 |
Show me about the distribution of family_name and author_id in a bar chart. | CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Subjects (subject_id INTEGER,subject_name VARCHAR(120))CREATE TABLE Student_Course_Enro... | SELECT family_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name |
did atlantic coast conference have more or less bids than colonial athletic association ? | CREATE TABLE table_203_187 (id number,"conference" text,"bids" number,"record" text,"win %" number,"quarterfinals" number,"semifinals" number,"final" number,"champions" number) | SELECT (SELECT "bids" FROM table_203_187 WHERE "conference" = 'atlantic coast conference') > (SELECT "bids" FROM table_203_187 WHERE "conference" = 'colonial athletic association') |
Bar graph to show the average of product price from different product category code | CREATE TABLE Complaints (complaint_id INTEGER,product_id INTEGER,customer_id INTEGER,complaint_outcome_code VARCHAR(20),complaint_status_code VARCHAR(20),complaint_type_code VARCHAR(20),date_complaint_raised DATETIME,date_complaint_closed DATETIME,staff_id INTEGER)CREATE TABLE Products (product_id INTEGER,parent_produc... | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code |
What is the lowest against of the wimmera fl warrack eagles, which have less than 16 wins? | CREATE TABLE table_name_33 (against INTEGER,wins VARCHAR,wimmera_fl VARCHAR) | SELECT MIN(against) FROM table_name_33 WHERE wins < 16 AND wimmera_fl = "warrack eagles" |
count the number of male patients who were admitted in hospital before 2127. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.admityear < "2127" |
How many accounts for different account details? Draw a bar chart, sort X-axis in asc order please. | CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,product_quantity VARCHAR(50),other_order_item_details VARCHAR(255))CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,date_account_opened DATETIME,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Finan... | SELECT other_account_details, COUNT(other_account_details) FROM Accounts GROUP BY other_account_details ORDER BY other_account_details |
What was the score of the match in which Portsmouth was the Away team? | CREATE TABLE table_10274 ("Tie no" text,"Home team" text,"Score 1" text,"Away team" text,"Attendance" text) | SELECT "Score 1" FROM table_10274 WHERE "Away team" = 'portsmouth' |
has patient 005-4471 excreted output (ml)-chest tube #2 midaxillary left mid;lateral today? | 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 COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-4471')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput... |
what was the name of the organism detected in patient 5849's last microbiological urine test since 05/2103? | CREATE TABLE d_labitems (row_id number,itemid number,label text)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 cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,c... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5849) AND microbiologyevents.spec_type_desc = 'urine' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.charttime) >=... |
When the type is 'reset' what is the description? | CREATE TABLE table_19854 ("Category" text,"Type" text,"Attribute" text,"Description" text,"Bubbles" text,"Cancelable" text) | SELECT "Description" FROM table_19854 WHERE "Type" = 'reset' |
calculate the total amount of input of patient 006-65715 on 01/23/last year. | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsyst... | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-65715')) AND intakeoutput.cellpath LIKE '%in... |
Name the crew chief for ricky craven | CREATE TABLE table_24667 ("Team" text,"Truck(s)" text,"#" real,"Driver(s)" text,"Primary Sponsor(s)" text,"Listed Owner(s)" text,"Crew Chief" text) | SELECT "Crew Chief" FROM table_24667 WHERE "Driver(s)" = 'Ricky Craven' |
Who was the winner on a hard surface on the week of November 13? | CREATE TABLE table_name_30 (winner VARCHAR,surface VARCHAR,week VARCHAR) | SELECT winner FROM table_name_30 WHERE surface = "hard" AND week = "november 13" |
Where did they play the San Diego Chargers? | CREATE TABLE table_13259009_2 (game_site VARCHAR,opponent VARCHAR) | SELECT game_site FROM table_13259009_2 WHERE opponent = "San Diego Chargers" |
Questions (id, title) of a given user. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,P... | SELECT Id AS "post_link", Title, CreationDate, Score FROM Posts WHERE OwnerUserId = '##user?36688##' AND PostTypeId = 1 ORDER BY CreationDate DESC |
Who are the mens singles and womens singles with sun yu? | CREATE TABLE table_18804 ("Year" real,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT "Mens singles" FROM table_18804 WHERE "Womens singles" = 'Sun Yu' |
count the number of patients whose marital status is married and procedure icd9 code is 4611? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.icd9_code = "4611" |
How many years had a formula of Grand Prix? | CREATE TABLE table_name_46 (year VARCHAR,formula VARCHAR) | SELECT COUNT(year) FROM table_name_46 WHERE formula = "grand prix" |
How many teams are listed for February 18? | CREATE TABLE table_20353 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT COUNT("Team") FROM table_20353 WHERE "Date" = 'February 18' |
What is the average Bronze, when Silver is 0, when Rank is 19, and when Total is greater than 2? | CREATE TABLE table_name_29 (bronze INTEGER,total VARCHAR,silver VARCHAR,rank VARCHAR) | SELECT AVG(bronze) FROM table_name_29 WHERE silver = 0 AND rank = "19" AND total > 2 |
Where is California Lutheran University located? | CREATE TABLE table_14976504_2 (location VARCHAR,institution VARCHAR) | SELECT COUNT(location) FROM table_14976504_2 WHERE institution = "California Lutheran University" |
What is the French word for the Italian word nazione? | CREATE TABLE table_19819 ("Ido" text,"English" text,"Italian" text,"French" text,"German" text,"Russian" text,"Spanish" text) | SELECT "French" FROM table_19819 WHERE "Italian" = 'nazione' |
what name is above may 1944 | CREATE TABLE table_204_577 (id number,"name" text,"first operational" text,"numeral system" text,"computing mechanism" text,"programming" text,"turing complete" text) | SELECT "name" FROM table_204_577 WHERE "first operational" < (SELECT "first operational" FROM table_204_577 WHERE "first operational" = 'may 1944') ORDER BY "first operational" DESC LIMIT 1 |
is dem boyz or felonies have the featured guest p. diddy ? | CREATE TABLE table_204_184 (id number,"#" number,"title" text,"producer(s)" text,"featured guest(s)" text,"length" text) | SELECT "title" FROM table_204_184 WHERE "title" IN ('"dem boyz"', '"felonies"') AND "featured guest(s)" = 'p. diddy' |
How many entrants did the events won by Frank Gary average? | CREATE TABLE table_38768 ("Entrants" real,"Winner" text,"Prize" text,"Runner-up" text,"Results" text) | SELECT AVG("Entrants") FROM table_38768 WHERE "Winner" = 'frank gary' |
which game has the least attendance ? | CREATE TABLE table_204_513 (id number,"date" text,"time" text,"opponent#" text,"site" text,"tv" text,"result" text,"attendance" number) | SELECT "opponent#" FROM table_204_513 ORDER BY "attendance" LIMIT 1 |
Which Saturday has a Thursday of mokuy bi | CREATE TABLE table_name_8 (saturday VARCHAR,thursday VARCHAR) | SELECT saturday FROM table_name_8 WHERE thursday = "木曜日 mokuyōbi" |
For those dates that have the 5 highest cloud cover rates, please bin the date into the day of week interval and count their frequency. | CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city TEXT,installation_date TEXT)CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_... | SELECT date, COUNT(date) FROM weather |
On what date was the opponent the Miami Dolphins? | CREATE TABLE table_8744 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT "Date" FROM table_8744 WHERE "Opponent" = 'miami dolphins' |
What is the average reaction for brigitte foster-hylton after heat 1? | CREATE TABLE table_name_53 (reaction INTEGER,heat VARCHAR,name VARCHAR) | SELECT AVG(reaction) FROM table_name_53 WHERE heat > 1 AND name = "brigitte foster-hylton" |
count the number of patients whose diagnoses icd9 code is 6826? | 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 demographic (subject_id text,hadm_id text,name text,marita... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "6826" |
what is the name of the race where newman/haas racing is the winning team and rick mears is at the pole position? | CREATE TABLE table_16258 ("Rnd" text,"Race Name" text,"Circuit" text,"City/Location" text,"Date" text,"Pole position" text,"Winning driver" text,"Winning team" text,"Report" text) | SELECT "Race Name" FROM table_16258 WHERE "Winning team" = 'Newman/Haas Racing' AND "Pole position" = 'Rick Mears' |
what is the rank of adam gilchrist | CREATE TABLE table_23382 ("Rank" real,"Dismissals" real,"Player" text,"Caught" real,"Stumped" real,"Matches" real,"Innings" real) | SELECT COUNT("Rank") FROM table_23382 WHERE "Player" = 'Adam Gilchrist' |
when did patient 20862 get a d5w intake for the last time on 02/19/last year? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost 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 inputevents_cv (row_id number,s... | SELECT inputevents_cv.charttime 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 = 20862)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label... |
Name the Player which has a To par of 6? | CREATE TABLE table_60260 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Player" FROM table_60260 WHERE "To par" = '–6' |
How many games were played by the player with 927 points? | CREATE TABLE table_2551 ("Season" text,"Player" text,"Nationality" text,"Team" text,"Points" real,"Average" text,"Played" real) | SELECT "Played" FROM table_2551 WHERE "Points" = '927' |
How many people were in attendance at Glenferrie Oval? | CREATE TABLE table_name_43 (crowd INTEGER,venue VARCHAR) | SELECT MIN(crowd) FROM table_name_43 WHERE venue = "glenferrie oval" |
What is the Voges-Proskauer reading for proteus mirabilis? | CREATE TABLE table_39978 ("Species" text,"Indole" text,"Methyl Red" text,"Voges-Proskauer" text,"Citrate" text) | SELECT "Voges-Proskauer" FROM table_39978 WHERE "Species" = 'proteus mirabilis' |
what are patient 12775's genders? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_... | SELECT patients.gender FROM patients WHERE patients.subject_id = 12775 |
are there more players from sweden or canada ? | CREATE TABLE table_204_140 (id number,"round" number,"#" number,"player" text,"position" text,"nationality" text,"college/junior/club team (league)" text) | SELECT "nationality" FROM table_204_140 WHERE "nationality" IN ('sweden', 'canada') GROUP BY "nationality" ORDER BY COUNT("player") DESC LIMIT 1 |
what is the name of the drug which has been prescribed to patient 030-34260 two times since 12/2105? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,tempe... | SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030... |
How many seats did the election before 2004 with 3.4% share of votes have? | CREATE TABLE table_name_72 (seats VARCHAR,election VARCHAR,share_of_votes VARCHAR) | SELECT seats FROM table_name_72 WHERE election < 2004 AND share_of_votes = "3.4%" |
What is the total of wins when the evens is less than 3? | CREATE TABLE table_42616 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real) | SELECT SUM("Wins") FROM table_42616 WHERE "Events" < '3' |
What is the average bronze medals of Uganda's swimmers when they earned over 2 medals? | CREATE TABLE table_68248 ("Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Bronze") FROM table_68248 WHERE "Nation" = 'uganda' AND "Total" > '2' |
What was the 1st leg score for the team with an Agg score of 151-134? | CREATE TABLE table_name_36 (agg VARCHAR) | SELECT 1 AS st_leg FROM table_name_36 WHERE agg = "151-134" |
What is the title of the film when the producer was 2003? | CREATE TABLE table_name_65 (title VARCHAR,producer VARCHAR) | SELECT title FROM table_name_65 WHERE producer = "2003" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.