instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
How many golds had a silver of more than 1, rank more than 1, total of more than 4 when the bronze was also more than 4? | CREATE TABLE table_name_12 (gold INTEGER,bronze VARCHAR,total VARCHAR,silver VARCHAR,rank VARCHAR) | SELECT SUM(gold) FROM table_name_12 WHERE silver > 1 AND rank > 1 AND total > 4 AND bronze > 4 |
What's the sum of ERP W with a Frequency MHz that larger than 97.7? | CREATE TABLE table_70513 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Height m (ft)" text,"Class" text,"FCC info" text) | SELECT COUNT("ERP W") FROM table_70513 WHERE "Frequency MHz" > '97.7' |
How many heats had 5 lanes and a rank less than 110 for the nationality of Honduras? | CREATE TABLE table_33595 ("Rank" real,"Heat" real,"Lane" real,"Name" text,"Nationality" text) | SELECT COUNT("Heat") FROM table_33595 WHERE "Lane" = '5' AND "Rank" > '110' AND "Nationality" = 'honduras' |
For all employees who have the letters D or S in their first name, show me the trend about employee_id over hire_date with a line chart. | 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 jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE regions (REGION_ID decimal(5,0),R... | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' |
Name who wrote the episode directed by pam cooke & jansen yee | CREATE TABLE table_23235679_1 (written_by VARCHAR,directed_by VARCHAR) | SELECT written_by FROM table_23235679_1 WHERE directed_by = "Pam Cooke & Jansen Yee" |
Which Location has an Enrollment larger than 543? | CREATE TABLE table_66611 ("School" text,"Location" text,"Mascot" text,"Enrollment" real,"IHSAA Class" text,"County" text) | SELECT "Location" FROM table_66611 WHERE "Enrollment" > '543' |
what is insurance and death status of subject id 8990? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT demographic.insurance, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "8990" |
Show all cities along with the number of drama workshop groups in each city with a bar chart, and rank by the X in ascending. | CREATE TABLE Services (Service_ID INTEGER,Service_Type_Code CHAR(15),Workshop_Group_ID INTEGER,Product_Description VARCHAR(255),Product_Name VARCHAR(255),Product_Price DECIMAL(20,4),Other_Product_Service_Details VARCHAR(255))CREATE TABLE Clients (Client_ID INTEGER,Address_ID INTEGER,Customer_Email_Address VARCHAR(255),... | SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town ORDER BY City_Town |
Who is scheduled to teach MACROMOL 517 ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE course (course_id int,name varchar,... | SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MACROMOL' AND course.number = 517 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offeri... |
For those employees whose first name does not contain the letter M, give me a line chart to show the hire date and the corresponding salaries, and sort x-axis in asc order. | 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),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE va... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY HIRE_DATE |
what's the currency name with highest monthly inflation rate being 29,500% | CREATE TABLE table_18916 ("Country" text,"Currency name" text,"Month with highest inflation rate" text,"Highest monthly inflation rate" text,"Equivalent daily inflation rate" text,"Time required for prices to double" text) | SELECT "Currency name" FROM table_18916 WHERE "Highest monthly inflation rate" = '29,500%' |
Name the total number of total for rank of 7 and bronze less than 1 | CREATE TABLE table_name_68 (total VARCHAR,rank VARCHAR,bronze VARCHAR) | SELECT COUNT(total) FROM table_name_68 WHERE rank = "7" AND bronze < 1 |
What are the lowest points for an engine with a Dallara F303 chassis? | CREATE TABLE table_7470 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT MIN("Points") FROM table_7470 WHERE "Chassis" = 'dallara f303' |
What is the title of the track after 11? | CREATE TABLE table_54479 ("Track" real,"Title" text,"Performer" text,"Length" text,"Original Album" text) | SELECT "Title" FROM table_54479 WHERE "Track" > '11' |
Name the number of proto austronesian for *natu | CREATE TABLE table_15568886_14 (proto_austronesian VARCHAR,proto_oceanic VARCHAR) | SELECT COUNT(proto_austronesian) FROM table_15568886_14 WHERE proto_oceanic = "*natu" |
Show me all the restaurants. | CREATE TABLE restaurant_type (restypeid number,restypename text,restypedescription text)CREATE TABLE type_of_restaurant (resid number,restypeid number)CREATE TABLE restaurant (resid number,resname text,address text,rating number)CREATE TABLE visits_restaurant (stuid number,resid number,time time,spent number)CREATE TAB... | SELECT resname FROM restaurant |
Return a bar chart about the distribution of meter_700 and ID , order in ascending by the Y. | 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 swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time ... | SELECT meter_700, ID FROM swimmer ORDER BY ID |
Provide me the number of female patients who have neoplasm of uncertain behavior of other lymphatic and hematopoietic tissues/bone marrow transplant as their primary disease. | 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 WHERE demographic.gender = "F" AND demographic.diagnosis = "NEOPLASM OF UNCERTAIN BEHAVIOR OF OTHER LYMPHATIC AND HEMATOPOIETIC TISSUES\BONE MARROW TRANSPLANT" |
Bar chart of maximal product price from each product type code, and I want to list in ascending by the bars please. | CREATE TABLE Department_Stores (dept_store_id INTEGER,dept_store_chain_id INTEGER,store_name VARCHAR(80),store_address VARCHAR(255),store_phone VARCHAR(80),store_email VARCHAR(80))CREATE TABLE Staff_Department_Assignments (staff_id INTEGER,department_id INTEGER,date_assigned_from DATETIME,job_title_code VARCHAR(10),dat... | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code |
what competition was on 9 may 2006 ? | CREATE TABLE table_204_52 (id number,"#" number,"date" text,"venue" text,"opponent" text,"score" text,"result" text,"competition" text) | SELECT "competition" FROM table_204_52 WHERE "date" = '9 may 2006' |
What is the total population for Saint-Antoine with an area squared of 6.43? | CREATE TABLE table_name_60 (population INTEGER,official_name VARCHAR,area_km_2 VARCHAR) | SELECT SUM(population) FROM table_name_60 WHERE official_name = "saint-antoine" AND area_km_2 > 6.43 |
Which track translates to Flemish Women? | CREATE TABLE table_name_96 (track VARCHAR,translation VARCHAR) | SELECT track FROM table_name_96 WHERE translation = "flemish women" |
List the name of tracks belongs to genre Rock or media type is MPEG audio file. | CREATE TABLE media_types (id VARCHAR,name VARCHAR)CREATE TABLE genres (id VARCHAR,name VARCHAR)CREATE TABLE tracks (name VARCHAR,genre_id VARCHAR,media_type_id VARCHAR) | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file" |
Which To par has a Score of 67-72-71-75=285? | CREATE TABLE table_name_40 (to_par VARCHAR,score VARCHAR) | SELECT to_par FROM table_name_40 WHERE score = 67 - 72 - 71 - 75 = 285 |
For those records from the products and each product's manufacturer, find name and code , and group by attribute name, and visualize them by a bar chart, and could you display by the x axis in ascending? | 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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name |
Club Clwb Rygbi Cymru Caerdydd RFC has how many points? | CREATE TABLE table_name_40 (points VARCHAR,club VARCHAR) | SELECT points FROM table_name_40 WHERE club = "clwb rygbi cymru caerdydd rfc" |
What is the population of area of 11? | CREATE TABLE table_name_15 (population VARCHAR,area VARCHAR) | SELECT population FROM table_name_15 WHERE area = "11" |
What bombing happened in Brighton, UK? | CREATE TABLE table_name_98 (event VARCHAR,location VARCHAR) | SELECT event FROM table_name_98 WHERE location = "brighton, uk" |
What is the lowest maximum of fps with a width of 3072 and a height less than 1620? | CREATE TABLE table_name_84 (maximum_fps INTEGER,width VARCHAR,height VARCHAR) | SELECT MIN(maximum_fps) FROM table_name_84 WHERE width = 3072 AND height < 1620 |
Which 1991 has an A 1993 ? | CREATE TABLE table_36304 ("Tournament" text,"1988" text,"1989" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text,"1997" text,"1998" text) | SELECT "1991" FROM table_36304 WHERE "1993" = 'a' |
How many people attended the game that the Away team scored 10.17 (77) points in? | CREATE TABLE table_52083 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT COUNT("Crowd") FROM table_52083 WHERE "Away team score" = '10.17 (77)' |
Name the 2010 for tournament of us open | CREATE TABLE table_80359 ("Tournament" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2010" FROM table_80359 WHERE "Tournament" = 'us open' |
What was their position when the score of B was less than 9.05, a total was 15.275, and A Score larger than 6.4? | CREATE TABLE table_65550 ("Position" real,"Gymnast" text,"A Score" real,"B Score" real,"Total" real) | SELECT AVG("Position") FROM table_65550 WHERE "B Score" < '9.05' AND "Total" = '15.275' AND "A Score" > '6.4' |
In the Open Championship with more than 3 cuts made, what is the average wins? | CREATE TABLE table_63120 ("Tournament" text,"Wins" real,"Top-5" real,"Events" real,"Cuts made" real) | SELECT AVG("Wins") FROM table_63120 WHERE "Tournament" = 'the open championship' AND "Cuts made" > '3' |
what are the top five most prescribed drugs for patients who were prescribed sulfasalazine_ at the same time during this year? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum num... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'sulfasalazine_' AND DATETIME(prescriptions.startdate, 'start of y... |
tube feeding had ever been given to patient 30509 until 11/2105? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE 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_icd_diagnoses (row_id ... | SELECT COUNT(*) > 0 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 = 30509)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tube fee... |
Name the most losses for leslie mann | CREATE TABLE table_20873 ("Year (affiliation)" text,"Wins" real,"Losses" real,"Winning Pct." text,"GB (Division Standing)" text,"Manager" text) | SELECT MAX("Losses") FROM table_20873 WHERE "Manager" = 'Leslie Mann' |
In which district is the incumbent Marcia C. Kaptur? | CREATE TABLE table_685 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Results" text,"Candidates" text) | SELECT "District" FROM table_685 WHERE "Incumbent" = 'Marcia C. Kaptur' |
which age range had over 45.6 % catholic ? | CREATE TABLE table_203_770 (id number,"ages attained (years)" text,"catholic" text,"protestant and other christian" text,"other religion" text,"none or not stated" text) | SELECT "ages attained (years)" FROM table_203_770 WHERE "catholic" > 45.6 |
What bit depth has 4:1:1 as the color sampling? | CREATE TABLE table_7595 ("Format name" text,"Container" text,"Video coding" text,"Bit depth" real,"Color sampling" text,"Frame size" text,"Video bit rate,Mbit/s" text,"Audio coding" text) | SELECT SUM("Bit depth") FROM table_7595 WHERE "Color sampling" = '4:1:1' |
What is the region total after 2001 when Goondiwindi had more than 4,103 and Inglewood was at 2,613? | CREATE TABLE table_68825 ("Year" real,"Region total" real,"Goondiwindi" real,"Waggamba" real,"Inglewood" real) | SELECT COUNT("Region total") FROM table_68825 WHERE "Goondiwindi" > '4,103' AND "Inglewood" = '2,613' AND "Year" > '2001' |
What was the away team score when the team team score was 15.8 (98)? | CREATE TABLE table_32682 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_32682 WHERE "Home team score" = '15.8 (98)' |
Tell me all who has , is , or will be teaching Research International Economics ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name L... |
Which Royal house has a name of ding? | CREATE TABLE table_45584 ("State" text,"Type" text,"Name" text,"Title" text,"Royal house" text,"From" text) | SELECT "Royal house" FROM table_45584 WHERE "Name" = 'ding' |
in the last year, how many drugs had been prescribed to patient 65309? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime t... | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65309) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') |
How many Total that has a FA Trophy of 0 and a Player of charlie butler? | CREATE TABLE table_41399 ("Player" text,"Club" text,"League" real,"FA Cup" real,"FA Trophy" real,"League Cup" real,"Total" real) | SELECT COUNT("Total") FROM table_41399 WHERE "FA Trophy" = '0' AND "Player" = 'charlie butler' |
Who had the high points in the game @ Charlotte? | CREATE TABLE table_50870 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High points" FROM table_50870 WHERE "Team" = '@ charlotte' |
What was the launch date the satellite with cospar ID is 2008-033A? | CREATE TABLE table_22166 ("Satellite" text,"COSPAR ID" text,"SATCAT No." real,"Product Number" real,"Launch Date" text,"Estimated End Date[ clarification needed ]" text,"Estimated Operational Life" text) | SELECT "Launch Date" FROM table_22166 WHERE "COSPAR ID" = '2008-033A' |
what is the political affiliation of ray roberts | CREATE TABLE table_1341884_45 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_1341884_45 WHERE incumbent = "Ray Roberts" |
how many times was golding in 2nd position ? | CREATE TABLE table_203_299 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text) | SELECT COUNT(*) FROM table_203_299 WHERE "position" = 2 |
Which Format has a Catalog of 561 445-1? | CREATE TABLE table_33818 ("Date" text,"Label" text,"Region" text,"Format" text,"Catalog" text) | SELECT "Format" FROM table_33818 WHERE "Catalog" = '561 445-1' |
What is the name of the player with a winter transfer window moving from Roma? | CREATE TABLE table_name_79 (name VARCHAR,transfer_window VARCHAR,moving_from VARCHAR) | SELECT name FROM table_name_79 WHERE transfer_window = "winter" AND moving_from = "roma" |
Which object type had an NGC number greater than 6357 and a declination (J2000) of 45 34 ? | CREATE TABLE table_11554 ("NGC number" real,"Object type" text,"Constellation" text,"Right ascension (J2000)" text,"Declination (J2000)" text) | SELECT "Object type" FROM table_11554 WHERE "NGC number" > '6357' AND "Declination ( J2000 )" = '°45′34″' |
Who was the manager that was positioned 11th in table and resigned in departure? | CREATE TABLE table_name_30 (replaced_by VARCHAR,position_in_table VARCHAR,manner_of_departure VARCHAR) | SELECT replaced_by FROM table_name_30 WHERE position_in_table = "11th" AND manner_of_departure = "resigned" |
Which Icelandic has a Danish of bl t/bl ? | CREATE TABLE table_56602 ("Faroese" text,"Norwegian (bokm\u00e5l)" text,"Norwegian (nynorsk)" text,"English" text,"Icelandic" text,"Danish" text,"Swedish" text,"German" text,"Dutch" text) | SELECT "Icelandic" FROM table_56602 WHERE "Danish" = 'blåt/blå' |
Find the team of the player of the highest age. | CREATE TABLE school_details (school_id number,nickname text,colors text,league text,class text,division text)CREATE TABLE school_performance (school_id number,school_year text,class_a text,class_aa text)CREATE TABLE school (school_id number,school text,location text,enrollment number,founded number,denomination text,bo... | SELECT team FROM player ORDER BY age DESC LIMIT 1 |
Can you tell me the High points that has the Date of january 31? | CREATE TABLE table_8635 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High points" FROM table_8635 WHERE "Date" = 'january 31' |
Number of Users with 1 rep. | CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CR... | SELECT COUNT(*) FROM Users WHERE Reputation = 1 AND (CreationDate = LastAccessDate) |
What's the Stock Exchange Plaza's rank? | CREATE TABLE table_2940 ("Rank" real,"Building [A ]" text,"City" text,"Country" text,"Height (m)" text,"Height (ft)" text,"Floors" real,"Built" text) | SELECT "Rank" FROM table_2940 WHERE "Building [A ]" = 'Stock Exchange Plaza' |
How many classes exist for each school? | CREATE TABLE enroll (class_code text,stu_num number,enroll_grade text)CREATE TABLE department (dept_code text,dept_name text,school_code text,emp_num number,dept_address text,dept_extension text)CREATE TABLE professor (emp_num number,dept_code text,prof_office text,prof_extension text,prof_high_degree text)CREATE TABLE... | SELECT COUNT(*), T3.school_code FROM class AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code |
provide the number of patients whose drug code is diph25l? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "DIPH25L" |
List the names of all genres in alphabetical oder, together with its ratings. | CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TABLE genre (g_name text,rating text,most_popular_in text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genre_is text,rating number,languages text,releasedate time,resolution number)CREATE TAB... | SELECT g_name, rating FROM genre ORDER BY g_name |
What week of the season did the date December 2, 1962 fall on? | CREATE TABLE table_14984078_1 (week VARCHAR,date VARCHAR) | SELECT week FROM table_14984078_1 WHERE date = "December 2, 1962" |
What is the total number of each ship type? Give me a pie chart. | CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int)CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text) | SELECT Type, COUNT(Type) FROM ship GROUP BY Type |
What was the result of the election featuring andrew stevenson (j) 100%? | CREATE TABLE table_28870 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text) | SELECT "Result" FROM table_28870 WHERE "Candidates" = 'Andrew Stevenson (J) 100%' |
Who was the producer for the film directed by 1997? | CREATE TABLE table_name_42 (producer VARCHAR,director VARCHAR) | SELECT producer FROM table_name_42 WHERE director = "1997" |
If the speaker is R. Muthiah, what is the election year maximum? | CREATE TABLE table_23512864_4 (election_year INTEGER,speaker VARCHAR) | SELECT MAX(election_year) FROM table_23512864_4 WHERE speaker = "R. Muthiah" |
Are there classes that would be useful for me to take before taking ENGR 407 ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits var... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'ENGR' AND number = 407 |
Who had the play-by-play on espn with sideline reporter monica gonzalez? | CREATE TABLE table_21761 ("Year" real,"Network" text,"Play-by-play" text,"Color commentator" text,"Sideline reporters" text,"Pregame host" text,"Pregame analysts" text) | SELECT "Play-by-play" FROM table_21761 WHERE "Network" = 'ESPN' AND "Sideline reporters" = 'Monica Gonzalez' |
Tell me the type of hospital admission for patient Betty Campbell had. | 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 demographic.admission_type FROM demographic WHERE demographic.name = "Betty Campbell" |
what was the last microbiology test time of patient 16472 in 07/this year? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE labevents (row_id number,subject_id number,hadm_id n... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16472) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', microbiolo... |
tell me the primary disease and time of discharge for patient with patient id 2560. | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560" |
Who has greater than 8 Long and a 73 Yards? | CREATE TABLE table_53256 ("Player" text,"Car." real,"Yards" text,"Avg." text,"Long" real) | SELECT "Player" FROM table_53256 WHERE "Long" > '8' AND "Yards" = '73' |
Which country has the Narita International Airport? | CREATE TABLE table_47569 ("City" text,"Country" text,"IATA" text,"ICAO" text,"Airport" text) | SELECT "Country" FROM table_47569 WHERE "Airport" = 'narita international airport' |
What is the rank of the episode with a share of 6 and timeslot rank smaller than 4? | CREATE TABLE table_57930 ("Episode" text,"Air Date" text,"Rating" real,"Share" real,"Rating/Share 18\u201349" text,"Viewers (m)" real,"Timeslot Rank" real,"Night Rank" text,"Overall Rank" real) | SELECT AVG("Overall Rank") FROM table_57930 WHERE "Share" = '6' AND "Timeslot Rank" < '4' |
What type is the settlement of Lok? | CREATE TABLE table_27839 ("Settlement" text,"Cyrillic Name" text,"Type" text,"Population (2011)" real,"Largest ethnic group (2002)" text,"Dominant religion (2002)" text) | SELECT "Type" FROM table_27839 WHERE "Settlement" = 'Lok' |
Which country has a GDP (nominal) of $29.9 billion? | CREATE TABLE table_57854 ("Country" text,"Population" text,"Area (km\u00b2)" text,"GDP (nominal)" text,"GDP per capita (nominal)" text) | SELECT "Country" FROM table_57854 WHERE "GDP (nominal)" = '$29.9 billion' |
for the rank of 3 for the united states, what is the average lane? | CREATE TABLE table_name_8 (lane INTEGER,nationality VARCHAR,rank VARCHAR) | SELECT AVG(lane) FROM table_name_8 WHERE nationality = "united states" AND rank = 3 |
Find the names of the top 10 airlines that operate the most number of routes. Plot them as bar chart. | CREATE TABLE airports (apid integer,name text,city text,country text,x real,y real,elevation bigint,iata character varchar(3),icao character varchar(4))CREATE TABLE routes (rid integer,dst_apid integer,dst_ap varchar(4),src_apid bigint,src_ap varchar(4),alid bigint,airline varchar(4),codeshare text)CREATE TABLE airline... | SELECT T1.name, T1.alid FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid ORDER BY COUNT(*) DESC LIMIT 10 |
What is the highest number of wins associated with under 0 poles? | CREATE TABLE table_name_36 (wins INTEGER,poles INTEGER) | SELECT MAX(wins) FROM table_name_36 WHERE poles < 0 |
Which player was the high points scorer during the game with an end score of W 93-85? | CREATE TABLE table_name_77 (high_points VARCHAR,score VARCHAR) | SELECT high_points FROM table_name_77 WHERE score = "w 93-85" |
Please show me how many employees working on different countries using a bar chart, could you list in asc by the the number of country name? | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))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 departments (DEPARTMENT_ID decima... | SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME ORDER BY COUNT(COUNTRY_NAME) |
Which title has content including mysticism, spiritualism, and a translation of the minaret of light? | CREATE TABLE table_53954 ("Title" text,"Urdu" text,"Translation" text,"Date" real,"Content" text) | SELECT "Title" FROM table_53954 WHERE "Content" = 'mysticism, spiritualism' AND "Translation" = 'the minaret of light' |
could you find me a flight from BOSTON to SAN FRANCISCO that stops in DENVER | CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE restriction (restriction_code text,advance_purchase i... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT... |
what were the total number of legs won by ronnie baxter ? | CREATE TABLE table_203_460 (id number,"player" text,"played" number,"legs won" number,"legs lost" number,"lwat" number,"100+" number,"140+" number,"180s" number,"high checkout" number,"3-dart average" number) | SELECT "legs won" FROM table_203_460 WHERE "player" = 'ronnie baxter' |
What's the share of Episode 1? | CREATE TABLE table_68863 ("Episode No." real,"Airdate" text,"Total Viewers" real,"Share" text,"BBC One Weekly Ranking" text) | SELECT "Share" FROM table_68863 WHERE "Episode No." = '1' |
What is the name of the player with 305 points? | CREATE TABLE table_name_46 (name VARCHAR,points VARCHAR) | SELECT name FROM table_name_46 WHERE points = 305 |
What was the outcome when she partnered with mashona washington? | CREATE TABLE table_name_39 (outcome VARCHAR,partner VARCHAR) | SELECT outcome FROM table_name_39 WHERE partner = "mashona washington" |
When did ras bodik and ameet soni collaborate ? | CREATE TABLE field (fieldid int)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABL... | SELECT DISTINCT WRITES_0.paperid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'ras bodik' AND AUTHOR_1.authorname = 'ameet soni' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid |
Short Answers containing 'same problem'. Finds extremely short Answer posts that contain the phrase 'same problem'
These are almost always very low quality non-answers. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostNoticeTypes ... | SELECT Id AS "post_link", Body FROM Posts WHERE PostTypeId = 2 AND LENGTH(Body) <= 100 AND (Body LIKE '%can you help%') |
Find the name of the person who has friends with age above 40 but not under age 30? | CREATE TABLE Person (name VARCHAR,age INTEGER)CREATE TABLE PersonFriend (name VARCHAR,friend VARCHAR) | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age > 40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age < 30) |
If the coordinate velocity v dx/dt in units of c is (e 2 1)/(e 2 + 1) 0.761, what is the velocity angle in i-radians? | CREATE TABLE table_15314901_1 (velocity_angle_η_in_i_radians VARCHAR,coordinate_velocity_v_dx_dt_in_units_of_c VARCHAR) | SELECT velocity_angle_η_in_i_radians FROM table_15314901_1 WHERE coordinate_velocity_v_dx_dt_in_units_of_c = "(e 2 − 1)/(e 2 + 1) ≅ 0.761" |
What was the production number of the episode titel of pre-hysterical hare? | CREATE TABLE table_66406 ("Title" text,"Series" text,"Director" text,"Production Number" real,"Release date" text) | SELECT COUNT("Production Number") FROM table_66406 WHERE "Title" = 'pre-hysterical hare' |
How many 1990 growth numbers had less than 10,522 in 1970? | CREATE TABLE table_53639 ("City" text,"1970" real,"1980" real,"1990" real,"2000" real,"2010 est." real) | SELECT COUNT("1990") FROM table_53639 WHERE "1970" < '10,522' |
Which car won the same award in 2000 that the ferrari f133 5.5l v12 456 / 550 won in 2001? | CREATE TABLE table_15084 ("category" text,"1999" text,"2000" text,"2001" text,"2004" text) | SELECT "2000" FROM table_15084 WHERE "2001" = 'ferrari f133 5.5l v12 456 / 550' |
how many patients had their other tested since 2105? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'other' AND STRFTIME('%y', microlab.culturetakentime) >= '2105') |
What was the final score when the player was an e to par? | CREATE TABLE table_name_97 (score VARCHAR,to_par VARCHAR) | SELECT score FROM table_name_97 WHERE to_par = "e" |
Users with reputation > 10000 and < 20 answers. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserD... | SELECT Users.Id AS "user_link", Users.DisplayName, Users.Reputation, SUM(CASE WHEN Posts.PostTypeId = 1 THEN 1 ELSE 0 END) AS Questions, SUM(CASE WHEN Posts.PostTypeId = 2 THEN 1 ELSE 0 END) AS Answers, Users.UpVotes, Users.DownVotes FROM Users INNER JOIN Posts ON Users.Id = Posts.OwnerUserId AND (Posts.PostTypeId = 1 ... |
what is the number of patients whose year of birth is less than 1850 and diagnoses short title is intestinal obstruct nos? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "1850" AND diagnoses.short_title = "Intestinal obstruct NOS" |
What is the date of entry for the UK Albums Top 75 chart? | CREATE TABLE table_72199 ("Chart" text,"Date of Entry" text,"Entry Position" real,"Peak Position" real,"Weeks on Peak" real,"Weeks on Chart" real,"Date of Exit" text) | SELECT "Date of Entry" FROM table_72199 WHERE "Chart" = 'UK Albums Top 75' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.