instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
number of picks the st. louis hawks made in the draft | CREATE TABLE table_204_93 (id number,"round" number,"pick" number,"player" text,"position" text,"nationality" text,"team" text,"college" text) | SELECT COUNT("player") FROM table_204_93 WHERE "team" = 'st. louis hawks' |
Which First elected has a Incumbent of none (new seat)? | CREATE TABLE table_name_15 (first_elected VARCHAR,incumbent VARCHAR) | SELECT first_elected FROM table_name_15 WHERE incumbent = "none (new seat)" |
Name the score for madison square garden 18,828 | CREATE TABLE table_25507 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Score" FROM table_25507 WHERE "Location Attendance" = 'Madison Square Garden 18,828' |
who is the captain where coach is geoff miles | CREATE TABLE table_17002 ("Season" real,"Position" real,"Win/Loss" text,"Coach" text,"Captain" text,"Dudley Tuckey Medal" text,"Leading goalkicker" text) | SELECT "Captain" FROM table_17002 WHERE "Coach" = 'Geoff Miles' |
what is the glucose - d50 cost for? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE treatment (treatmentid number,patientunitstayid numbe... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'glucose - d50') |
Which Year(s) of manufacture has an Axle arrangement of 2 b n2? | CREATE TABLE table_name_92 (year_s__of_manufacture VARCHAR,axle_arrangement VARCHAR) | SELECT year_s__of_manufacture FROM table_name_92 WHERE axle_arrangement = "2′b n2" |
How many platinum points were awarded for 5th place? | CREATE TABLE table_16592 ("Finishing position" text,"Points awarded (Platinum)" real,"Points awarded (Gold)" real,"Points awarded (Silver)" real,"Points awarded (Satellite)" real) | SELECT MAX("Points awarded (Platinum)") FROM table_16592 WHERE "Finishing position" = '5th' |
What is the average age for a male in each job Visualize by bar chart, and show x-axis in desc order. | CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT)CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER) | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job ORDER BY job DESC |
What's the most enrolled having the dragons for a mascot and an AAA for the IHSAA Class? | CREATE TABLE table_name_88 (enrollment INTEGER,ihsaa_class VARCHAR,mascot VARCHAR) | SELECT MAX(enrollment) FROM table_name_88 WHERE ihsaa_class = "aaa" AND mascot = "dragons" |
during the last hospital encounter, when was the last time patient 26195 was prescribed amikacin? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value num... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26195 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND prescriptions.drug = 'amikacin' ORDER BY prescriptions.startdate DESC LIMIT... |
What is the lowest number of genes with less than 927,303 base pairs in Acidobacteria Bacterium? | CREATE TABLE table_54522 ("Species" text,"Strain" text,"Type" text,"Base Pairs" real,"Genes" real) | SELECT MIN("Genes") FROM table_54522 WHERE "Base Pairs" < '927,303' AND "Species" = 'acidobacteria bacterium' |
For those employees who did not have any job in the past, give me the trend about salary over hire_date . | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2)... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
How many order items correspond to each order id. Plot them as scatter chart. | CREATE TABLE Invoice_Line_Items (order_item_id INTEGER,invoice_number INTEGER,product_id INTEGER,product_title VARCHAR(80),product_quantity VARCHAR(50),product_price DECIMAL(19,4),derived_product_cost DECIMAL(19,4),derived_vat_payable DECIMAL(19,4),derived_total_cost DECIMAL(19,4))CREATE TABLE Financial_Transactions (t... | SELECT order_id, COUNT(*) FROM Order_Items GROUP BY order_id |
What episode number of the season did Tony Basgallop write? | CREATE TABLE table_3409 ("No." real,"#" real,"Episode" text,"Writer" text,"Director" text,"Original air date" text,"Viewing figure" real) | SELECT MIN("#") FROM table_3409 WHERE "Writer" = 'Tony Basgallop' |
What is the total attendance in a week less than 5 when the result was l 24-20? | CREATE TABLE table_48710 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT COUNT("Attendance") FROM table_48710 WHERE "Result" = 'l 24-20' AND "Week" < '5' |
What stadium does FK Rudar play in? | CREATE TABLE table_30654 ("#" real,"Stadium" text,"Capacity" real,"Opened" text,"City / Town" text,"Home team" text) | SELECT "Stadium" FROM table_30654 WHERE "Home team" = 'FK Rudar' |
who was from the same country as stowers ? | CREATE TABLE table_204_902 (id number,"rank" number,"name" text,"nationality" text,"time" text,"notes" text) | SELECT "name" FROM table_204_902 WHERE "name" <> 'julia stowers' AND "nationality" = (SELECT "nationality" FROM table_204_902 WHERE "name" = 'julia stowers') |
give me the number of patients whose diagnoses short title is dmi neuro nt st uncntrld and drug type is main? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "DMI neuro nt st uncntrld" AND prescriptions.drug_type = "MAIN" |
What was the maximum l&cr number for archimedes? | CREATE TABLE table_1184344_1 (cr_no VARCHAR,l INTEGER,name VARCHAR) | SELECT MAX(l) & cr_no FROM table_1184344_1 WHERE name = "Archimedes" |
What is the most bronze can be when silver is larger than 2, and the nation is germany, and gold is more than 8? | CREATE TABLE table_79610 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Bronze") FROM table_79610 WHERE "Silver" > '2' AND "Nation" = 'germany' AND "Gold" > '8' |
What's the date for HOF week? | CREATE TABLE table_name_63 (date VARCHAR,week VARCHAR) | SELECT date FROM table_name_63 WHERE week = "hof" |
Top 35 users from Ahmedabad. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId nu... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%kochi%' OR UPPER(Location) LIKE '%KOCHI%' OR Location LIKE '%kochi%' ORDER BY Reputation DESC LIMIT 35 |
Where in 1985 was tim mayotte runner up? | CREATE TABLE table_name_13 (location VARCHAR,year VARCHAR,runner_up VARCHAR) | SELECT location FROM table_name_13 WHERE year > 1985 AND runner_up = "tim mayotte" |
What number is Fall 06 from the state with 79 or less in Fall 08, 36 or greater in Fall 07 and greater than 74 in Fall 05? | CREATE TABLE table_37883 ("States" text,"Fall 05" real,"Fall 06" real,"Fall 07" real,"Fall 08" real,"Fall 09" real) | SELECT AVG("Fall 06") FROM table_37883 WHERE "Fall 08" < '79' AND "Fall 07" > '36' AND "Fall 05" > '74' |
What is the Catalog of the RCA release? | CREATE TABLE table_50745 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Catalog" FROM table_50745 WHERE "Label" = 'rca' |
What is the home of the team with Carlos Boozer (27) as the leading scorer? | CREATE TABLE table_7059 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Record" text) | SELECT "Home" FROM table_7059 WHERE "Leading scorer" = 'carlos boozer (27)' |
Name the champion for 3rd place tbc and runner-up tbc | CREATE TABLE table_69390 ("Year" text,"Champion" text,"Runner-Up" text,"3rd Place" text,"Location" text) | SELECT "Champion" FROM table_69390 WHERE "3rd Place" = 'tbc' AND "Runner-Up" = 'tbc' |
What is To Par, when Score is '66', and when Player is 'Brad Faxon'? | CREATE TABLE table_name_25 (to_par VARCHAR,score VARCHAR,player VARCHAR) | SELECT to_par FROM table_name_25 WHERE score = 66 AND player = "brad faxon" |
What is shown for Chassis for the year of 2007? | CREATE TABLE table_name_70 (chassis VARCHAR,year VARCHAR) | SELECT chassis FROM table_name_70 WHERE year = 2007 |
What are all elapsed time amounts for yacht type Reichel Pugh 55? | CREATE TABLE table_19639 ("Position" real,"Race number" text,"Sail number" text,"Yacht" text,"State/country" text,"Yacht type" text,"LOA (Metres)" text,"Skipper" text,"Elapsed time d:hh:mm:ss" text) | SELECT "Elapsed time d:hh:mm:ss" FROM table_19639 WHERE "Yacht type" = 'Reichel Pugh 55' |
Draw a bar chart of destination versus the total number, I want to display in desc by the names. | CREATE TABLE flight (flno number(4,0),origin varchar2(20),destination varchar2(20),distance number(6,0),departure_date date,arrival_date date,price number(7,2),aid number(9,0))CREATE TABLE certificate (eid number(9,0),aid number(9,0))CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance number(6,0))CREATE T... | SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY destination DESC |
Draw a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality, and order x-axis in ascending order. | CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te... | SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY Nationality |
What is the Venue of the Competition with a Score of 4-1? | CREATE TABLE table_name_11 (venue VARCHAR,score VARCHAR) | SELECT venue FROM table_name_11 WHERE score = "4-1" |
Which date has rich stadium as the game site for week 1? | CREATE TABLE table_name_13 (date VARCHAR,game_site VARCHAR,week VARCHAR) | SELECT date FROM table_name_13 WHERE game_site = "rich stadium" AND week = 1 |
What was the finish with a total larger than 286, a to par of +4 and Bob Tway played? | CREATE TABLE table_43216 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Finish" FROM table_43216 WHERE "Total" > '286' AND "To par" = '+4' AND "Player" = 'bob tway' |
What's the pick for the New York jets with a defensive end? | CREATE TABLE table_name_54 (pick VARCHAR,position VARCHAR,team VARCHAR) | SELECT pick FROM table_name_54 WHERE position = "defensive end" AND team = "new york jets" |
Show the names of members whose country is 'United States' or 'Canada'. | CREATE TABLE member (member_id number,name text,country text,college_id number)CREATE TABLE college (college_id number,name text,leader_name text,college_location text)CREATE TABLE round (round_id number,member_id number,decoration_theme text,rank_in_round number) | SELECT name FROM member WHERE country = "United States" OR country = "Canada" |
what is date of birth and procedure short title of subject name jerry deberry? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT demographic.dob, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jerry Deberry" |
What are the completion dates of all the tests that have result 'Fail', and count them by a bar chart, and show in desc by the y axis. | CREATE TABLE Courses (course_id INTEGER,author_id INTEGER,subject_id INTEGER,course_name VARCHAR(120),course_description VARCHAR(255))CREATE TABLE Course_Authors_and_Tutors (author_id INTEGER,author_tutor_ATB VARCHAR(3),login_name VARCHAR(40),password VARCHAR(40),personal_name VARCHAR(80),middle_name VARCHAR(80),family... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" ORDER BY COUNT(date_of_completion) DESC |
What was the score on April 25? | CREATE TABLE table_75530 ("Date" text,"Home" text,"Score" text,"Visitor" text,"Record" text) | SELECT "Score" FROM table_75530 WHERE "Date" = 'april 25' |
Which score has a Record of 48-55? | CREATE TABLE table_name_66 (score VARCHAR,record VARCHAR) | SELECT score FROM table_name_66 WHERE record = "48-55" |
To which party does Frank T. Bow belong? | CREATE TABLE table_18416 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Party" FROM table_18416 WHERE "Incumbent" = 'Frank T. Bow' |
How many papers did Noah Smith publish in 2010 ? | CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE field (fieldid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREA... | SELECT DISTINCT COUNT(writes.paperid) FROM author, paper, writes WHERE author.authorname = 'Noah Smith' AND paper.year = 2010 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
Who wrote the episode with 18.07 million viewers? | CREATE TABLE table_26198709_1 (written_by VARCHAR,us_viewers__million_ VARCHAR) | SELECT written_by FROM table_26198709_1 WHERE us_viewers__million_ = "18.07" |
List the locations of schools that do not have any player. | CREATE TABLE player (player_id number,player text,team text,age number,position text,school_id number)CREATE TABLE school_performance (school_id number,school_year text,class_a text,class_aa text)CREATE TABLE school_details (school_id number,nickname text,colors text,league text,class text,division text)CREATE TABLE sc... | SELECT location FROM school WHERE NOT school_id IN (SELECT school_id FROM player) |
Return the minister who left office at the latest time. | CREATE TABLE party (minister VARCHAR,left_office VARCHAR) | SELECT minister FROM party ORDER BY left_office DESC LIMIT 1 |
Which character is portrayed by Elias Koteas? | CREATE TABLE table_58199 ("Character" text,"Portrayed by" text,"Crime" text,"First appearance" text,"Last appearance" text) | SELECT "Character" FROM table_58199 WHERE "Portrayed by" = 'elias koteas' |
Which team was played against on the game where Earl Watson (6) had the highest assists on January 19? | CREATE TABLE table_58003 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Team" FROM table_58003 WHERE "High assists" = 'earl watson (6)' AND "Date" = 'january 19' |
when was the first time patient 30296 has been diagnosed with liver transplant status since 2105? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABL... | SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'liver transplant status') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30296) AND STRFTIM... |
What is South Korea's to par value? | CREATE TABLE table_name_69 (to_par VARCHAR,country VARCHAR) | SELECT to_par FROM table_name_69 WHERE country = "south korea" |
What date has the others of 2%? | CREATE TABLE table_75383 ("Polling Firm" text,"Date" text,"PSD - PC" text,"UDMR" text,"Elena B\u0103sescu" text,"Others" text,"Undecided" text) | SELECT "Date" FROM table_75383 WHERE "Others" = '2%' |
how many times did mocho cota lose to chamaco valaguez ? | CREATE TABLE table_204_373 (id number,"wager" text,"winner" text,"loser" text,"location" text,"date" text) | SELECT COUNT(*) FROM table_204_373 WHERE "loser" = 'mocho cota' AND "winner" = 'chamaco valaguez' |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, list in descending by the bars. | 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 T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC |
Specify the code of the drug Doxazosin | 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 prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Doxazosin" |
How many directors were there for the film Course Completed? | CREATE TABLE table_10798928_1 (director VARCHAR,film_title_used_in_nomination VARCHAR) | SELECT COUNT(director) FROM table_10798928_1 WHERE film_title_used_in_nomination = "Course Completed" |
What is the black caribbean population when the other black population is 2243? | CREATE TABLE table_1996 ("Rank" real,"London Borough" text,"Black African Population" real,"Black Caribbean Population" real,"Other Black Population" real,"Total Black Population" real) | SELECT MAX("Black Caribbean Population") FROM table_1996 WHERE "Other Black Population" = '2243' |
Challenges Answered by Shaggy & ETHProductions. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostFeedback (Id num... | SELECT Id FROM Posts AS a WHERE EXISTS(SELECT 1 FROM Posts WHERE ParentId = a.Id AND OwnerUserId = 58974) AND EXISTS(SELECT 1 FROM Posts WHERE ParentId = a.Id AND OwnerUserId = 42545) |
Name the date of winning score being 67-67-63=197 | CREATE TABLE table_1590652_4 (date VARCHAR,winning_score VARCHAR) | SELECT date FROM table_1590652_4 WHERE winning_score = 67 - 67 - 63 = 197 |
Who's from Bay City, TX? | CREATE TABLE table_name_20 (player VARCHAR,hometown VARCHAR) | SELECT player FROM table_name_20 WHERE hometown = "bay city, tx" |
Can I enroll in 500 -level classes for the Spring or Summer term ? | CREATE TABLE semester (semester_id int,semester varchar,year 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,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments ... | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURS... |
How few games are there for a rank more than 1 and more than 212 rebounds? | CREATE TABLE table_name_4 (games INTEGER,rank VARCHAR,rebounds VARCHAR) | SELECT MIN(games) FROM table_name_4 WHERE rank > 1 AND rebounds > 212 |
How many descriptions are there when the attribute is 'ondragstart'? | CREATE TABLE table_19853 ("Category" text,"Type" text,"Attribute" text,"Description" text,"Bubbles" text,"Cancelable" text) | SELECT COUNT("Description") FROM table_19853 WHERE "Attribute" = 'ondragstart' |
Name the most population 2002 | CREATE TABLE table_22854436_1 (population__2002_census_data_ INTEGER) | SELECT MAX(population__2002_census_data_) FROM table_22854436_1 |
Which city has the lowest GDP? Please list the city name and its GDP. | CREATE TABLE city (city VARCHAR,GDP VARCHAR) | SELECT city, GDP FROM city ORDER BY GDP LIMIT 1 |
Name the total number of results for octubre | CREATE TABLE table_2380 ("Year (Ceremony)" text,"Film title used in nomination" text,"Original title" text,"Director" text,"Result" text) | SELECT COUNT("Result") FROM table_2380 WHERE "Original title" = 'Octubre' |
What frequency has call sign w228bg? | CREATE TABLE table_name_45 (frequency_mhz VARCHAR,call_sign VARCHAR) | SELECT frequency_mhz FROM table_name_45 WHERE call_sign = "w228bg" |
When has a Type of tko, and a Round of 1 (6) | CREATE TABLE table_42541 ("Result" text,"Opponent" text,"Type" text,"Round" text,"Date" text) | SELECT "Date" FROM table_42541 WHERE "Type" = 'tko' AND "Round" = '1 (6)' |
What role was played in 2007? | CREATE TABLE table_42449 ("Year" real,"Title" text,"Producer" text,"Actor" text,"Role" text) | SELECT "Role" FROM table_42449 WHERE "Year" = '2007' |
Who was the parent on the order of 6? | CREATE TABLE table_50101 ("Order" real,"Name dates" text,"Princess Royal from (date) to (date)" text,"Parent" text,"Date married" text,"Husband dates" text) | SELECT "Parent" FROM table_50101 WHERE "Order" = '6' |
PHILADELPHIA to SAN FRANCISCO monday | CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_day... | 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 = 'SAN FRANCISCO' AND date_day.day_number = 21 AND date_day.month_number = 2... |
Which country had 1 Bronze, 1 Silver, with a total of 3 medals? | CREATE TABLE table_41764 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT "Nation" FROM table_41764 WHERE "Bronze" = '1' AND "Total" = '3' AND "Silver" = '1' |
What is the 2012 election results for locations whose representative is Barbara Lee? | CREATE TABLE table_19283806_4 (representative VARCHAR) | SELECT 2012 AS _election_results FROM table_19283806_4 WHERE representative = "Barbara Lee" |
provide the number of patients whose year of birth is less than 2043 and lab test fluid is other body fluid? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Other Body Fluid" |
what diagnosis did patient 54825 receive last in a year before? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE cost (row_id number,subject_id number,hadm_i... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825) AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(C... |
What is the total number of ranks that had vestron as the studio? | CREATE TABLE table_43683 ("Rank" real,"Title" text,"Studio" text,"Director" text,"Gross" text) | SELECT COUNT("Rank") FROM table_43683 WHERE "Studio" = 'vestron' |
count the number of patients diagnosed with sepsis. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Sepsis" |
What is the land (sqmi) at geo id 3801947380? | CREATE TABLE table_18600760_12 (land___sqmi__ VARCHAR,geo_id VARCHAR) | SELECT land___sqmi__ FROM table_18600760_12 WHERE geo_id = 3801947380 |
What sport was played by the team founded in 2010? | CREATE TABLE table_66379 ("Club" text,"Sport" text,"Founded" real,"League" text,"Venue" text) | SELECT "Sport" FROM table_66379 WHERE "Founded" = '2010' |
Give me the title and highest price for each film. Show bar chart. | CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price float)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Locatio... | SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title |
Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office? | CREATE TABLE party_events (event_id number,event_name text,party_id number,member_in_charge_id number)CREATE TABLE member (member_id number,member_name text,party_id text,in_office text)CREATE TABLE party (party_id number,minister text,took_office text,left_office text,region_id number,party_name text)CREATE TABLE regi... | SELECT minister, took_office, left_office FROM party ORDER BY left_office |
when was the last time patient 002-62161 was measured sao2 greater than 97.0 on the last intensive care unit visit? | 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 vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-62161') AND NOT patient.unitdischargetime IS NU... |
What is the highest rank of Venezuela, which has more than 9 bronze medals? | CREATE TABLE table_35127 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MIN("Rank") FROM table_35127 WHERE "Nation" = 'venezuela' AND "Bronze" > '9' |
Show the booking status code and the corresponding number of bookings Show bar chart, and order in ascending by the Y. | CREATE TABLE Apartment_Facilities (apt_id INTEGER,facility_code CHAR(15))CREATE TABLE Guests (guest_id INTEGER,gender_code CHAR(1),guest_first_name VARCHAR(80),guest_last_name VARCHAR(80),date_of_birth DATETIME)CREATE TABLE Apartment_Bookings (apt_booking_id INTEGER,apt_id INTEGER,guest_id INTEGER,booking_status_code C... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY COUNT(*) |
What is the id and detail of the vehicle used in lessons for most of the times? | CREATE TABLE staff (staff_id number,staff_address_id number,nickname text,first_name text,middle_name text,last_name text,date_of_birth time,date_joined_staff time,date_left_staff time)CREATE TABLE lessons (lesson_id number,customer_id number,lesson_status_code text,staff_id number,vehicle_id number,lesson_date time,le... | SELECT T1.vehicle_id, T1.vehicle_details FROM vehicles AS T1 JOIN lessons AS T2 ON T1.vehicle_id = T2.vehicle_id GROUP BY T1.vehicle_id ORDER BY COUNT(*) DESC LIMIT 1 |
who 2 players had at least 6 goals ? | CREATE TABLE table_203_692 (id number,"name" text,"pos." text,"caps" number,"goals" number,"club" text) | SELECT "name" FROM table_203_692 WHERE "goals" >= 6 |
what was the name of the intake that patient 17953 had a last on the first icu visit? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 prescriptions (row_id number,subject_id number,hadm_id number,sta... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 17953) AND NOT icustays.outtime IS N... |
Which Percentage has a District larger than 2, and a Party of independent? | CREATE TABLE table_name_86 (percentage VARCHAR,district VARCHAR,party VARCHAR) | SELECT percentage FROM table_name_86 WHERE district > 2 AND party = "independent" |
what are the drugs that patient 013-30085 has an allergic reaction to this month? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labname text,... | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-30085')) AND DATETIME(allergy.allergytime, 'start of month') = DATETIME(... |
Show average of budget in different year and group by department creation time with a line chart, and order by the X-axis in descending. | 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)CREATE TABLE head (head_ID int,name text,born_state text,age real) | SELECT Creation, AVG(Budget_in_Billions) FROM department GROUP BY Creation ORDER BY Creation DESC |
Name the security forces for 2009 | CREATE TABLE table_name_82 (security_forces VARCHAR,year VARCHAR) | SELECT security_forces FROM table_name_82 WHERE year = "2009" |
provide the number of patients whose gender is f and admission year is less than 2105? | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admityear < "2105" |
What is Nader's percentage when Obama is 44.6%? | CREATE TABLE table_2266 ("County" text,"McCain#" real,"McCain%" text,"Obama#" real,"Obama%" text,"Barr#" real,"Barr%" text,"Nader#" real,"Nader%" text,"McKinney#" real,"McKinney%" text,"Others#" real,"Others%" text,"Total ballots" real,"Total eligible registration" real,"Voter turnout" text) | SELECT "Nader%" FROM table_2266 WHERE "Obama%" = '44.6%' |
What is 3 dree if 8 acht is 8th achta? | CREATE TABLE table_58638 ("2 twee" text,"3 dree" text,"4 vea" text,"5 fiew" text,"6 sas" text,"7 s\u00e4wen" text,"8 acht" text,"9 n\u00e4ajen" text) | SELECT "3 dree" FROM table_58638 WHERE "8 acht" = '8th achta' |
What city of license/market has the channel of 41? | CREATE TABLE table_22340 ("City of license /Market" text,"Station" text,"Channel (TV / RF)" text,"Owned Since" real,"Affiliation" text) | SELECT "City of license /Market" FROM table_22340 WHERE "Channel ( TV / RF )" = '41' |
what is the number of players who have points less than 30 for each position?, and could you list from high to low by the y axis? | CREATE TABLE competition (Competition_ID int,Year real,Competition_type text,Country text)CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE competition_result (Competition_ID int,Club_ID_1 int,Club_ID_2 int,Score text)CREATE TABLE club_rank (... | SELECT Position, COUNT(*) FROM player WHERE Points < 30 GROUP BY Position ORDER BY COUNT(*) DESC |
find questions posted on a date. | 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", CreationDate FROM Posts WHERE CreationDate >= '02.07.2018' AND CreationDate <= '02.08.2018' |
Which opponent has a date of July 7? | CREATE TABLE table_name_35 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_35 WHERE date = "july 7" |
What is the position of the player from New York City, NY? | CREATE TABLE table_name_56 (position VARCHAR,home_town VARCHAR) | SELECT position FROM table_name_56 WHERE home_town = "new york city, ny" |
what is the total series percent that has total attempted less than 49, and a percent made of 0.777 | CREATE TABLE table_47115 ("Game" real,"3PM-A" text,"Percent Made" real,"Total Made" real,"Total Attempted" real,"Series Percent" real) | SELECT COUNT("Series Percent") FROM table_47115 WHERE "Total Attempted" < '49' AND "Percent Made" = '0.777' |
What was the attendance of the game where Stoke city was the away team? | CREATE TABLE table_3154 ("Tie no" real,"Home team" text,"Score 1" text,"Away team" text,"Attendance" real,"Date" text) | SELECT MIN("Attendance") FROM table_3154 WHERE "Away team" = 'Stoke City' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.