table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_name_85 ( report VARCHAR, date VARCHAR )
What Report is on June 3, 2000?
SELECT report FROM table_name_85 WHERE date = "june 3, 2000"
CREATE TABLE table_23689 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Bonus Points" text, "Points" text )
how many won 83 points for?
SELECT "Won" FROM table_23689 WHERE "Points for" = '83'
CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) ) CREATE TABLE Lots ( lot_id INTEGER, i...
Show all dates of transactions whose type code is 'SALE', and count them by a line chart
SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE"
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 demographic (...
count the number of patients whose admission type is elective and lab test fluid is other body fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.fluid = "Other Body Fluid"
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefin...
Where to see how long I have been a member of SO?. http://meta.stackoverflow.com/questions/334109/where-to-see-how-long-i-have-been-a-member-of-so
SELECT Id AS "user_link", CreationDate FROM Users WHERE Id = '##userid##'
CREATE TABLE table_58220 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What is the grid 13 time score?
SELECT "Time/Retired" FROM table_58220 WHERE "Grid" = '13'
CREATE TABLE table_203_699 ( id number, "name" text, "parentage" text, "size" text, "flower colour" text, "flower type" text )
is leonard messel or royalty larger in size ?
SELECT "name" FROM table_203_699 WHERE "name" IN ('leonard messel', 'royalty') ORDER BY "size" DESC LIMIT 1
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, ...
what were the number of patients who received an cortisol test this year?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'cortisol' AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
CREATE TABLE table_31100 ( "Stage" real, "Winner" text, "General Classification" text, "Mountains Classification" text, "Sprint Classification" text, "Young Rider Classification" text, "Team Classification" text, "Aggressive Rider" text )
Who is the sprint classification where Francisco Ventoso wins?
SELECT "Sprint Classification" FROM table_31100 WHERE "Winner" = 'Francisco Ventoso'
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, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
give me the number of married patients admitted in hospital before 2119.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2119"
CREATE TABLE table_name_50 ( kind_of_the_song VARCHAR, number VARCHAR, name_of_the_song VARCHAR )
What type of song is larger than 8 and named ?
SELECT kind_of_the_song FROM table_name_50 WHERE number > 8 AND name_of_the_song = "實情"
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and revenue , and group by attribute headquarter, display by the bars in asc.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name
CREATE TABLE table_69215 ( "Rank (CSA)" text, "State(s)" text, "2007 Estimate" text, "2000 Population" text, "Percent Change (1990\u20132000)" text )
What is the rank of a result with a population of 99,962 in 2000?
SELECT "Rank (CSA)" FROM table_69215 WHERE "2000 Population" = '99,962'
CREATE TABLE table_24223834_3 ( overall VARCHAR, title VARCHAR )
How may overall episodes had the title 'this is what they want'?
SELECT COUNT(overall) FROM table_24223834_3 WHERE title = "This is What They Want"
CREATE TABLE table_7962 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Which Date has a Tie no of 11?
SELECT "Date" FROM table_7962 WHERE "Tie no" = '11'
CREATE TABLE table_38475 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text )
What is the Class AA in the 2010-11 school year with a class AAA of Giddings?
SELECT "Class AA" FROM table_38475 WHERE "Class AAA" = 'giddings' AND "School Year" = '2010-11'
CREATE TABLE table_10490 ( "Retail name" text, "Chipset based on" text, "Digital/analog signal" text, "AVIVO" text, "Available interface" text )
What is the Retail name with a Digital/analog signal with analog, and a Chipset based on with radeon 9600?
SELECT "Retail name" FROM table_10490 WHERE "Digital/analog signal" = 'analog' AND "Chipset based on" = 'radeon 9600'
CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule...
Give me the title and highest price for each film in a bar chart, and display x-axis in asc order.
SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title
CREATE TABLE table_name_72 ( to_par VARCHAR, country VARCHAR, score VARCHAR )
What is the to par for the United States with a 67-71-73=211 score?
SELECT to_par FROM table_name_72 WHERE country = "united states" AND score = 67 - 71 - 73 = 211
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, ...
count the number of medications patient 006-147098 has been prescribed in their last hospital visit.
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-147098' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hos...
CREATE TABLE table_14722 ( "Game" real, "Date" text, "Location" text, "Time" text, "Attendance" real )
What was the average attendance on October 12?
SELECT AVG("Attendance") FROM table_14722 WHERE "Date" = 'october 12'
CREATE TABLE table_name_61 ( season VARCHAR, super_g VARCHAR, overall VARCHAR )
How many seasons had a Super G of 2 and overall of 3?
SELECT COUNT(season) FROM table_name_61 WHERE super_g = "2" AND overall = 3
CREATE TABLE table_13968 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text )
What is the lowest number of f/laps with more than 4 podiums and more than 14 races?
SELECT MIN("F/Laps") FROM table_13968 WHERE "Podiums" > '4' AND "Races" > '14'
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 t...
give me the number of patients whose admission year is less than 2173 and lab test name is calculated bicarbonate, whole blood?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2173" AND lab.label = "Calculated Bicarbonate, Whole Blood"
CREATE TABLE table_181240_1 ( modern_german__standard_wording_ VARCHAR, english___bcp__ VARCHAR )
What is the english (bcp) phrase 'for thine is the kingdom, the power' in modern german with standard wording?
SELECT modern_german__standard_wording_ FROM table_181240_1 WHERE english___bcp__ = "For thine is the kingdom, the power"
CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int ) CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge...
Return a histogram on how many hosts does each nationality have? List the nationality and the count.
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality
CREATE TABLE table_name_58 ( away_team VARCHAR, attendance VARCHAR )
What is the away team of the game with an attendance of 117?
SELECT away_team FROM table_name_58 WHERE attendance = 117
CREATE TABLE table_63539 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "Place" real, "Points" real )
What was the lowest draw for Beathoven when the place was smaller than 16?
SELECT MIN("Draw") FROM table_63539 WHERE "Artist" = 'beathoven' AND "Place" < '16'
CREATE TABLE table_16114 ( "Season" text, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text )
What is the number of podiums for season 2010 for campionato italiano superstars.
SELECT COUNT("Podiums") FROM table_16114 WHERE "Season" = '2010' AND "Series" = 'Campionato Italiano Superstars'
CREATE TABLE table_34351 ( "Date" text, "Site" text, "Sport" text, "Winning team" text, "Series" text )
Which Series are on september 15, 2007?
SELECT "Series" FROM table_34351 WHERE "Date" = 'september 15, 2007'
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(...
Visualize a bar chart for simply displaying the email address of the employee and the corresponding employee id, and could you display by the X-axis in asc?
SELECT EMAIL, EMPLOYEE_ID FROM employees ORDER BY EMAIL
CREATE TABLE table_name_99 ( race VARCHAR, tyre VARCHAR, winning_driver VARCHAR )
What is the race that had a tyre of p and Juan Manuel Fangio as the winning driver?
SELECT race FROM table_name_99 WHERE tyre = "p" AND winning_driver = "juan manuel fangio"
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, ...
what is the number of patients whose days of hospital stay is greater than 27 and drug route is both eyes?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "27" AND prescriptions.route = "BOTH EYES"
CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE TABLE party ( ...
Show the zip code of the county with name 'Howard'.
SELECT zip_code FROM county WHERE county_name = "Howard"
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE...
cliffer some closed questions that need cliffering 2. http://meta.stackexchange.com/questions/78048/enable-automatic-deletion-of-old-unanswered-zero-score-questions-after-a-year/92006#92006
SELECT q.Id AS "post_link", q.Score AS qScore, a.Score AS aScore, q.ViewCount AS Views, q.CreationDate AS qDate FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND q.Score < 1 AND a.Score = 1 AND q.AcceptedAnswerId IS NULL AND DATEDIFF(DAY, q.ClosedDate, GETDATE())...
CREATE TABLE table_27058 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
When 15 is the number in season what is the highest number in series?
SELECT MAX("No. in series") FROM table_27058 WHERE "No. in season" = '15'
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
how many *nf* rasburicase prescriptions have been written?
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = '*nf* rasburicase'
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 ) C...
how many patients have a government insurance policy?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Government"
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
A pie chart shows the proportion of All_Neutral and team id.
SELECT All_Neutral, Team_ID FROM basketball_match
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
the heartrate of patient 005-11182 last measured on the first icu visit is greater than it was first measured on the first icu visit?
SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-11182') AND NOT patient.unitdischargetime IS ...
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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
count the number of people who were diagnosed with lung contusion-open and didn't come back to the hospital within 2 months.
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'lung contu...
CREATE TABLE table_43883 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is Country, when Player is 'Jack Nicklaus'?
SELECT "Country" FROM table_43883 WHERE "Player" = 'jack nicklaus'
CREATE TABLE table_11206787_5 ( capacity INTEGER, team VARCHAR )
What is the minimum capacity where airdrie united is?
SELECT MIN(capacity) FROM table_11206787_5 WHERE team = "Airdrie United"
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, Crea...
swt tagged questions without answers and comments.
SELECT Id, Body FROM Posts WHERE CommentCount = 0 AND AnswerCount = 0 AND Tags LIKE '%eclipse%'
CREATE TABLE film_actor ( actor_id number, film_id number, last_update time ) CREATE TABLE category ( category_id number, name text, last_update time ) CREATE TABLE store ( store_id number, manager_staff_id number, address_id number, last_update time ) CREATE TABLE country ( ...
How many cities are in Australia?
SELECT COUNT(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
CREATE TABLE Scientists ( SSN int, Name Char(30) ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int )
What is the name of the project that has a scientist assigned to it whose name contains 'Smith', and count them by a bar chart, I want to order in asc by the total number.
SELECT T2.Name, COUNT(T2.Name) FROM AssignedTo AS T1 JOIN Projects AS T2 ON T1.Project = T2.Code JOIN Scientists AS T3 ON T1.Scientist = T3.SSN WHERE T3.Name LIKE '%Smith%' GROUP BY T2.Name ORDER BY COUNT(T2.Name)
CREATE TABLE table_47804 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real, "Finish" text )
What is Player, when Year(s) Won is 1978 , 1985?
SELECT "Player" FROM table_47804 WHERE "Year(s) won" = '1978 , 1985'
CREATE TABLE table_28243691_1 ( enrollment INTEGER, founded VARCHAR )
List the highest number of students in attendance for the institution that started in 1923.
SELECT MAX(enrollment) FROM table_28243691_1 WHERE founded = 1923
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 ( EMPLO...
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 email and employee_id , list from low to high by the y axis.
SELECT EMAIL, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE participates_in ( stuid number, actid number ) CREATE TABL...
Show the ids of all the faculty members who participate in an activity and advise a student.
SELECT facid FROM faculty_participates_in INTERSECT SELECT advisor FROM student
CREATE TABLE table_22831 ( "DMA" real, "Market" text, "Station" text, "Frequency" text, "Branding" text, "Format" text )
Which branding has the format of southern country?
SELECT "Branding" FROM table_22831 WHERE "Format" = 'Southern Country'
CREATE TABLE table_name_93 ( event VARCHAR, name VARCHAR )
Name the Event of sudesh peiris?
SELECT event FROM table_name_93 WHERE name = "sudesh peiris"
CREATE TABLE table_42486 ( "Rank" real, "Province" text, "Population" real, "Area" real, "Density" real )
What is the Density that has a Population larger than 290,458, and an Area of 91.6?
SELECT SUM("Density") FROM table_42486 WHERE "Population" > '290,458' AND "Area" = '91.6'
CREATE TABLE table_61672 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What To par has a Place of t2, and a Country of united states?
SELECT "To par" FROM table_61672 WHERE "Place" = 't2' AND "Country" = 'united states'
CREATE TABLE table_33913 ( "Year" real, "Championship" text, "Winning score" text, "Margin" text, "Runner(s)-up" text )
What Championship had a Winning score of 6 & 5?
SELECT "Championship" FROM table_33913 WHERE "Winning score" = '6 & 5'
CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER ) CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), ...
How many faculty members do we have for each gender? Draw a bar chart, and I want to order by the names in asc please.
SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex ORDER BY Sex
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, ...
count the number of patients born before 2053 who are taking drug via ivpca route.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2053" AND prescriptions.route = "IVPCA"
CREATE TABLE table_63584 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Attendance" real )
What was the home team for the game with attendance larger than 59,064 and a record of 7-4-0?
SELECT "Home" FROM table_63584 WHERE "Attendance" > '59,064' AND "Record" = '7-4-0'
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 Posts ( Id number, PostTypeId number, AcceptedAnswer...
Posts with Tags for the last 60 days.
SELECT * FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE DATEDIFF(day, Posts.CreationDate, GETDATE()) < 60
CREATE TABLE table_14736 ( "Unit" text, "Reactor type" text, "Net capacity" text, "Gross capacity" text, "Construction started" text, "Electricity grid" text, "Commercial operation" text, "Shutdown" text )
What reactor type that has a commercial operation of , and a tianwan-7 unit?
SELECT "Reactor type" FROM table_14736 WHERE "Commercial operation" = '—' AND "Unit" = 'tianwan-7'
CREATE TABLE table_2679061_7 ( college_junior_club_team VARCHAR, pick__number VARCHAR )
How many teams got pick number 130?
SELECT COUNT(college_junior_club_team) FROM table_2679061_7 WHERE pick__number = 130
CREATE TABLE table_name_62 ( population VARCHAR, official_name VARCHAR )
What is saint-andr 's population?
SELECT population FROM table_name_62 WHERE official_name = "saint-andré"
CREATE TABLE table_204_103 ( id number, "medal" text, "name" text, "sport" text, "event" text )
in what sport did india win the most silver medals ?
SELECT "sport" FROM table_204_103 GROUP BY "sport" ORDER BY COUNT("medal") DESC LIMIT 1
CREATE TABLE table_name_83 ( accreditation_status VARCHAR, product_name VARCHAR )
What is the Accreditation Status, when the Product Name is LG RCS-e Client?
SELECT accreditation_status FROM table_name_83 WHERE product_name = "lg rcs-e client"
CREATE TABLE table_11785 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the highest crowd when fitzroy is the home team?
SELECT MAX("Crowd") FROM table_11785 WHERE "Home team" = 'fitzroy'
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction 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...
Is there a lab for CHE 330 if Prof. Jessi Streib teaches it ?
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.department = 'CHE'...
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, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
what is the number of dead patients who were diagnosed with unspecified pseudomonas infection?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Pseudomonas infect NOS"
CREATE TABLE table_100 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What college did Calvin McCarty play at?
SELECT "College" FROM table_100 WHERE "Player" = 'Calvin McCarty'
CREATE TABLE table_2655016_4 ( nick_prod__number INTEGER )
What is the lowest Nick production number?
SELECT MIN(nick_prod__number) FROM table_2655016_4
CREATE TABLE table_18155 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Results" text, "Candidates" text )
How many elections have resulted in retired democratic hold?
SELECT COUNT("Party") FROM table_18155 WHERE "Results" = 'Retired Democratic hold'
CREATE TABLE Customers ( customer_id INTEGER, payment_method VARCHAR(15), customer_name VARCHAR(80), date_became_customer DATETIME, other_customer_details VARCHAR(255) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_address_from DATETIME, address_ty...
What are the number of the dates when customers with ids between 10 and 20 became customers?, and order by the the number of date became customer in descending please.
SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 ORDER BY COUNT(date_became_customer) DESC
CREATE TABLE ship ( ship_id number, name text, type text, built_year number, class text, flag text ) CREATE TABLE captain ( captain_id number, name text, ship_id number, age text, class text, rank text )
Which rank is the most common among captains?
SELECT rank FROM captain GROUP BY rank ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_42451 ( "Year" real, "Team" text, "Chassis" text, "Engine" text, "Rank" text, "Points" real )
Which engine has a chassis of dallara, is ranked 6th, and has 384 points?
SELECT "Engine" FROM table_42451 WHERE "Chassis" = 'dallara' AND "Rank" = '6th' AND "Points" = '384'
CREATE TABLE table_44340 ( "Team" text, "Tries for" text, "Tries against" text, "Try diff" text, "Points for" text, "Points against" text, "Points diff" text )
What is the Points for number of the team with a 10 Tries against number?
SELECT "Points for" FROM table_44340 WHERE "Tries against" = '10'
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 intakeoutput ( in...
how many times patient 005-18714 last year visits the icu?
SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-18714') AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime...
what was the name of the lab test that patient 003-39001 received for first time in 02/last year?
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-39001')) AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), ...
CREATE TABLE table_204_749 ( id number, "courthouse" text, "city" text, "street address" text, "jurisdiction" text, "dates of use" text, "named for" number )
where is the location -lrb- city -rrb- of the last u.s. post office and court house on the chart ?
SELECT "city" FROM table_204_749 ORDER BY id DESC LIMIT 1
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
how many patients stayed on the 888 ward a year before?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 888 AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
CREATE TABLE table_80303 ( "Year" text, "Winner" text, "Country" text, "Score" text, "Margin" text, "Runner(s)-up" text )
Who was the runner-up when the year was 2008?
SELECT "Runner(s)-up" FROM table_80303 WHERE "Year" = '2008'
CREATE TABLE table_name_77 ( date_of_appointment VARCHAR, outgoing_manager VARCHAR )
When was outgoing manager Zolt n Varga appointed?
SELECT date_of_appointment FROM table_name_77 WHERE outgoing_manager = "zoltán varga"
CREATE TABLE table_15852257_1 ( races INTEGER )
What is the highest value for race?
SELECT MAX(races) FROM table_15852257_1
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id n...
calculate the number of visits to patient 72647's hospital since 2102.
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 72647 AND STRFTIME('%y', admissions.admittime) >= '2102'
CREATE TABLE table_name_91 ( tries_against INTEGER, points_against VARCHAR, tries_for VARCHAR )
What Tries against that have a Points against of 95 and Tries for larger than 20?
SELECT SUM(tries_against) FROM table_name_91 WHERE points_against = 95 AND tries_for > 20
CREATE TABLE drivers ( forename VARCHAR, surname VARCHAR, driverid VARCHAR ) CREATE TABLE laptimes ( driverid VARCHAR, milliseconds INTEGER )
List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?
SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
CREATE TABLE table_36379 ( "Game" real, "March" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which Game has a March smaller than 12, and a Score of 10 1?
SELECT MIN("Game") FROM table_36379 WHERE "March" < '12' AND "Score" = '10–1'
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid numbe...
what is the name of the medication that patient 10425 was prescribed during the same hospital visit after being diagnosed with peritonitis (acute) gen since 75 months ago?
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 10425 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.s...
CREATE TABLE table_15621965_1 ( nationality VARCHAR, no VARCHAR )
Name the nationality of number 9
SELECT nationality FROM table_15621965_1 WHERE no = 9
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Return a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Home.
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Home, All_Home
CREATE TABLE table_30065 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
How many games did they play on january 11?
SELECT COUNT("Location Attendance") FROM table_30065 WHERE "Date" = 'January 11'
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
when did patient 18841 get admitted to the hospital for the first time the last year via emergency room admitting?
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 18841 AND admissions.admission_location = 'emergency room admit' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1
CREATE TABLE table_name_95 ( lost INTEGER, goals_scored VARCHAR, played VARCHAR )
What is the average value for Lost, when the value for Goals Scored is greater than 20, and when the value for Played is less than 18?
SELECT AVG(lost) FROM table_name_95 WHERE goals_scored > 20 AND played < 18
CREATE TABLE table_203_102 ( id number, "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text )
is the best time for the 100 m more or less than the time for the 110 m hurdles ?
SELECT (SELECT "performance" FROM table_203_102 WHERE "event" = '100 m') > (SELECT "performance" FROM table_203_102 WHERE "event" = '110 m hurdles')
CREATE TABLE table_4335 ( "Region" text, "Date" text, "Format" text, "Label" text, "Edition(s)" text )
Tell me the format for worldwide region july 22, 2008
SELECT "Format" FROM table_4335 WHERE "Region" = 'worldwide' AND "Date" = 'july 22, 2008'
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...
AAD Question count by month.
SELECT * FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName IN ('azure-active-directory', 'azure-ad-b2c', 'azure-ad-graph-api', 'adal', 'microsoft-account') AND p.PostTypeId = 1
CREATE TABLE election ( election_id number, representative_id number, date text, votes number, vote_percent number, seats number, place number ) CREATE TABLE representative ( representative_id number, name text, state text, party text, lifespan text )
What are the minimum and maximum vote percents of elections?
SELECT MIN(vote_percent), MAX(vote_percent) FROM election
CREATE TABLE table_name_59 ( upper_index_kcal__nm_3 VARCHAR, fuel_gas VARCHAR, lower_index_mj__nm_3 VARCHAR )
What is the Upper index Kcal/ Nm 3 of iso-butane, and a Lower index MJ/ Nm 3 smaller than 84.71?
SELECT COUNT(upper_index_kcal__nm_3) FROM table_name_59 WHERE fuel_gas = "iso-butane" AND lower_index_mj__nm_3 < 84.71
CREATE TABLE musical ( Musical_ID int, Name text, Year int, Award text, Category text, Nominee text, Result text ) CREATE TABLE actor ( Actor_ID int, Name text, Musical_ID int, Character text, Duration text, age int )
Show the musical nominee with award 'Bob Fosse' or 'Cleavant Derricks', and count them by a bar chart, and could you list from high to low by the total number?
SELECT Nominee, COUNT(Nominee) FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" GROUP BY Nominee ORDER BY COUNT(Nominee) DESC
CREATE TABLE table_name_54 ( language VARCHAR, director VARCHAR )
Which Language Director of nagisa oshima use in his film?
SELECT language FROM table_name_54 WHERE director = "nagisa oshima"
CREATE TABLE table_22043925_1 ( denomination VARCHAR, school VARCHAR )
What is every denomination for the school Seymour college?
SELECT denomination FROM table_22043925_1 WHERE school = "Seymour College"
CREATE TABLE table_78557 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
Which Wins have a Goal Difference larger than 0, and Goals against larger than 40, and a Position smaller than 6, and a Club of sd indauchu?
SELECT MIN("Wins") FROM table_78557 WHERE "Goal Difference" > '0' AND "Goals against" > '40' AND "Position" < '6' AND "Club" = 'sd indauchu'