answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT date FROM table_name_83 WHERE away_team = "melbourne"
On what date did the away team Melbourne play?
CREATE TABLE table_name_83 (date VARCHAR, away_team VARCHAR)
SELECT date FROM table_22050544_3 WHERE event__number = "38M"
Event number 38m was held on which date?
CREATE TABLE table_22050544_3 (date VARCHAR, event__number VARCHAR)
SELECT shirt_sponsor FROM table_25527255_2 WHERE team = "FC Bunyodkor"
Who is the shirt sponsor for FC Bunyodkor?
CREATE TABLE table_25527255_2 ( shirt_sponsor VARCHAR, team VARCHAR )
SELECT home_team FROM table_name_56 WHERE away_team = "south melbourne"
What home team played the away team South Melbourne?
CREATE TABLE table_name_56 (home_team VARCHAR, away_team VARCHAR)
SELECT winner FROM table_22050544_3 WHERE event = "$109 No Limit Hold'em w/rebuys [Turbo]"
Who won the $109 no limit hold'em w/rebuys [turbo]?
CREATE TABLE table_22050544_3 (winner VARCHAR, event VARCHAR)
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. Visualize by pie chart.
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) )
SELECT MAX(area__sq_mi_) FROM table_name_88 WHERE county = "greenville county"
Which is the largest area in Greenville County, by square mile?
CREATE TABLE table_name_88 (area__sq_mi_ INTEGER, county VARCHAR)
SELECT event FROM table_22050544_3 WHERE entries = "25,883"
Which event had 25,883 entries?
CREATE TABLE table_22050544_3 (event VARCHAR, entries VARCHAR)
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the sum of salary , and group by attribute job_id in a bar chart, list X in asc order.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) 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 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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) )
SELECT SUM(2010 AS _census_population) FROM table_name_9 WHERE county = "oconee county" AND area__sq_mi_ < 674
Which is the total number in the 2010 Census in Oconee County where the area in square miles was less than 674?
CREATE TABLE table_name_9 (county VARCHAR, area__sq_mi_ VARCHAR)
SELECT COUNT(elapsed_time) FROM table_22050544_3 WHERE event = "$16.50 Fixed-Limit Badugi"
How many categories for elapsed time exist for the $16.50 fixed-limit badugi game?
CREATE TABLE table_22050544_3 (elapsed_time VARCHAR, event VARCHAR)
SELECT diagnoses.icd9_code FROM diagnoses WHERE diagnoses.subject_id = "19420"
find the diagnosis icd9 code of subject id 19420.
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, 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 text, admittime text, dischtime text, admityear 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 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 )
SELECT particle FROM table_name_61 WHERE rest_mass_mev___c_2 = "1192.642(24)"
Which Particle has a Rest mass MeV/c 2 of 1192.642(24)?
CREATE TABLE table_name_61 (particle VARCHAR, rest_mass_mev___c_2 VARCHAR)
SELECT year__ceremony_ FROM table_22032599_1 WHERE director = "Jaroslav Vojtek Category:Articles with hCards"
What year did jaroslav vojtek category:articles with hcards Direct?
CREATE TABLE table_22032599_1 (year__ceremony_ VARCHAR, director VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Film and Cinema Studies%' OR course.description LIKE '%Film and Cinema Studies%' OR course.name LIKE '%Film and Cinema Studies%') AND course.enforced_requirement = 'N / A'
Which Film and Cinema Studies courses do n't have prerequisites ?
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip 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 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 varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar )
SELECT particle FROM table_name_41 WHERE isospin_i = "1" AND commonly_decays_to = "p + + π 0 or n 0 + π +"
Which Particle has an Isospin I of 1 and Commonly decays to p + + π 0 or n 0 + π +?
CREATE TABLE table_name_41 (particle VARCHAR, isospin_i VARCHAR, commonly_decays_to VARCHAR)
SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = "Gypsy"
What was the result for Gypsy?
CREATE TABLE table_22032599_1 (result VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT COUNT(perfect_stem) FROM table_12784134_24 WHERE short_stem = "jo"
Name the perfect stem for jo
CREATE TABLE table_12784134_24 ( perfect_stem VARCHAR, short_stem VARCHAR )
SELECT rest_mass_mev___c_2 FROM table_name_58 WHERE makeup = "u s s" AND spin___parity___j_p = "3⁄2 +"
When the Makeup is u s s and the Spin (Parity) J P of 3⁄2 +, what is the Rest mass MeV/C2?
CREATE TABLE table_name_58 (rest_mass_mev___c_2 VARCHAR, makeup VARCHAR, spin___parity___j_p VARCHAR)
SELECT COUNT(film_title_used_in_nomination) FROM table_22032599_1 WHERE director = "Martin Repka Category:Articles with hCards"
HOw many films did martin repka category:articles with hcards direct?
CREATE TABLE table_22032599_1 (film_title_used_in_nomination VARCHAR, director VARCHAR)
SELECT "country" FROM table_204_126 GROUP BY "country" ORDER BY COUNT("player") DESC LIMIT 1
which country had the most leaders ?
CREATE TABLE table_204_126 ( id number, "place" text, "player" text, "country" text, "score" text, "to par" number, "money ($)" number )
SELECT particle FROM table_name_37 WHERE isospin_i = "1⁄2" AND symbol = "ξ ∗0 (1530)"
Which Particle has an Isospin I of 1⁄2, and a Symbol of ξ ∗0 (1530)?
CREATE TABLE table_name_37 (particle VARCHAR, isospin_i VARCHAR, symbol VARCHAR)
SELECT result FROM table_22032599_1 WHERE film_title_used_in_nomination = "City of the Sun"
What was the result for City of the Sun?
CREATE TABLE table_22032599_1 (result VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT "Written by" FROM table_16202 WHERE "Title" = 'Solo'
Who are the writers for the episode 'solo'?
CREATE TABLE table_16202 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT particle FROM table_name_85 WHERE makeup = "d s s" AND spin___parity___j_p = "3⁄2 +"
Which Particle has a Makeup of d s s and a Spin (Parity) J P of 3⁄2 +?
CREATE TABLE table_name_85 (particle VARCHAR, makeup VARCHAR, spin___parity___j_p VARCHAR)
SELECT language_s_ FROM table_22034853_1 WHERE film_title_used_in_nomination = "Late Bloomers"
What was the language for the movie "Late Bloomers"?
CREATE TABLE table_22034853_1 (language_s_ VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT date_of_birth FROM Customers WHERE customer_status_code = 'Good Customer'
When are the birthdays of customer who are classified as 'Good Customer' status?
CREATE TABLE Customers ( date_of_birth VARCHAR, customer_status_code VARCHAR )
SELECT particle FROM table_name_11 WHERE rest_mass_mev___c_2 = "1383.7±1.0"
Which Particle has a Rest mass MeV/c 2 of 1383.7±1.0?
CREATE TABLE table_name_11 (particle VARCHAR, rest_mass_mev___c_2 VARCHAR)
SELECT COUNT(original_title) FROM table_22034853_1 WHERE film_title_used_in_nomination = "If the Sun Never Returns"
How many original titles were listed as "If the Sun Never Returns"?
CREATE TABLE table_22034853_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "WHITE" AND lab.label = "Protein/Creatinine Ratio"
provide the number of patients whose ethnicity is white and lab test name is protein/creatinine ratio?
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_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 text, admittime text, dischtime text, admityear 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 text )
SELECT title FROM table_name_83 WHERE year = 2003 AND genre = "rap"
What was the title of Ashanti's 2003 rap song?
CREATE TABLE table_name_83 (title VARCHAR, year VARCHAR, genre VARCHAR)
SELECT language_s_ FROM table_22034853_1 WHERE film_title_used_in_nomination = "Mein Name Ist Bach"
What was the language of "Mein Name Ist Bach"?
CREATE TABLE table_22034853_1 (language_s_ VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT AVG("Decile") FROM table_68051 WHERE "Authority" = 'state' AND "Name" = 'ruapehu college'
What is the average decile of Ruapehu college, which has a state authority?
CREATE TABLE table_68051 ( "Name" text, "Years" text, "Area" text, "Authority" text, "Decile" real, "Roll" real )
SELECT MAX(tries) FROM table_name_49 WHERE player = "paul sykes" AND points > 0
How many tries did the player Paul Sykes take when he earned 0 points?
CREATE TABLE table_name_49 (tries INTEGER, player VARCHAR, points VARCHAR)
SELECT year__ceremony_ FROM table_22034853_1 WHERE original_title = "Vitus"
What was the year for the film "Vitus"?
CREATE TABLE table_22034853_1 (year__ceremony_ VARCHAR, original_title VARCHAR)
SELECT MIN("release date") FROM table_203_607
the release dates are no earlier than what year ?
CREATE TABLE table_203_607 ( id number, "catalogue number" text, "artist" text, "release title" text, "format" text, "release date" text )
SELECT position FROM table_name_74 WHERE goals = 0 AND points = 28 AND player = "mike forshaw"
Mike Forshaw had 0 goals and 28 points. What is his position?
CREATE TABLE table_name_74 (position VARCHAR, player VARCHAR, goals VARCHAR, points VARCHAR)
SELECT COUNT(film_title_used_in_nomination) FROM table_22034853_1 WHERE original_title = "Dans la ville blanche"
How many films are titled "Dans la Ville Blanche"?
CREATE TABLE table_22034853_1 (film_title_used_in_nomination VARCHAR, original_title VARCHAR)
SELECT t.TagName, e.Body AS "Excerpt", w.Body AS "WikiBody" FROM Tags AS t LEFT JOIN Posts AS e ON t.ExcerptPostId = e.Id LEFT JOIN Posts AS w ON t.WikiPostId = w.Id ORDER BY t.TagName
Get name, excerpts and wiki content of all tags..
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) 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, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number )
SELECT SUM(crowd) FROM table_name_47 WHERE venue = "brunswick street oval"
How big is the Venue of Brunswick Street Oval?
CREATE TABLE table_name_47 (crowd INTEGER, venue VARCHAR)
SELECT COUNT(written_by) FROM table_22053239_1 WHERE us_viewers__millions_ = "5.35"
How many of the writers had 5.35 viewers?
CREATE TABLE table_22053239_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT "Result" FROM table_32707 WHERE "Week" > '2' AND "Date" = 'december 27, 2004'
What's the result for the game held on December 27, 2004 with a week greater than 2?
CREATE TABLE table_32707 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" text )
SELECT away_team AS score FROM table_name_24 WHERE away_team = "north melbourne"
What is the Away Team score of North Melbourne?
CREATE TABLE table_name_24 (away_team VARCHAR)
SELECT elapsed_time FROM table_22050544_4 WHERE prize = "$9,377.42"
What was the elapsed time for the championship that had $9,377.42 in prize money?
CREATE TABLE table_22050544_4 (elapsed_time VARCHAR, prize VARCHAR)
SELECT "Player" FROM table_60949 WHERE "Money ( \u00a3 )" = '140,000'
Who is the player with 140,000?
CREATE TABLE table_60949 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( \u00a3 )" text )
SELECT killed FROM table_name_55 WHERE unit = "personal staff"
What was the number of Personal Staff Units Killed?
CREATE TABLE table_name_55 (killed VARCHAR, unit VARCHAR)
SELECT prize AS Pool FROM table_22050544_4 WHERE event__number = "27H"
What was the prize pool for the event number 27H?
CREATE TABLE table_22050544_4 (prize VARCHAR, event__number VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "27801"
Count the number of patients whose diagnosis icd9 code is 27801.
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 text, admittime text, dischtime text, admityear 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, 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT complement FROM table_name_53 WHERE killed = "0 off 0 men" AND wounded = "0 off 0 men" AND unit = "artillery corps"
What was the Complement of Artillery Corps Units that had 0 off 0 men Killed or Wounded?
CREATE TABLE table_name_53 (complement VARCHAR, unit VARCHAR, killed VARCHAR, wounded VARCHAR)
SELECT event FROM table_22050544_4 WHERE event__number = "8M"
What is the event name with the number 8M?
CREATE TABLE table_22050544_4 (event VARCHAR, event__number VARCHAR)
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85700) AND prescriptions.drug = 'hydrochlorothiazide' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')
does hydrochlorothiazide have been prescribed to patient 85700 during this month?
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE 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_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text )
SELECT wounded FROM table_name_79 WHERE complement = "83 off 9 men"
How many were Wounded while in a Unit with a Complement of 83 off 9 Men?
CREATE TABLE table_name_79 (wounded VARCHAR, complement VARCHAR)
SELECT COUNT(1980 AS __mil_) FROM table_22071705_6 WHERE country = "Soviet Union"
Name the total number 1980 mil for soviet union
CREATE TABLE table_22071705_6 (country VARCHAR)
SELECT Registration_Date, COUNT(Registration_Date) FROM Voting_record ORDER BY COUNT(Registration_Date) DESC
Give me a bar chart shows the distinct registration date, and bin the date into the weekday interval in a bar chart, and sort by the y axis from high to low please.
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Voting_record ( StuID INTEGER, Registration_Date VARCHAR(12), Election_Cycle VARCHAR(12), President_Vote INTEGER, Vice_President_Vote INTEGER, Secretary_Vote INTEGER, Treasurer_Vote INTEGER, Class_President_Vote INTEGER, Class_Senator_Vote INTEGER )
SELECT missing FROM table_name_89 WHERE killed = "0 off 0 men" AND wounded = "0 off 0 men" AND unit = "royal waggon train"
How many of the Royal Waggon Train Unit were Missing while having a Killed of 0 off 0 men and a Wounded of 0 off 0 men?
CREATE TABLE table_name_89 (missing VARCHAR, unit VARCHAR, killed VARCHAR, wounded VARCHAR)
SELECT COUNT(languages) FROM table_22073745_1 WHERE film_title_used_in_nomination = "Elles"
How many languages have elles as the film title used in nomination?
CREATE TABLE table_22073745_1 (languages VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT COUNT(region) FROM table_2588674_1 WHERE village = "Mongmong-Toto-Maite"
How many places named mongmong-toto-maite?
CREATE TABLE table_2588674_1 ( region VARCHAR, village VARCHAR )
SELECT wounded FROM table_name_24 WHERE killed = "0 off 0 men" AND unit = "artillery corps"
How many were Wounded in the Artillery Corps unit while having 0 off 0 men Killed?
CREATE TABLE table_name_24 (wounded VARCHAR, killed VARCHAR, unit VARCHAR)
SELECT COUNT(languages) FROM table_22073745_1 WHERE film_title_used_in_nomination = "Refractaire"
How many languages is refractaire as the film title used in nomination?
CREATE TABLE table_22073745_1 (languages VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT selfAnswer.Id AS "post_link", question.Score AS QuestionScore, selfAnswer.Score AS AnswerScore, question.Tags FROM Posts AS question INNER JOIN Posts AS selfAnswer ON selfAnswer.OwnerUserId = question.OwnerUserId AND selfAnswer.ParentId = question.Id AND selfAnswer.Id = question.AcceptedAnswerId WHERE question.PostTypeId = 1 AND selfAnswer.PostTypeId = 2 AND question.Tags LIKE CONCAT('%', @TagName, '%') ORDER BY (question.Score + selfAnswer.Score) DESC, selfAnswer.CreationDate DESC
self accepted answers in the given tag.
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) 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, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number )
SELECT surface FROM table_name_38 WHERE opponent = "yevgeny kafelnikov"
What suface during the game that had Yevgeny Kafelnikov as an opponent?
CREATE TABLE table_name_38 (surface VARCHAR, opponent VARCHAR)
SELECT COUNT(languages) FROM table_22073745_1 WHERE original_title = "Le Roman de Renart"
How many languages have le roman de renart as the original title?
CREATE TABLE table_22073745_1 (languages VARCHAR, original_title VARCHAR)
SELECT "player" FROM table_203_226 WHERE "player" IN ('anthony mcgrath', 'tim bresnan') ORDER BY "strike rate" LIMIT 1
who has a lower strike rate , anthony mcgrath or tim bresnan ?
CREATE TABLE table_203_226 ( id number, "player" text, "matches" number, "innings" number, "not out" number, "runs" number, "high score" number, "average" number, "strike rate" number, "100s" number, "50s" number )
SELECT MIN(week) FROM table_name_63 WHERE opponent = "san jose sabercats"
What was the earliest week that the Storm played the San Jose Sabercats?
CREATE TABLE table_name_63 (week INTEGER, opponent VARCHAR)
SELECT director FROM table_22073745_1 WHERE original_title = "Perl oder Pica"
Who is the director of the original title perl oder pica?
CREATE TABLE table_22073745_1 (director VARCHAR, original_title VARCHAR)
SELECT dates_active FROM table_10602294_1 WHERE deaths = "185km/h (115mph)"
What were the active dates for the storm that had 185km/h (115mph) deaths?
CREATE TABLE table_10602294_1 ( dates_active VARCHAR, deaths VARCHAR )
SELECT attendance FROM table_name_33 WHERE score = "† 4–4 †"
How many were in attendance when the score was † 4–4 †?
CREATE TABLE table_name_33 (attendance VARCHAR, score VARCHAR)
SELECT result FROM table_22073745_1 WHERE year__ceremony_ = "2005 (78th)"
What is the result of the 2005 (78th) year ceremony?
CREATE TABLE table_22073745_1 (result VARCHAR, year__ceremony_ VARCHAR)
SELECT series FROM table_name_54 WHERE winner = "jetmir salaj"
What is Series, when Winner is Jetmir Salaj?
CREATE TABLE table_name_54 ( series VARCHAR, winner VARCHAR )
SELECT attendance FROM table_name_95 WHERE runner_up = "livingston"
How many people were watching when Livingston was the runner-up?
CREATE TABLE table_name_95 (attendance VARCHAR, runner_up VARCHAR)
SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = "14.59"
What is the title that has 14.59 u.s. viewers (millions)?
CREATE TABLE table_22078691_2 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT voice_actor__harmony_gold_ova_dub_ FROM table_name_10 WHERE voice_actor__adv_tv_sentai_ova_dub_ = "kim prause"
Who is the voice actor (harmony gold ova dub) of the character with a voice actor (adv TV/sentai ova dub) Kim Prause?
CREATE TABLE table_name_10 ( voice_actor__harmony_gold_ova_dub_ VARCHAR, voice_actor__adv_tv_sentai_ova_dub_ VARCHAR )
SELECT AVG(grid) FROM table_name_36 WHERE laps > 52 AND driver = "andrea de adamich"
what average grid has laps larger than 52 and contains the driver of andrea de adamich?
CREATE TABLE table_name_36 (grid INTEGER, laps VARCHAR, driver VARCHAR)
SELECT title FROM table_22078691_2 WHERE us_viewers__millions_ = "13.59"
What is the title that had 13.59 u.s. viewers (millions)?
CREATE TABLE table_22078691_2 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT home_team AS score FROM table_name_59 WHERE away_team = "geelong"
What was the score of the home team when the away team was Geelong?
CREATE TABLE table_name_59 ( home_team VARCHAR, away_team VARCHAR )
SELECT MAX(laps) FROM table_name_34 WHERE driver = "graham hill" AND grid > 18
what's the highest lap that contains the driver of graham hill and a grid that is larger than 18?
CREATE TABLE table_name_34 (laps INTEGER, driver VARCHAR, grid VARCHAR)
SELECT money_list_rank FROM table_22081847_1 WHERE earnings__$_ = "309,886"
If the earning amount is $309,886, what is the money list ranking?
CREATE TABLE table_22081847_1 (money_list_rank VARCHAR, earnings__$_ VARCHAR)
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID)
For those employees who was hired before 2002-06-21, a bar chart shows the distribution of job_id and the average of employee_id , and group by attribute job_id, sort in ascending by the y axis please.
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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 countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 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) )
SELECT AVG(grid) FROM table_name_81 WHERE time_retired = "piston" AND laps < 15
what's the average grid that has a time/retired piston and laps smaller than 15?
CREATE TABLE table_name_81 (grid INTEGER, time_retired VARCHAR, laps VARCHAR)
SELECT MAX(wins) FROM table_22081847_1
What was the maximum number of wins?
CREATE TABLE table_22081847_1 (wins INTEGER)
SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id = T2.id ORDER BY T2.dock_count DESC LIMIT 1
What is the id of the trip that started from the station with the highest dock count?
CREATE TABLE station ( id number, name text, lat number, long number, dock_count number, city text, installation_date text ) CREATE TABLE trip ( id number, duration number, start_date text, start_station_name text, start_station_id number, end_date text, end_station_name text, end_station_id number, bike_id number, subscription_type text, zip_code number ) CREATE TABLE weather ( date text, max_temperature_f number, mean_temperature_f number, min_temperature_f number, max_dew_point_f number, mean_dew_point_f number, min_dew_point_f number, max_humidity number, mean_humidity number, min_humidity number, max_sea_level_pressure_inches number, mean_sea_level_pressure_inches number, min_sea_level_pressure_inches number, max_visibility_miles number, mean_visibility_miles number, min_visibility_miles number, max_wind_speed_mph number, mean_wind_speed_mph number, max_gust_speed_mph number, precipitation_inches number, cloud_cover number, events text, wind_dir_degrees number, zip_code number ) CREATE TABLE status ( station_id number, bikes_available number, docks_available number, time text )
SELECT tuner FROM table_name_86 WHERE season > 2004 AND driver = "gaurav gill" AND team = "team mrf" AND governing_body = "mai"
Who is the tuner after season 2004 with Gaurav Gill as the driver, Team MRF, and Mai governing body?
CREATE TABLE table_name_86 (tuner VARCHAR, governing_body VARCHAR, team VARCHAR, season VARCHAR, driver VARCHAR)
SELECT scoring_average FROM table_22081847_1 WHERE year = 2010
If the year is 2010, what was the average score?
CREATE TABLE table_22081847_1 (scoring_average VARCHAR, year VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Yang Zhang%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
What classes will Dr. Yang Zhang be teaching this upcoming semester ?
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) 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 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 course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int )
SELECT driver FROM table_name_37 WHERE tuner = "n. leelakrishnan" AND governing_body = "mai" AND season = 2003
Who is the driver in season 2003 with a tuner of N. Leelakrishnan and a Mai governing body?
CREATE TABLE table_name_37 (driver VARCHAR, season VARCHAR, tuner VARCHAR, governing_body VARCHAR)
SELECT COUNT(event) FROM table_22083044_2 WHERE fastest_lap = "Tim Macrow" AND pole_position = "Joey Foster"
How many times did Tim Macrow and Joey Foster both got the fastest lap and pole position respectively?
CREATE TABLE table_22083044_2 (event VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR)
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'neurosurgery - resection of avm')) GROUP BY cost.patienthealthsystemstayid) AS t1
what is the maximum total hospital cost involving a procedure called a neurosurgery - resection of avm?
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT tuner FROM table_name_23 WHERE team = "mrf"
Who is the turner on Team MRF?
CREATE TABLE table_name_23 (tuner VARCHAR, team VARCHAR)
SELECT winning_team FROM table_22083044_2 WHERE circuit = "Queensland Raceway" AND fastest_lap = "Tim Macrow"
What was the winning team where Tim Macrow won the fastest lap on Queensland Raceway circuit?
CREATE TABLE table_22083044_2 (winning_team VARCHAR, circuit VARCHAR, fastest_lap VARCHAR)
SELECT COUNT("representative") FROM table_204_887 WHERE "party" = 'republican'
how many representatives are republican ?
CREATE TABLE table_204_887 ( id number, "district" number, "representative" text, "party" text, "residence" text, "counties represented" text )
SELECT MIN(season) FROM table_name_34 WHERE driver = "farad bathena"
What is the earliest season with driver Farad Bathena?
CREATE TABLE table_name_34 (season INTEGER, driver VARCHAR)
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE written_by = "David North"
What's the series number of the episode whose writer is David North?
CREATE TABLE table_22078972_2 (no_in_series INTEGER, written_by VARCHAR)
SELECT MAX(played) FROM table_name_36 WHERE points > 11 AND lost > 7
Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?
CREATE TABLE table_name_36 ( played INTEGER, points VARCHAR, lost VARCHAR )
SELECT MIN(goals) FROM table_name_63 WHERE league = "major league soccer" AND season = "2005"
Which Major League Soccer team for the 2005 season has the lowest goals?
CREATE TABLE table_name_63 (goals INTEGER, league VARCHAR, season VARCHAR)
SELECT MAX(no_in_series) FROM table_22078972_2 WHERE us_viewers__millions_ = "17.04"
What's the series number of the episode seen by 17.04 million people in the US?
CREATE TABLE table_22078972_2 (no_in_series INTEGER, us_viewers__millions_ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4601" AND prescriptions.route = "IV BOLUS"
count the number of patients on iv bolus route of drug administration who have procedure icd9 code 4601.
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_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 text, admittime text, dischtime text, admityear 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 text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT AVG(apps) FROM table_name_43 WHERE league = "major league soccer" AND club = "seattle sounders fc" AND goals < 0
What are the average apps for the Major League Soccer team club for the Seattle Sounders FC that has goals less than 0?
CREATE TABLE table_name_43 (apps INTEGER, goals VARCHAR, league VARCHAR, club VARCHAR)
SELECT title FROM table_22078972_2 WHERE us_viewers__millions_ = "18.15"
What's the title of the episode first seen by 18.15 million people in the US?
CREATE TABLE table_22078972_2 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT MAX(rank) FROM table_name_87 WHERE wins__outdoor_ > 1 AND wins__indoor_ < 0
Name the most rank for wins outdoor larger than 1 and wins indoor less than 0
CREATE TABLE table_name_87 ( rank INTEGER, wins__outdoor_ VARCHAR, wins__indoor_ VARCHAR )
SELECT icelandic FROM table_name_59 WHERE danish = "blåt/blå"
Which Icelandic has a Danish of blåt/blå?
CREATE TABLE table_name_59 (icelandic VARCHAR, danish VARCHAR)