instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What circuit is the Vi Rhein-Pokalrennen race in? | CREATE TABLE table_16753 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text) | SELECT "Circuit" FROM table_16753 WHERE "Race Name" = 'VI Rhein-Pokalrennen' |
What is the 2012 of the hamburg masters? | CREATE TABLE table_61447 ("Tournament" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2012" FROM table_61447 WHERE "Tournament" = 'hamburg masters' |
Why did Geninho leave as manager? | CREATE TABLE table_29414946_3 (manner_of_departure VARCHAR,outgoing_manager VARCHAR) | SELECT manner_of_departure FROM table_29414946_3 WHERE outgoing_manager = "Geninho" |
Show the department id and their salary using a scatter chart. | CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))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 countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID deci... | SELECT T1.SALARY, T1.DEPARTMENT_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID |
what is the average c/w 15+ when 18 to 19 is 132 and 65 to 69 is more than 1,869? | CREATE TABLE table_46413 ("C/W 15+" real,"Oblast\\Age" text,"15 to 17" real,"18 to 19" text,"20 to 24" real,"25 to 29" real,"30 to 34" real,"35 to 39" real,"40 to 44" real,"45 to 49" real,"50 to 54" real,"55 to 59" real,"60 to 64" real,"65 to 69" real) | SELECT AVG("C/W 15+") FROM table_46413 WHERE "18 to 19" = '132' AND "65 to 69" > '1,869' |
give me the number of patients whose primary disease is newborn and lab test fluid is ascites? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.fluid = "Ascites" |
Name the loss with record of 14-19 | CREATE TABLE table_68892 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Loss" FROM table_68892 WHERE "Record" = '14-19' |
Name the pictorials when the interview subject is steve jobs | CREATE TABLE table_1300 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text,"Pictorials" text) | SELECT "Pictorials" FROM table_1300 WHERE "Interview subject" = 'Steve Jobs' |
What club does the player who is 1.97 m tall play for? | CREATE TABLE table_12962773_16 (current_club VARCHAR,height VARCHAR) | SELECT current_club FROM table_12962773_16 WHERE height = "1.97" |
What is the 1990 1991 Team when the Birthplace shows as new york? | CREATE TABLE table_43067 ("Position" text,"Jersey #" real,"Name" text,"Height (cm)" real,"Weight (kg)" real,"Birthdate" text,"Birthplace" text,"1990\u20131991 Team" text) | SELECT "1990\u20131991 Team" FROM table_43067 WHERE "Birthplace" = 'new york' |
What is the lowest win number of the competitor who had 90 points before 1994? | CREATE TABLE table_14409 ("Year" real,"Team" text,"Wins" real,"Points" real,"Championship Finish" text) | SELECT MIN("Wins") FROM table_14409 WHERE "Points" = '90' AND "Year" < '1994' |
Which highest overall has a College of idaho, and a Round smaller than 1? | CREATE TABLE table_name_31 (overall INTEGER,college VARCHAR,round VARCHAR) | SELECT MAX(overall) FROM table_name_31 WHERE college = "idaho" AND round < 1 |
How many apps does Uzbekistan have in 2003? | CREATE TABLE table_69071 ("Season" text,"Team" text,"Country" text,"Division" text,"Apps" real,"Goals" real) | SELECT "Apps" FROM table_69071 WHERE "Country" = 'uzbekistan' AND "Season" = '2003' |
What is the attendance that has fedex field as the game site with 3 as the week? | CREATE TABLE table_name_24 (attendance VARCHAR,game_site VARCHAR,week VARCHAR) | SELECT attendance FROM table_name_24 WHERE game_site = "fedex field" AND week = 3 |
What are the names and distances for all airplanes. Visualize by bar chart. | CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance number(6,0))CREATE TABLE certificate (eid number(9,0),aid number(9,0))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 T... | SELECT name, distance FROM aircraft |
Show different builders of railways, along with the corresponding number of railways using each builder Show bar chart, and display x-axis in asc order. | CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE manager (Manager_ID int,Name text,Country text,Working_year_starts text,Age int,Level int)CREATE TABLE train (Train_ID int,Train_Num text,Name text,From text,Arrival text,Railway_ID int)CREATE TABLE railway (Railway_ID int,Railway te... | SELECT Builder, COUNT(*) FROM railway GROUP BY Builder ORDER BY Builder |
what is the school that left in 1966? | CREATE TABLE table_name_18 (school VARCHAR,year_left VARCHAR) | SELECT school FROM table_name_18 WHERE year_left = 1966 |
What is the easiest class I can do to meet the MDE requirement ? | CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE ta (campus_job_id int,student_id int,location var... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... |
Show the number of gas stations for each manager in a bar chart, and I want to show by the X in desc. | CREATE TABLE gas_station (Station_ID int,Open_Year int,Location text,Manager_Name text,Vice_Manager_Name text,Representative_Name text)CREATE TABLE company (Company_ID int,Rank int,Company text,Headquarters text,Main_Industry text,Sales_billion real,Profits_billion real,Assets_billion real,Market_Value real)CREATE TABL... | SELECT Manager_Name, COUNT(Manager_Name) FROM gas_station GROUP BY Manager_Name ORDER BY Manager_Name DESC |
What Metric value has a Unit of dolia? | CREATE TABLE table_38003 ("Unit" text,"Russian" text,"Ratio" text,"Metric value" text,"Avoirdupois value" text) | SELECT "Metric value" FROM table_38003 WHERE "Unit" = 'dolia' |
What is the pick for West Virginia college? | CREATE TABLE table_name_91 (pick VARCHAR,college VARCHAR) | SELECT pick FROM table_name_91 WHERE college = "west virginia" |
flights from DENVER to BALTIMORE between 1000 and 1400 | CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_st... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 1400 AND flight.departure_time >= 1000) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flig... |
What is the smallest number of field goals for players with 4 touchdowns and less than 9 extra points? | CREATE TABLE table_75195 ("Player" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real) | SELECT MIN("Field goals") FROM table_75195 WHERE "Touchdowns" = '4' AND "Extra points" < '9' |
which album was the next one to end up on the us dance list after new jack city ? | CREATE TABLE table_204_438 (id number,"year" number,"title" text,"album" text,"us r&b" number,"us pop" number,"us dance" number) | SELECT "album" FROM table_204_438 ORDER BY "us dance" DESC LIMIT 1 |
what is the number of divorced patients who were admitted before 2120? | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admityear < "2120" |
Which Round has a Player of dan chicoine, and a Pick larger than 23? | CREATE TABLE table_79550 ("Round" real,"Pick" real,"Player" text,"Nationality" text,"College/junior/club team" text) | SELECT AVG("Round") FROM table_79550 WHERE "Player" = 'dan chicoine' AND "Pick" > '23' |
What school is located in Worcester, Massachusetts? | CREATE TABLE table_1974782_1 (institution VARCHAR,location VARCHAR) | SELECT institution FROM table_1974782_1 WHERE location = "Worcester, Massachusetts" |
How many rounds did the match last with Sam Sotello as the opponent? | CREATE TABLE table_47469 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text) | SELECT AVG("Round") FROM table_47469 WHERE "Opponent" = 'sam sotello' |
picturesque and trekking route is the category what is the height from sea level in meters? | CREATE TABLE table_1430913_1 (height_from_sea_level_in_meters VARCHAR,category VARCHAR) | SELECT height_from_sea_level_in_meters FROM table_1430913_1 WHERE category = "Picturesque and trekking_route" |
what are the prices for sodiu? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate t... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'sodiu') |
what is restriction AP/55 | 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 time_interval (period text,begin_time int,end_time int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE dual_carrier (... | SELECT DISTINCT advance_purchase, application, maximum_stay, minimum_stay, no_discounts, restriction_code, saturday_stay_required, stopovers FROM restriction WHERE restriction_code = 'AP/55' |
Find 'me too' (so-called) answers. Finds the answers to questions that appear to be the 'me too' style of answers that contribute absolutely nothiing to the question and should either be removed or converted to a comment by a mod. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,Pos... | SELECT Id AS "post_link", SUBSTRING(Body, STR_POSITION(Body, 'me too') - 15, 45) AS "occurrence" FROM Posts WHERE PostTypeId = 2 AND (Body LIKE 'me too%' OR Body LIKE '% me too%') AND NOT Body LIKE '%affects me too%' AND NOT Body LIKE '%fixed it%' AND NOT Body LIKE '%resolved%' |
For each distinct test result, find the number of students who got the result. | CREATE TABLE Student_Tests_Taken (registration_id INTEGER,date_test_taken DATETIME,test_result VARCHAR(255))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 VARC... | SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC |
Most upvoted questions tagged with 'tensorflow'. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT COUNT(v.PostId) AS "Vote count", v.PostId AS "post_link", p.Body FROM Votes AS v INNER JOIN Posts AS p ON p.Id = v.PostId WHERE p.Tags LIKE '%tensorflow%' GROUP BY v.PostId, p.Body ORDER BY 'Vote count' DESC LIMIT 100 |
how many years has does this table cover ? | CREATE TABLE table_203_69 (id number,"representative" text,"title" text,"from" number,"to" number,"appointed by" text) | SELECT MAX("to") - MIN("from") FROM table_203_69 |
Provide the frequency of the last names of employees earning more than the employee with id 163 using a bar chart, and order Y in asc order. | 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 employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JO... | SELECT LAST_NAME, COUNT(LAST_NAME) FROM employees WHERE SALARY > (SELECT SALARY FROM employees WHERE EMPLOYEE_ID = 163) GROUP BY LAST_NAME ORDER BY COUNT(LAST_NAME) |
For those records from the products and each product's manufacturer, show me about the distribution of name and the average of manufacturer , and group by attribute name in a bar chart. | 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 T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name |
what is minimum age of patients whose ethnicity is white - russian and days of hospital stay is 69? | 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 MIN(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.days_stay = "69" |
Create a bar chart showing the number of date in locaton to across date in locaton to, could you display by the y axis from low to high? | CREATE TABLE Employees (Employee_ID INTEGER,Role_Code CHAR(15),Employee_Name VARCHAR(255),Gender_MFU CHAR(1),Date_of_Birth DATETIME,Other_Details VARCHAR(255))CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code CHAR(15),Document_Name CHAR(255),Document_Description CHAR(255),Other_Det... | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations ORDER BY COUNT(Date_in_Locaton_To) |
What was the score when the opponent was irena pavlovic and the surface was hard? | CREATE TABLE table_47930 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text) | SELECT "Score" FROM table_47930 WHERE "Surface" = 'hard' AND "Opponent in the final" = 'irena pavlovic' |
which camp is the least amount on mar. 30 | CREATE TABLE table_204_217 (id number,"camp" text,"div sec\ndivision" text,"admin\ndistrict" text,"9 feb" number,"11 feb" number,"16 feb" number,"25 feb" number,"27 feb" number,"2 mar" number,"4 mar" number,"6 mar" number,"11 mar" number,"13 mar" number,"24 mar" number,"30 mar" number,"31 mar" number) | SELECT "camp" FROM table_204_217 ORDER BY "30 mar" LIMIT 1 |
known or suspected allergy to dapagliflozin | CREATE TABLE table_train_249 ("id" int,"gender" string,"allergy_to_dapagliflozin" bool,"body_weight" float,"estimated_glomerular_filtration_rate_egfr" int,"body_mass_index_bmi" float,"age" float,"NOUSE" float) | SELECT * FROM table_train_249 WHERE allergy_to_dapagliflozin = 1 |
Who wrote episode 94? | CREATE TABLE table_16276 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "Written by" FROM table_16276 WHERE "No. in series" = '94' |
What is the foot per second speed where time to feet ratio is 9.2 at 25 degrees? | CREATE TABLE table_20825 ("Gun" text,"m/v ft/s" real,"Shell (lb)" text,"Time to ft (m) at 25\u00b0 (seconds)" text,"Time to ft (m) at 40\u00b0 (seconds)" text,"Time to ft (m) at 55\u00b0 (seconds)" text,"Max. height (ft)" real) | SELECT "m/v ft/s" FROM table_20825 WHERE "Time to ft (m) at 25\u00b0 (seconds)" = '9.2' |
What was the losing hand where the winning hand was 7h 7s? | CREATE TABLE table_12454156_1 (losing_hand VARCHAR,winning_hand VARCHAR) | SELECT losing_hand FROM table_12454156_1 WHERE winning_hand = "7h 7s" |
Ben Craig took EARTH 586 , taught by which professor ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)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 gsi (course_offering_id int,stude... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_... |
Name the least game for march 20 | CREATE TABLE table_23186738_9 (game INTEGER,date VARCHAR) | SELECT MIN(game) FROM table_23186738_9 WHERE date = "March 20" |
Who won the men's ski jump when the FIS Nordic World Ski Championships was 1980? | CREATE TABLE table_name_34 (winner VARCHAR,fis_nordic_world_ski_championships VARCHAR) | SELECT winner FROM table_name_34 WHERE fis_nordic_world_ski_championships = "1980" |
what was the name of the last lab test that patient 25050 had since 105 months ago? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT labevents.itemid FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25050) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-105 month') ORDER BY labevents.charttime D... |
Show all information about each body builder. | CREATE TABLE body_builder (body_builder_id number,people_id number,snatch number,clean_jerk number,total number)CREATE TABLE people (people_id number,name text,height number,weight number,birth_date text,birth_place text) | SELECT * FROM body_builder |
search in comments / all. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number... | SELECT Id AS "comment_link", CreationDate, Text FROM Comments WHERE UPPER(Text) LIKE UPPER('%##CommentText##%') ORDER BY CreationDate DESC |
What school did the punter picked after 101 attend? | CREATE TABLE table_4929 ("Round" real,"Pick" real,"Player" text,"Position" text,"College" text) | SELECT "College" FROM table_4929 WHERE "Pick" > '101' AND "Position" = 'punter' |
Bar chart of how many headquarters from each headquarters | CREATE TABLE company (Company_ID int,Rank int,Company text,Headquarters text,Main_Industry text,Sales_billion real,Profits_billion real,Assets_billion real,Market_Value real)CREATE TABLE station_company (Station_ID int,Company_ID int,Rank_of_the_Year int)CREATE TABLE gas_station (Station_ID int,Open_Year int,Location t... | SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters |
What is the smallest number of losses for a position greater than 2 with 4 points and more than 2 draws? | CREATE TABLE table_39866 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text) | SELECT MIN("Lost") FROM table_39866 WHERE "Position" > '2' AND "Points" = '4' AND "Drawn" > '2' |
Show the party and the number of drivers in each party with a bar chart, and I want to order in desc by the the total number please. | CREATE TABLE school (School_ID int,Grade text,School text,Location text,Type text)CREATE TABLE driver (Driver_ID int,Name text,Party text,Home_city text,Age int)CREATE TABLE school_bus (School_ID int,Driver_ID int,Years_Working int,If_full_time bool) | SELECT Party, COUNT(*) FROM driver GROUP BY Party ORDER BY COUNT(*) DESC |
which illustrator was responsible for the last award winner ? | CREATE TABLE table_203_788 (id number,"year" number,"author" text,"illustrator" text,"title" text,"publisher" text) | SELECT "illustrator" FROM table_203_788 ORDER BY "year" DESC LIMIT 1 |
Name the least total for 1978 years won | CREATE TABLE table_68253 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT MIN("Total") FROM table_68253 WHERE "Year(s) won" = '1978' |
Name the position for the player that is from valparaiso | CREATE TABLE table_56335 ("Player" text,"No.(s)" text,"Height in Ft." text,"Position" text,"School/Club Team/Country" text) | SELECT "Position" FROM table_56335 WHERE "School/Club Team/Country" = 'valparaiso' |
Find the organisation ids and details of the organisations which are involved i Visualize by bar chart, list by the x axis in descending. | CREATE TABLE Organisations (organisation_id INTEGER,organisation_type VARCHAR(10),organisation_details VARCHAR(255))CREATE TABLE Staff_Roles (role_code VARCHAR(10),role_description VARCHAR(255))CREATE TABLE Document_Types (document_type_code VARCHAR(10),document_description VARCHAR(255))CREATE TABLE Grants (grant_id IN... | SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details ORDER BY T2.organisation_details DESC |
Give me the number of patients whose admission location is transfer from hosp/extram lab test item id is 50935. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND lab.itemid = "50935" |
Show cinema name, film title, date, and price for each record in schedule. | CREATE TABLE film (film_id number,rank_in_series number,number_in_season number,title text,directed_by text,original_air_date text,production_code text)CREATE TABLE cinema (cinema_id number,name text,openning_year number,capacity number,location text)CREATE TABLE schedule (cinema_id number,film_id number,date text,show... | SELECT T3.name, T2.title, T1.date, T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id |
What year(s) was the race status piston? | CREATE TABLE table_181892_4 (year VARCHAR,race_status VARCHAR) | SELECT year FROM table_181892_4 WHERE race_status = "Piston" |
What is the lowest amount of points of the game with toronto as the home team? | CREATE TABLE table_76502 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Attendance" real,"Record" text,"Points" real) | SELECT MIN("Points") FROM table_76502 WHERE "Home" = 'toronto' |
Who is the pick from the Purdue College? | CREATE TABLE table_62830 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT "Pick" FROM table_62830 WHERE "College" = 'purdue' |
Which ship has a Pennant number of h.69? | CREATE TABLE table_67045 ("Ship" text,"Pennant number" text,"Laid down" text,"Launched" text,"Commissioned" text) | SELECT "Ship" FROM table_67045 WHERE "Pennant number" = 'h.69' |
What is the land (sqmi) in lansing township? | CREATE TABLE table_18600760_12 (land___sqmi__ VARCHAR,township VARCHAR) | SELECT land___sqmi__ FROM table_18600760_12 WHERE township = "Lansing" |
What was Saskatoon Accelerators score on January 6, 2008? | CREATE TABLE table_36598 ("Date" text,"Home Team" text,"Score" text,"Visiting Team" text,"Stadium" text) | SELECT "Score" FROM table_36598 WHERE "Home Team" = 'saskatoon accelerators' AND "Date" = 'january 6, 2008' |
Tell me the event for 6 bands | CREATE TABLE table_31597 ("Year" real,"Date" text,"Event" text,"Days" text,"Stages" text,"Acts" text) | SELECT "Event" FROM table_31597 WHERE "Acts" = '6 bands' |
What was the location and it's corresponding attendance during the game against Los Angeles? | CREATE TABLE table_31455 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Location Attendance" FROM table_31455 WHERE "Team" = 'Los Angeles' |
What are all the possible bleeding time results where prothrombin time and platelet count are both unaffected? | CREATE TABLE table_1555308_1 (bleeding_time VARCHAR,prothrombin_time VARCHAR,platelet_count VARCHAR) | SELECT bleeding_time FROM table_1555308_1 WHERE prothrombin_time = "Unaffected" AND platelet_count = "Unaffected" |
In which year was the Weight 170? | CREATE TABLE table_12032893_1 (year VARCHAR,weight VARCHAR) | SELECT year FROM table_12032893_1 WHERE weight = 170 |
Who wrote the episode with the production code 211? | CREATE TABLE table_29660 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" real,"U.S. viewers (millions)" text) | SELECT "Written by" FROM table_29660 WHERE "Prod. code" = '211' |
which township has the least in population ? | CREATE TABLE table_203_459 (id number,"township" text,"fips" number,"population\ncenter" text,"population" number,"population\ndensity\n/km2 (/sq mi)" text,"land area\nkm2 (sq mi)" text,"water area\nkm2 (sq mi)" text,"water %" text,"geographic coordinates" text) | SELECT "township" FROM table_203_459 ORDER BY "population" LIMIT 1 |
What was the score of the game when the Blue Jays were 55-39? | CREATE TABLE table_name_86 (score VARCHAR,record VARCHAR) | SELECT score FROM table_name_86 WHERE record = "55-39" |
What is the location of fightfest 2, which has 3 rounds? | CREATE TABLE table_61353 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Location" FROM table_61353 WHERE "Round" = '3' AND "Event" = 'fightfest 2' |
what is drug code of drug name simethicone? | 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 text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Simethicone" |
List the number of documents for each receipt date and bin by weekday in a bar chart, sort y axis from high to low order. | CREATE TABLE Ref_Document_Status (document_status_code CHAR(15),document_status_description VARCHAR(255))CREATE TABLE Documents (document_id INTEGER,document_status_code CHAR(15),document_type_code CHAR(15),shipping_agent_code CHAR(15),receipt_date DATETIME,receipt_number VARCHAR(255),other_details VARCHAR(255))CREATE ... | SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY COUNT(receipt_date) DESC |
Name the nationality for defender 201 | CREATE TABLE table_26950 ("Name" text,"Position" text,"Period" text,"Appearances\u00b9" real,"Goals\u00b9" real,"Nationality\u00b2" text) | SELECT "Nationality\u00b2" FROM table_26950 WHERE "Position" = 'Defender' AND "Appearances\u00b9" = '201' |
Create a bar chart showing all_games_percent across acc regular season, rank X-axis in desc order. | CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match ORDER BY ACC_Regular_Season DESC |
Which championship had a margin of 10 strokes? | CREATE TABLE table_32470 ("Year" real,"Championship" text,"Winning score" text,"Margin" text,"Runner(s)-up" text) | SELECT "Championship" FROM table_32470 WHERE "Margin" = '10 strokes' |
For those employees who was hired before 2002-06-21, return a line chart about the change of department_id over hire_date . | 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 locations (LOCATION_ID decimal(4,0),S... | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE HIRE_DATE < '2002-06-21' |
find me a flight from BOSTON to SAN FRANCISCO with a layover in DENVER | CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier tex... | 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... |
List all information in the item table. | CREATE TABLE trust (source_u_id number,target_u_id number,trust number)CREATE TABLE useracct (u_id number,name text)CREATE TABLE review (a_id number,u_id number,i_id number,rating number,rank number)CREATE TABLE item (i_id number,title text) | SELECT * FROM item |
What is the production code for episode 15 in season 3? | CREATE TABLE table_16581695_4 (production_code VARCHAR,no_in_season VARCHAR) | SELECT production_code FROM table_16581695_4 WHERE no_in_season = "15" |
What is the Film title used in nomination of Cilv ka B rns? | CREATE TABLE table_61405 ("Year (Ceremony)" text,"Film title used in nomination" text,"Original title" text,"Director" text,"Result" text) | SELECT "Film title used in nomination" FROM table_61405 WHERE "Original title" = 'cilvēka bērns' |
What is the date for a week before 9, and a opponent of dallas cowboys? | CREATE TABLE table_name_18 (date VARCHAR,week VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_18 WHERE week < 9 AND opponent = "dallas cowboys" |
what was the first thing patient 99883 had as output on the current intensive care unit visit? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 number,itemid number,char... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99883) AND icustays.outtime IS NULL) ORDER... |
What is the largest number of stories in Recife completed later than 2007 with a height less than 135 meters? | CREATE TABLE table_45206 ("Name" text,"Location" text,"Height (m)" real,"Stories" real,"Year of completion" real) | SELECT MAX("Stories") FROM table_45206 WHERE "Location" = 'recife' AND "Year of completion" > '2007' AND "Height (m)" < '135' |
how many unmarried patients have diagnoses icd9 code 496? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.icd9_code = "496" |
What was the total city area for vehari city with a serial number bigger than 36? | CREATE TABLE table_64008 ("Serial No." real,"District" text,"Headquartered City" text,"City Population (2009)" real,"City Area(km 2)" real) | SELECT COUNT("City Area(km 2 )") FROM table_64008 WHERE "Headquartered City" = 'vehari city' AND "Serial No." > '36' |
Name the average goal difference for draw of 7 and played more than 18 | CREATE TABLE table_name_2 (goal_difference INTEGER,draw VARCHAR,played VARCHAR) | SELECT AVG(goal_difference) FROM table_name_2 WHERE draw = 7 AND played > 18 |
how many unique entries are by the same Artist/group? | CREATE TABLE torrents (groupname text,totalsnatched number,artist text,groupyear number,releasetype text,groupid number,id number)CREATE TABLE tags (index number,id number,tag text) | SELECT COUNT(*), artist FROM torrents GROUP BY artist |
How many won the prize when Regina was the runner-up? | CREATE TABLE table_21940 ("Season" text,"The Mole" text,"Winner" text,"Runner-up" text,"International destination" text) | SELECT COUNT("Winner") FROM table_21940 WHERE "Runner-up" = 'Regina' |
Where is the IHSAA Class of aaa school with more than 590 enrolled? | CREATE TABLE table_64094 ("School" text,"Location" text,"Mascot" text,"Enrollment" real,"IHSAA Class" text,"IHSAA Football Class" text,"County" text) | SELECT "Location" FROM table_64094 WHERE "IHSAA Class" = 'aaa' AND "Enrollment" > '590' |
at least how many times was Pierre Vermeulen at a game? | CREATE TABLE table_24565004_22 (appearances¹ INTEGER,name VARCHAR) | SELECT MIN(appearances¹) FROM table_24565004_22 WHERE name = "Pierre Vermeulen" |
Who won the season for which Brendan Lynch is the runner-up? | CREATE TABLE table_30853 ("Series" real,"Premiere" text,"Finale" text,"Runners-up" text,"Winner" text) | SELECT "Winner" FROM table_30853 WHERE "Runners-up" = 'Brendan Lynch' |
Name the total seats for otorhinolaryngology | CREATE TABLE table_19304764_2 (total_seats VARCHAR,discipline VARCHAR) | SELECT total_seats FROM table_19304764_2 WHERE discipline = "Otorhinolaryngology" |
What is the 1994 finish for the Miami tournament? | CREATE TABLE table_name_14 (tournament VARCHAR) | SELECT 1994 FROM table_name_14 WHERE tournament = "miami" |
What is Charleston, SC ERP W? | CREATE TABLE table_38629 ("Call sign" text,"Frequency MHz" text,"City of license" text,"ERP W" real,"Class" text,"FCC info" text) | SELECT "ERP W" FROM table_38629 WHERE "City of license" = 'charleston, sc' |
What the result for the hypo-meeting tournament in 1994? | CREATE TABLE table_38528 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Event" text) | SELECT "Result" FROM table_38528 WHERE "Year" = '1994' AND "Tournament" = 'hypo-meeting' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.