instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What was the attendance for the game held on September 18, 1994, with a week less than 5?
CREATE TABLE table_name_25 (attendance VARCHAR,week VARCHAR,date VARCHAR)
SELECT attendance FROM table_name_25 WHERE week < 5 AND date = "september 18, 1994"
What is the other value associated with a Christianity value of 10.24%?
CREATE TABLE table_name_21 (other VARCHAR,christianity VARCHAR)
SELECT other FROM table_name_21 WHERE christianity = "10.24%"
Most viewed questions with a tag converted to a synonym since then.
CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,Is...
SELECT Posts.Id AS "post_link", Posts.ViewCount, TagSynonyms.SourceTagName AS "Its tag...", TagSynonyms.TargetTagName AS "...is a synonym of" FROM TagSynonyms, Tags, PostTags, Posts WHERE Tags.TagName = TagSynonyms.SourceTagName AND PostTags.TagId = Tags.Id AND Posts.Id = PostTags.PostId ORDER BY Posts.ViewCount DESC, ...
What is the relationship between Height and Weight ?
CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)
SELECT Height, Weight FROM people
What is the result for the Outer Critics Circle award earlier than 2004?
CREATE TABLE table_61106 ("Year" real,"Award" text,"Category" text,"Nominated Work" text,"Result" text)
SELECT "Result" FROM table_61106 WHERE "Award" = 'outer critics circle award' AND "Year" < '2004'
what is the number of patients whose diagnoses icd9 code is v667 and drug route is tp?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "V667" AND prescriptions.route = "TP"
What is the highest round of Ed Smith, who had a pick higher than 261 and played halfback?
CREATE TABLE table_35934 ("Round" real,"Pick" real,"Player" text,"Position" text,"School/Club Team" text)
SELECT MAX("Round") FROM table_35934 WHERE "Pick" < '261' AND "Position" = 'halfback' AND "Player" = 'ed smith'
In every semester , can you take ENDODONT 651 ?
CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREAT...
SELECT COUNT(*) > 0 FROM semester WHERE NOT semester IN (SELECT DISTINCT SEMESTERalias1.semester FROM course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias1 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND COURSEalias0.department = 'ENDODONT' AND COURSEalias0.numb...
On what date was the bridge located in McClain listed?
CREATE TABLE table_name_29 (listed VARCHAR,location VARCHAR)
SELECT listed FROM table_name_29 WHERE location = "mcclain"
How many new pageants does Aruba have?
CREATE TABLE table_19229 ("Country/Territory" text,"Former pageant" text,"Last competed" real,"New pageant" text,"Franchise since" real)
SELECT COUNT("New pageant") FROM table_19229 WHERE "Country/Territory" = 'Aruba'
How much Overall has a Name of bob anderson?
CREATE TABLE table_name_30 (overall VARCHAR,name VARCHAR)
SELECT COUNT(overall) FROM table_name_30 WHERE name = "bob anderson"
What was the time of the game that had an NFL recap and a result of W 22 16?
CREATE TABLE table_name_2 (time VARCHAR,nfl_recap VARCHAR,result VARCHAR)
SELECT time FROM table_name_2 WHERE nfl_recap = "recap" AND result = "w 22–16"
Which Played has a Drawn of 5, and a Team of palmeiras, and a Position smaller than 6?
CREATE TABLE table_name_95 (played INTEGER,position VARCHAR,drawn VARCHAR,team VARCHAR)
SELECT MAX(played) FROM table_name_95 WHERE drawn = 5 AND team = "palmeiras" AND position < 6
How many numbers have Charles Salmon as the producer and January 27, 2007 was the television premiere?
CREATE TABLE table_23474 ("#" real,"Title" text,"Maneater" text,"Television Premiere" text,"DVD release" text,"Writer" text,"Director" text,"Producer" text)
SELECT MIN("#") FROM table_23474 WHERE "Producer" = 'Charles Salmon' AND "Television Premiere" = 'January 27, 2007'
If the nepalese is 37.1%, what is the working force of HK?
CREATE TABLE table_27257896_2 (working_force_of_hk VARCHAR,nepalese VARCHAR)
SELECT working_force_of_hk FROM table_27257896_2 WHERE nepalese = "37.1%"
Who is the 1st member elected in 1620/21?
CREATE TABLE table_name_82 (elected VARCHAR)
SELECT 1 AS st_member FROM table_name_82 WHERE elected = "1620/21"
what is FF
CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight (aircraft_code_sequence ...
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'FF'
What is the latest year for the distinguished performance?
CREATE TABLE table_name_70 (year INTEGER,category VARCHAR)
SELECT MAX(year) FROM table_name_70 WHERE category = "distinguished performance"
What is the sum of top-10s for events with more than 0 wins?
CREATE TABLE table_79696 ("Tournament" text,"Wins" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real)
SELECT SUM("Top-10") FROM table_79696 WHERE "Wins" > '0'
Name the least season
CREATE TABLE table_2223177_3 (season INTEGER)
SELECT MIN(season) FROM table_2223177_3
During the Spring season , has the PHYSED 305 ever been offered ?
CREATE TABLE gsi (course_offering_id int,student_id 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 int,respe...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'PHYSED' AND course.number = 305 AND semester.semester = 'Spring' AND semester.semester_id = course_offering.semester
How many emergency hospital admission patients have calculus of bile duct without mention of cholecystitis or obstruction diagnoses?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Calculus of bile duct without mention of cholecystitis, without mention of obstruction"
For all employees who have the letters D or S in their first name, a scatter chart shows the correlation between employee_id and department_id .
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE...
SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
What assists has the Team SMU and the total points of 85?
CREATE TABLE table_40519 ("Year" text,"Team" text,"GP/GS" text,"Goals" text,"Assists" text,"Total Points" text)
SELECT "Assists" FROM table_40519 WHERE "Team" = 'smu' AND "Total Points" = '85'
How many times was team 1 the wykeham wonderers?
CREATE TABLE table_18733480_1 (players_left_after_round_1 VARCHAR,team_1 VARCHAR)
SELECT COUNT(players_left_after_round_1) FROM table_18733480_1 WHERE team_1 = "Wykeham Wonderers"
What date were the high rebounds Evans (14)?
CREATE TABLE table_52677 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text)
SELECT "Date" FROM table_52677 WHERE "High rebounds" = 'evans (14)'
What is the lowest goal difference a club with 61 goals against and less than 11 draws has?
CREATE TABLE table_name_94 (goal_difference INTEGER,goals_against VARCHAR,draws VARCHAR)
SELECT MIN(goal_difference) FROM table_name_94 WHERE goals_against = 61 AND draws < 11
What percentile am I in for a given tag (Cross-Validated)?. Determines where you rank in a given tag as of the last data load
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE T...
SELECT STR(NTILE(100) OVER (ORDER BY SUM(answers.Score) DESC), 3) + '%' AS "top", ROW_NUMBER() OVER (ORDER BY SUM(answers.Score) DESC) AS "ranking", Users.DisplayName AS "user_link", SUM(answers.Score) AS "total_score" FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId AND Tags.TagName = '##TagName##' JOIN Posts AS qu...
What is the platelet count for congenital afibrinogenemia?
CREATE TABLE table_238124_1 (platelet_count VARCHAR,condition VARCHAR)
SELECT platelet_count FROM table_238124_1 WHERE condition = "Congenital afibrinogenemia"
What is the date for Hydra Head Records with a CD format?
CREATE TABLE table_name_21 (date VARCHAR,label VARCHAR,format VARCHAR)
SELECT date FROM table_name_21 WHERE label = "hydra head records" AND format = "cd"
What is the Length of retirement of the President with an Age at inauguration of 70years, 53days?
CREATE TABLE table_name_51 (length_of_retirement VARCHAR,age_at_inauguration VARCHAR)
SELECT length_of_retirement FROM table_name_51 WHERE age_at_inauguration = "70years, 53days"
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id, and show by the bar in asc please.
CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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 locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_P...
SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID
How many patients who were diagnosed under icd9 code 481 have pb as drug route?
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "481" AND prescriptions.route = "PB"
Name the crownded for 17 september 1025
CREATE TABLE table_26516 ("Co-king" text,"Relationship to Monarch" text,"Crowned" text,"Co-kingship ceased" text,"Reason" text,"Monarch" text)
SELECT "Crowned" FROM table_26516 WHERE "Co-kingship ceased" = '17 September 1025'
What date did 'd.a.w.' Originally air?
CREATE TABLE table_73844 ("Season no." real,"Series no." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text)
SELECT "Original air date" FROM table_73844 WHERE "Title" = 'D.A.W.'
What team was the opponent when the result was l 0-27?
CREATE TABLE table_name_21 (opponent VARCHAR,result VARCHAR)
SELECT opponent FROM table_name_21 WHERE result = "l 0-27"
Do I need to take any specific courses before taking PHARMACY 690 ?
CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE comment_instru...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
What was the original title of the Hindi film?
CREATE TABLE table_71313 ("Country" text,"Film title used in nomination" text,"Language" text,"Original title" text,"Director" text)
SELECT "Original title" FROM table_71313 WHERE "Language" = 'hindi'
Name the most population for seychelles and rank less than 13
CREATE TABLE table_name_8 (population INTEGER,country_territory_entity VARCHAR,rank VARCHAR)
SELECT MAX(population) FROM table_name_8 WHERE country_territory_entity = "seychelles" AND rank < 13
What is the Champion at Sopot prior to 2006 with a Score of 6 4, 6 7(7), 6 3?
CREATE TABLE table_name_69 (champion VARCHAR,score VARCHAR,location VARCHAR,year VARCHAR)
SELECT champion FROM table_name_69 WHERE location = "sopot" AND year < 2006 AND score = "6–4, 6–7(7), 6–3"
WHAT IS THE WINNER WITH A FIFTH OF JOSS STONE?
CREATE TABLE table_name_97 (winner VARCHAR,fifth VARCHAR)
SELECT winner FROM table_name_97 WHERE fifth = "joss stone"
When the total was 290 what was the To par?
CREATE TABLE table_62597 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text)
SELECT "To par" FROM table_62597 WHERE "Total" = '290'
What is the sales when the artist is kelly clarkson?
CREATE TABLE table_14044 ("Rank" real,"Artist" text,"Album" text,"Peak position" text,"Sales" real,"Certification" text)
SELECT COUNT("Sales") FROM table_14044 WHERE "Artist" = 'kelly clarkson'
What is Left Office, when Took Office is '11 June 2001', and when Minister is 'Mirko Tremaglia'?
CREATE TABLE table_name_47 (left_office VARCHAR,took_office VARCHAR,minister VARCHAR)
SELECT left_office FROM table_name_47 WHERE took_office = "11 june 2001" AND minister = "mirko tremaglia"
What are the stations in Tarzana?
CREATE TABLE table_2093995_1 (stations VARCHAR,city__neighborhood VARCHAR)
SELECT stations FROM table_2093995_1 WHERE city__neighborhood = "Tarzana"
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, could you order the average of salary in ascending 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 HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY)
When the away team scored 16.21 (117), what was the home teams score?
CREATE TABLE table_78193 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team score" FROM table_78193 WHERE "Away team score" = '16.21 (117)'
What is High Assists, when High Points is 'Tayshaun Prince (23)'?
CREATE TABLE table_50501 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High assists" FROM table_50501 WHERE "High points" = 'tayshaun prince (23)'
what is the time/retired when the laps is less than 54 and the driver is mark donohue?
CREATE TABLE table_54237 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT "Time/Retired" FROM table_54237 WHERE "Laps" < '54' AND "Driver" = 'mark donohue'
What is the percentage of others when the number for Bush is 1329?
CREATE TABLE table_1733513_1 (others_percentage VARCHAR,bush_number VARCHAR)
SELECT others_percentage FROM table_1733513_1 WHERE bush_number = 1329
what ground transportation is available in BOSTON
CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE equipment_sequence (aircraft_code_s...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BOSTON' AND ground_service.city_code = city.city_code
Who is the home side when north melbourne is the away side?
CREATE TABLE table_4521 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team" FROM table_4521 WHERE "Away team" = 'north melbourne'
who is the points classification in stage 1?
CREATE TABLE table_name_64 (points_classification VARCHAR,stage VARCHAR)
SELECT points_classification FROM table_name_64 WHERE stage = "1"
Bin all date of transactions into the YEAR interval, and sum the share count of each bin Return the result using a line chart, and I want to display from high to low by the x axis please.
CREATE TABLE Lots (lot_id INTEGER,investor_id INTEGER,lot_details VARCHAR(255))CREATE TABLE Transactions_Lots (transaction_id INTEGER,lot_id INTEGER)CREATE TABLE Purchases (purchase_transaction_id INTEGER,purchase_details VARCHAR(255))CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_typ...
SELECT date_of_transaction, SUM(share_count) FROM Transactions ORDER BY date_of_transaction DESC
Who were the challenge leaders of the games won by boston college (88-76)?
CREATE TABLE table_29535057_4 (challenge_leader VARCHAR,winner VARCHAR)
SELECT challenge_leader FROM table_29535057_4 WHERE winner = "Boston College (88-76)"
Provide me the number of patients who stayed in the hospital for more than 27 days that had a magnesium lab test.
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "27" AND lab.label = "Magnesium"
What is Jonathan Kaye's money list ranking?
CREATE TABLE table_4212 ("Player" text,"Starts" real,"Cuts made" real,"Best finish" text,"Money list rank" text,"Earnings ($)" real)
SELECT COUNT("Money list rank") FROM table_4212 WHERE "Player" = 'Jonathan Kaye'
What date was the attendance 82,500?
CREATE TABLE table_12759 ("Date" text,"Opponent#" text,"Rank#" text,"Result" text,"Attendance" text)
SELECT "Date" FROM table_12759 WHERE "Attendance" = '82,500'
what is the number of patients whose procedure long title is combined right and left heart angiocardiography?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Combined right and left heart angiocardiography"
When was the sargent bridge built?
CREATE TABLE table_name_61 (built VARCHAR,name VARCHAR)
SELECT built FROM table_name_61 WHERE name = "sargent bridge"
What body is at the World Championship for Underwater Target shooting?
CREATE TABLE table_66468 ("Sport" text,"Body" text,"Year" text,"Event type" text,"Location" text,"Nations" text)
SELECT "Body" FROM table_66468 WHERE "Event type" = 'world championship' AND "Sport" = 'underwater target shooting'
For all employees who have the letters D or S in their first name, find hire_date and the average of employee_id bin hire_date by time, and visualize them by a bar chart.
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID d...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
Which Draws has a Wins smaller than 17, and an Against smaller than 1158?
CREATE TABLE table_6897 ("Peel" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real)
SELECT COUNT("Draws") FROM table_6897 WHERE "Wins" < '17' AND "Against" < '1158'
What was the score of the game on June 1?
CREATE TABLE table_71571 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Score" FROM table_71571 WHERE "Date" = 'june 1'
Show names and seatings for all tracks opened after 2000 by a pie chart.
CREATE TABLE race (Race_ID int,Name text,Class text,Date text,Track_ID text)CREATE TABLE track (Track_ID int,Name text,Location text,Seating real,Year_Opened real)
SELECT Name, Seating FROM track WHERE Year_Opened > 2000
what was the first thing patient 027-142451 got diagnosed with in this year?
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 diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-142451')) AND DATETIME(diagnosis.diagnosistime, 'start of yea...
What is other when registered voters is 50.7%?
CREATE TABLE table_27003186_3 (other VARCHAR,registered_voters VARCHAR)
SELECT other FROM table_27003186_3 WHERE registered_voters = "50.7%"
Return a pie chart about the proportion of Team_Name and Team_ID.
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 Team_Name, Team_ID FROM basketball_match
Where's the louisiana-lafayette as a visiting team?
CREATE TABLE table_26842217_4 (site VARCHAR,visiting_team VARCHAR)
SELECT site FROM table_26842217_4 WHERE visiting_team = "Louisiana-Lafayette"
Which Week has an Opponent of pittsburgh steelers, and an Attendance larger than 47,727?
CREATE TABLE table_name_69 (week INTEGER,opponent VARCHAR,attendance VARCHAR)
SELECT MIN(week) FROM table_name_69 WHERE opponent = "pittsburgh steelers" AND attendance > 47 OFFSET 727
What is the percentage for Brown when the lead margin is 26?
CREATE TABLE table_name_35 (republican VARCHAR,lead_margin VARCHAR)
SELECT republican AS :_roy_brown FROM table_name_35 WHERE lead_margin = 26
What tournament has a year prior to 2001?
CREATE TABLE table_35925 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Extra" text)
SELECT "Tournament" FROM table_35925 WHERE "Year" < '2001'
What is the lowest crowd when essendon is the away team?
CREATE TABLE table_name_78 (crowd INTEGER,away_team VARCHAR)
SELECT MIN(crowd) FROM table_name_78 WHERE away_team = "essendon"
Find the student ID and personal name of the student with at least two enrollments.
CREATE TABLE Students (personal_name VARCHAR,student_id VARCHAR)CREATE TABLE Student_Course_Enrolment (student_id VARCHAR)
SELECT T1.student_id, T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT(*) >= 2
Show me about the distribution of ACC_Road and the average of School_ID , and group by attribute ACC_Road in a bar chart, order X-axis in descending order please.
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_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC
EA flight 825 from ATLANTA to DENVER leaving at 555 what type of aircraft is used on that flight
CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE compartment_class (compartment v...
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (((flight.departure_time = 555 AND flight.flight_number = 825) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1....
Which Date has a Venue of bucharest?
CREATE TABLE table_13121 ("Mark" text,"Wind*" text,"Athlete" text,"Nationality" text,"Venue" text,"Date" text)
SELECT "Date" FROM table_13121 WHERE "Venue" = 'bucharest'
What was the total when the set 3 score was 25 27?
CREATE TABLE table_name_12 (total VARCHAR,set_3 VARCHAR)
SELECT total FROM table_name_12 WHERE set_3 = "25–27"
what flights go from DALLAS to BALTIMORE
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)C...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO...
find out the number of divorced patients who were admitted before the year 2121.
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admityear < "2121"
Who had the high assist in a game number above 77 for Milwaukee?
CREATE TABLE table_name_24 (high_assists VARCHAR,game VARCHAR,team VARCHAR)
SELECT high_assists FROM table_name_24 WHERE game > 77 AND team = "milwaukee"
Which highest rank belongs to the palestinian territories?
CREATE TABLE table_6849 ("Rank" real,"Country" text,"Claimant" text,"Highest point" text,"Height" text)
SELECT MAX("Rank") FROM table_6849 WHERE "Country" = 'palestinian territories'
A bar chart about the number of faults for different fault short name, show in descending by the total number.
CREATE TABLE Part_Faults (part_fault_id INTEGER,part_id INTEGER,fault_short_name VARCHAR(20),fault_description VARCHAR(255),other_fault_details VARCHAR(255))CREATE TABLE Fault_Log (fault_log_entry_id INTEGER,asset_id INTEGER,recorded_by_staff_id INTEGER,fault_log_entry_datetime DATETIME,fault_description VARCHAR(255),o...
SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY fault_short_name ORDER BY COUNT(fault_short_name) DESC
Top 10 Gold Badge Users.
CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Com...
SELECT u.DisplayName, Posts.OwnerUserId AS UserId, BadgeCount, COUNT(Posts.Id) AS PostsCount FROM Posts JOIN Users AS u ON u.Id = Posts.OwnerUserId JOIN (SELECT Badges.UserId AS UserId, COUNT(Badges.Id) AS BadgeCount FROM Badges WHERE Badges.Class = 1 GROUP BY Badges.UserId) AS B ON Posts.OwnerUserId = B.UserId GROUP B...
How much Scored has Losses smaller than 0?
CREATE TABLE table_66359 ("Position" real,"Team" text,"Played" real,"Wins" real,"Draws" real,"Losses" real,"Scored" real,"Conceded" real,"Points" real)
SELECT SUM("Scored") FROM table_66359 WHERE "Losses" < '0'
Show me how many long by long in a histogram
CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city TEXT,installation_date TEXT)CREATE TABLE status (station_id INTEGER,bikes_available INTEGER,docks_available INTEGER,time TEXT)CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f...
SELECT long, COUNT(long) FROM station
what is maximum age of patients whose ethnicity is asian and days of hospital stay is 23?
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 text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id te...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.days_stay = "23"
What year has a nomination title of 'sangrador'?
CREATE TABLE table_name_84 (year__ceremony_ VARCHAR,film_title_used_in_nomination VARCHAR)
SELECT year__ceremony_ FROM table_name_84 WHERE film_title_used_in_nomination = "sangrador"
Return a bar chart showing the number of schools in each county.
CREATE TABLE School (School_id text,School_name text,Location text,Mascot text,Enrollment int,IHSAA_Class text,IHSAA_Football_Class text,County text)CREATE TABLE endowment (endowment_id int,School_id int,donator_name text,amount real)CREATE TABLE budget (School_id int,Year int,Budgeted int,total_budget_percent_budgeted...
SELECT County, COUNT(*) FROM School GROUP BY County
How many margins have a winner of S. Singaravadivel?
CREATE TABLE table_22753439_1 (margin VARCHAR,winner VARCHAR)
SELECT COUNT(margin) FROM table_22753439_1 WHERE winner = "S. Singaravadivel"
What is the average played that has a drawn greater than 1, with an against greater than 16?
CREATE TABLE table_name_17 (played INTEGER,drawn VARCHAR,against VARCHAR)
SELECT AVG(played) FROM table_name_17 WHERE drawn > 1 AND against > 16
Which tournament had Toshiaki Sakai as an opponent in the final on a grass surface?
CREATE TABLE table_57819 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text)
SELECT "Tournament" FROM table_57819 WHERE "Opponent in the final" = 'toshiaki sakai' AND "Surface" = 'grass'
Who directed the movie The Star Packer?
CREATE TABLE table_67265 ("Title" text,"Studio" text,"Role" text,"Leading lady" text,"Director" text)
SELECT "Director" FROM table_67265 WHERE "Title" = 'the star packer'
get me the number of patients on ih route of drug administration who have diagnoses of pneumonia, unspecified organism.
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 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 tex...
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 = "Pneumonia, organism NOS" AND prescriptions.route = "IH"
did patient 025-32034 have a sao2 that was greater than 100.0 on this month/07?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-32034')) AND vitalperiodic.sao2 > 100.0 AND NOT vitalperiodic.sa...
Who was champion in 2005 where the semi-finalist was #1 in western Carolina?
CREATE TABLE table_56693 ("Year" real,"Champion" text,"Score" text,"Runner-Up" text,"Location" text,"Semi-Finalist #1" text,"Semi-Finalist #2" text)
SELECT "Champion" FROM table_56693 WHERE "Year" = '2005' AND "Semi-Finalist #1" = 'western carolina'
How many products are not made by Sony?
CREATE TABLE products (code number,name text,price number,manufacturer number)CREATE TABLE manufacturers (code number,name text,headquarter text,founder text,revenue number)
SELECT COUNT(DISTINCT name) FROM products WHERE NOT name IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony')
how many high points where date is february 19
CREATE TABLE table_23480 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT COUNT("High points") FROM table_23480 WHERE "Date" = 'February 19'
For BIOPHYS 280 and 115 , what are the prerequisites ?
CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id in...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE (COURSE_1.number = 280 OR COURSE_1.number = 115) AND COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.depar...
For a team 2 of Al-Faisaly, what was the 2nd leg?
CREATE TABLE table_name_96 (team_2 VARCHAR)
SELECT 2 AS nd_leg FROM table_name_96 WHERE team_2 = "al-faisaly"