instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
what is the special edition where the english version is nick stewart? | CREATE TABLE table_73749 ("Character" text,"English version" text,"Laserdisc edition" text,"Buena Vista edition" text,"Special edition" text) | SELECT "Special edition" FROM table_73749 WHERE "English version" = 'Nick Stewart' |
who had the slowest time in the race ? | CREATE TABLE table_204_160 (id number,"rank" number,"name" text,"nationality" text,"time" text,"notes" text) | SELECT "name" FROM table_204_160 ORDER BY "time" DESC LIMIT 1 |
Name the score for september 11 | CREATE TABLE table_name_48 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_48 WHERE date = "september 11" |
how many divorcee patients had a lab test for chloride? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Chloride" |
What is the total number of Bronze, when Silver is greater than 0, when Gold is greater than 3, and when Rank is 1? | CREATE TABLE table_45938 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Bronze") FROM table_45938 WHERE "Silver" > '0' AND "Gold" > '3' AND "Rank" = '1' |
Which High rebounds have High points of chris bosh (34)? | CREATE TABLE table_50276 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High rebounds" FROM table_50276 WHERE "High points" = 'chris bosh (34)' |
What is the number of wins the team Boston Red Stockings got in the postseasons each year in history Show the tendency, I want to list X in desc order. | CREATE TABLE manager_award_vote (award_id TEXT,year INTEGER,league_id TEXT,player_id TEXT,points_won INTEGER,points_max INTEGER,votes_first INTEGER)CREATE TABLE player_award_vote (award_id TEXT,year INTEGER,league_id TEXT,player_id TEXT,points_won NUMERIC,points_max INTEGER,votes_first NUMERIC)CREATE TABLE all_star (pl... | SELECT year, COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year ORDER BY year DESC |
I want the NGC number for right ascension of 08h11m13.6s | CREATE TABLE table_55302 ("NGC number" real,"Object type" text,"Constellation" text,"Right ascension (J2000)" text,"Declination (J2000)" text,"Apparent magnitude" real) | SELECT "NGC number" FROM table_55302 WHERE "Right ascension ( J2000 )" = '08h11m13.6s' |
provide the number of patients whose admission type is emergency and diagnoses long title is other drugs and medicinal substances causing adverse effects in therapeutic use? | 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 = "Other drugs and medicinal substances causing adverse effects in therapeutic use" |
which examples are pronounced et in australian | CREATE TABLE table_1763 ("Ending" text,"American" text,"British" text,"Australian" text,"Examples" text) | SELECT "Examples" FROM table_1763 WHERE "Australian" = 'et' |
when did patient 012-37411 last have a sao2 measured on the current icu visit? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature ... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-37411') AND patient.unitdischargetime IS NULL) ... |
Python gold badgers ordered by date. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskStates (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 FlagTypes (I... | SELECT ROW_NUMBER() OVER (ORDER BY b.Date DESC), b.UserId AS "user_link", b.Date AS got_gold_python, u.Reputation AS rep FROM Users AS u, Badges AS b WHERE b.Name = 'python' AND b.Class = 1 AND u.Id = b.UserId GROUP BY b.Date, b.UserId, u.Reputation |
Which Date has an Away team score of 16.13 (109)? | CREATE TABLE table_51888 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_51888 WHERE "Away team score" = '16.13 (109)' |
What game was played on May 29? | CREATE TABLE table_name_1 (game VARCHAR,date VARCHAR) | SELECT game FROM table_name_1 WHERE date = "may 29" |
What category has a year after 2004? | CREATE TABLE table_name_33 (category VARCHAR,year INTEGER) | SELECT category FROM table_name_33 WHERE year > 2004 |
Which Tournament has a Score of 3 6 6 4 4 6? | CREATE TABLE table_name_43 (tournament VARCHAR,score VARCHAR) | SELECT tournament FROM table_name_43 WHERE score = "3–6 6–4 4–6" |
What is the callsign when power kw is 25kw? | CREATE TABLE table_26387 ("Branding" text,"Callsign" text,"Frequency" text,"Power kW" text,"Coverage" text) | SELECT "Callsign" FROM table_26387 WHERE "Power kW" = '25kW' |
when was lawrence academy at groton established? | CREATE TABLE table_2439728_1 (founded INTEGER,school VARCHAR) | SELECT MIN(founded) FROM table_2439728_1 WHERE school = "Lawrence Academy at Groton" |
What is Winner, when Circuit is June 8? | CREATE TABLE table_name_33 (winner VARCHAR,circuit VARCHAR) | SELECT winner FROM table_name_33 WHERE circuit = "june 8" |
Which of the upper-level classes being offered are 11 credits ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 11 AND program_course.category LIKE 'ULCS' |
Who is the opponent on November 22, 2009, clay surface? | CREATE TABLE table_45699 ("Date" text,"Tournament" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Opponent" FROM table_45699 WHERE "Surface" = 'clay' AND "Date" = 'november 22, 2009' |
After 1993, what is the Seats with a % votes of 38.72? | CREATE TABLE table_67723 ("Year" real,"Designation" text,"% votes" real,"Seats" text,"% seats" real) | SELECT "Seats" FROM table_67723 WHERE "Year" > '1993' AND "% votes" = '38.72' |
calculate the maximum age of patients who are female and have private insurance. | 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 demographic (subject_id text,hadm_id text,name text,marital... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.insurance = "Private" |
What was the entry for highest when average is 10295? | CREATE TABLE table_237757_10 (highest VARCHAR,average VARCHAR) | SELECT highest FROM table_237757_10 WHERE average = 10295 |
How many points did the team who had 132 total points have in round 1? | CREATE TABLE table_3137 ("Rank" real,"Team" text,"Round1" real,"Round2" real,"Round3" real,"Round4" real,"Total points" real) | SELECT MAX("Round1") FROM table_3137 WHERE "Total points" = '132' |
What is the category for trains numbered 16609/16610? | CREATE TABLE table_24571 ("Train No." text,"Train Name" text,"Destination" text,"Category" text,"Frequency" text) | SELECT "Category" FROM table_24571 WHERE "Train No." = '16609/16610' |
Name the finish for 4-4 | CREATE TABLE table_28176 ("Episode" real,"Reward" text,"Leader Battle" text,"Immunity" text,"Individual Immunity" text,"Eliminated" text,"Vote" text,"Finish" text) | SELECT "Finish" FROM table_28176 WHERE "Vote" = '4-4' |
Which builder completed before 1890 and launched on 9 june 1888? | CREATE TABLE table_name_84 (builder VARCHAR,completed VARCHAR,launched VARCHAR) | SELECT builder FROM table_name_84 WHERE completed < 1890 AND launched = "9 june 1888" |
What were the notes of the All-Africa Games before 2007? | CREATE TABLE table_name_41 (notes VARCHAR,competition VARCHAR,year VARCHAR) | SELECT notes FROM table_name_41 WHERE competition = "all-africa games" AND year < 2007 |
Show the names of trains and locations of railways they are in. | CREATE TABLE train (Name VARCHAR,Railway_ID VARCHAR)CREATE TABLE railway (Location VARCHAR,Railway_ID VARCHAR) | SELECT T2.Name, T1.Location FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID |
What was the method of resolution for the fight against dale hartt? | CREATE TABLE table_name_83 (method VARCHAR,opponent VARCHAR) | SELECT method FROM table_name_83 WHERE opponent = "dale hartt" |
how far is the airport from SAN FRANCISCO | CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airline (airline_code varchar,ai... | SELECT DISTINCT airport_service.miles_distant FROM airport_service, city WHERE city.city_code = airport_service.city_code AND city.city_name = 'SAN FRANCISCO' |
What are the lowest clubs that have a place greater than 5, with an all around greater than 9.7? | CREATE TABLE table_name_88 (clubs INTEGER,place VARCHAR,all_around VARCHAR) | SELECT MIN(clubs) FROM table_name_88 WHERE place > 5 AND all_around > 9.7 |
What race was a round smaller than 8, on 6 july? | CREATE TABLE table_62054 ("Round" real,"Race" text,"Circuit" text,"Date" text,"Event" text,"Winning driver" text) | SELECT "Race" FROM table_62054 WHERE "Round" < '8' AND "Date" = '6 july' |
was there a microbiological test that was done to patient 031-3355 during this month? | 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 tim... | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND DATETIME(microlab.culturetakentime, 'start of month') = DATETI... |
What CHEMBIO classes are needed for CS majors ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE instructo... | SELECT DISTINCT course.department, course.name, course.number FROM program_course INNER JOIN course ON program_course.course_id = course.course_id WHERE course.department = 'CHEMBIO' |
list the number of matches played by the teams that got an average of 1.079 | CREATE TABLE table_14489821_1 (average VARCHAR) | SELECT 1986 AS _87 FROM table_14489821_1 WHERE average = "1.079" |
For the United States, with greater than 2 bronze metals, greater than 3 silver medals, and a rank higher than 3, what is the highest total number of medals? | CREATE TABLE table_name_4 (total INTEGER,silver VARCHAR,nation VARCHAR,bronze VARCHAR,rank VARCHAR) | SELECT MAX(total) FROM table_name_4 WHERE bronze > 2 AND rank > 3 AND nation = "united states" AND silver > 3 |
Has Christo Sevov ever taught MCDB 436 ? | 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_id varchar)CREATE TABLE ta (campus_job_id int,student_id int,locati... | SELECT COUNT(*) > 0 FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MCDB' AND course.number = 436 AND instructor.name LIKE '%Christo Sevov%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.... |
What event placed bronze earlier than 1987? | CREATE TABLE table_name_16 (event VARCHAR,placed VARCHAR,year VARCHAR) | SELECT event FROM table_name_16 WHERE placed = "bronze" AND year < 1987 |
Where is the Westfield State University located? | CREATE TABLE table_23258 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Primary Conference" text,"LEC Sport" text) | SELECT "Location" FROM table_23258 WHERE "Institution" = 'Westfield State University' |
what are the three most common diagnoses that patients were diagnosed within the same month after they were diagnosed with obstructive sleep apnea last year? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_i... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions... |
What was in 2007 that has a 3r of 1999? | CREATE TABLE table_40302 ("Tournament" text,"1996" text,"1997" text,"1998" text,"1999" text,"2000" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text) | SELECT "2007" FROM table_40302 WHERE "1999" = '3r' |
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, draw a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by weekday. | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varc... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 |
Questions and Answers Score Distribution. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ... | SELECT PostTypeId, Score, COUNT(Id) FROM (SELECT CASE WHEN Score < 0 THEN '0- < 0' WHEN Score BETWEEN 0 AND 100 THEN '1- 0-100' WHEN Score BETWEEN 101 AND 500 THEN '2- 101-500' WHEN Score BETWEEN 501 AND 1000 THEN '3- 501-1000' WHEN Score BETWEEN 1001 AND 2000 THEN '4- 1001-2000' WHEN Score BETWEEN 2001 AND 5000 THEN '... |
how many roles has this actor had ? | CREATE TABLE table_204_620 (id number,"title" text,"year" number,"language" text,"role" text,"notes" text) | SELECT COUNT("role") FROM table_204_620 |
When 790 am is the frequency what is the format? | CREATE TABLE table_1949746_1 (format VARCHAR,frequency VARCHAR) | SELECT format FROM table_1949746_1 WHERE frequency = "790 AM" |
What is the record when Clippers have the high points? | CREATE TABLE table_name_14 (record VARCHAR,high_points VARCHAR) | SELECT record FROM table_name_14 WHERE high_points = "clippers" |
A bar chart shows the distribution of ACC_Regular_Season and All_Games_Percent , and rank by the Y-axis in descending. | 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_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC |
what is the yearly maximum value of potassium in patient 8098? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8098) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') GROUP BY STRFTIME('%y', labevents.charttime) |
% of bad Minecraft questions. Check on how the sheeple are doing in corrupting the Minecraft tag. Intended to be used in Arqade | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT COUNT(Id) * 100. / (SELECT COUNT(Id) FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%minecraft%') AS Pct FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%minecraft%' AND (NOT ClosedDate IS NULL OR Score < 0) |
how many floors does the tallest building have ? | CREATE TABLE table_204_489 (id number,"rank" number,"name" text,"height" text,"floors" number,"year" number,"notes" text) | SELECT "floors" FROM table_204_489 ORDER BY "floors" DESC LIMIT 1 |
What's the price (in USD) of the model whose L3 is 18 mb? | CREATE TABLE table_12740151_8 (price___usd__ VARCHAR,l3 VARCHAR) | SELECT price___usd__ FROM table_12740151_8 WHERE l3 = "18 MB" |
how much is the maximum hospital cost involving inferior vena cava filter last year? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labnam... | 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 = 'inferior vena cava filter')) AND DATETIME(co... |
What is the smallest preliminary when swimsuit is less than 8.822, interview is more than 8.744 and gown is more than 9.333? | CREATE TABLE table_name_50 (preliminary INTEGER,evening_gown VARCHAR,swimsuit VARCHAR,interview VARCHAR) | SELECT MIN(preliminary) FROM table_name_50 WHERE swimsuit < 8.822 AND interview > 8.744 AND evening_gown > 9.333 |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of headquarter and the sum of price , and group by attribute headquarter, could you order bars in descending order? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC |
How many episodes had the series number of 38? | CREATE TABLE table_19925114_1 (directed_by VARCHAR,no_in_series VARCHAR) | SELECT COUNT(directed_by) FROM table_19925114_1 WHERE no_in_series = 38 |
who wrote the most music for c.v. sridhars movies ? | CREATE TABLE table_203_204 (id number,"year" number,"film" text,"language" text,"actors" text,"music" text,"banner" text,"note" text) | SELECT "music" FROM table_203_204 GROUP BY "music" ORDER BY COUNT(*) DESC LIMIT 1 |
What is the name of the person in the First UK Tour Cast for the Character of Sister Mary Robert? | CREATE TABLE table_name_54 (first_uk_tour_cast VARCHAR,character VARCHAR) | SELECT first_uk_tour_cast FROM table_name_54 WHERE character = "sister mary robert" |
What place did Don Whitt finish? | CREATE TABLE table_44542 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Place" FROM table_44542 WHERE "Player" = 'don whitt' |
What is the an-stem for the word which has an -stems of siangar and an u-stem ending of syni? | CREATE TABLE table_name_18 (masculine_an_stems VARCHAR,feminine_ō_stems VARCHAR,masculine_u_stems VARCHAR) | SELECT masculine_an_stems FROM table_name_18 WHERE feminine_ō_stems = "siangar" AND masculine_u_stems = "syni" |
hematocrit < 36 % ( female ) ; < 38 % ( male ) | CREATE TABLE table_train_217 ("id" int,"gender" string,"c_peptide_level" float,"hemoglobin_a1c_hba1c" float,"hematocrit_hct" float,"insulin_requirement" float,"serum_creatinine" float,"NOUSE" float) | SELECT * FROM table_train_217 WHERE (hematocrit_hct < 36 AND gender = 'female') OR (hematocrit_hct < 38 AND gender = 'male') |
What was the date of the game with a score of 2 1? | CREATE TABLE table_75880 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Date" FROM table_75880 WHERE "Score" = '2–1' |
What is the most number of families in regions where average family size is 2.7? | CREATE TABLE table_16048129_5 (number_of_families INTEGER,average_family_size VARCHAR) | SELECT MAX(number_of_families) FROM table_16048129_5 WHERE average_family_size = "2.7" |
Find the names of the users whose number of followers is greater than that of the user named 'Tyler Swift'. | CREATE TABLE follows (f1 VARCHAR)CREATE TABLE user_profiles (name VARCHAR,uid VARCHAR) | SELECT T1.name FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > (SELECT COUNT(*) FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 WHERE T1.name = 'Tyler Swift') |
Which Opponent has a lost of wells (6-2)? | CREATE TABLE table_70653 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Opponent" FROM table_70653 WHERE "Loss" = 'wells (6-2)' |
Which Bronze has a Gold larger than 1, and a Total larger than 11, and a Silver larger than 5? | CREATE TABLE table_name_36 (bronze INTEGER,silver VARCHAR,gold VARCHAR,total VARCHAR) | SELECT AVG(bronze) FROM table_name_36 WHERE gold > 1 AND total > 11 AND silver > 5 |
What are the invoice dates for customers with the first name Astrid and the last name Gruber, and count them by a bar chart | CREATE TABLE Playlist (PlaylistId integer,Name varchar(120))CREATE TABLE MediaType (MediaTypeId integer,Name varchar(120))CREATE TABLE PlaylistTrack (PlaylistId integer,TrackId integer)CREATE TABLE Customer (CustomerId integer,FirstName varchar(40),LastName varchar(20),Company varchar(80),Address varchar(70),City varch... | SELECT InvoiceDate, COUNT(InvoiceDate) FROM Customer AS T1 JOIN Invoice AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.FirstName = "Astrid" AND LastName = "Gruber" |
Tell me the MPEG-1 for real video of no | CREATE TABLE table_name_77 (mpeg_1 VARCHAR,realvideo VARCHAR) | SELECT mpeg_1 FROM table_name_77 WHERE realvideo = "no" |
How many results are listed for the election where Noah M. Mason was elected? | CREATE TABLE table_18473 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT COUNT("Result") FROM table_18473 WHERE "Incumbent" = 'Noah M. Mason' |
Last Access Date by Age. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number... | WITH AccessedLastWeek AS (SELECT Age, COUNT(1) AS Count FROM Users WHERE Age <= 75 AND LastAccessDate >= DATEADD(day, -7, GETDATE()) GROUP BY Age), AccessedLastMonth AS (SELECT Age, COUNT(1) AS Count FROM Users WHERE Age <= 75 AND LastAccessDate >= DATEADD(day, -30, GETDATE()) GROUP BY Age), AllUsers AS (SELECT Age, CO... |
Bounties: on own questions vs. others' questions. | 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 Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Pos... | SELECT SUM(CASE v.UserId WHEN p.OwnerUserId THEN 1 ELSE 0 END) AS "Own", 100 * SUM(CASE v.UserId WHEN p.OwnerUserId THEN 1 ELSE 0 END) / COUNT(*) AS "%", SUM(CASE v.UserId WHEN p.OwnerUserId THEN 0 ELSE 1 END) AS "Other", 100 * SUM(CASE v.UserId WHEN p.OwnerUserId THEN 0 ELSE 1 END) / COUNT(*) AS "%" FROM Votes AS v IN... |
which two players tied for first place ? | CREATE TABLE table_203_864 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number,"money ($)" number) | SELECT "player" FROM table_203_864 WHERE "place" = 1 |
Which score has an Attendance larger than 16,571, and a Loss of mcdowell (0-1)? | CREATE TABLE table_72048 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Score" FROM table_72048 WHERE "Attendance" > '16,571' AND "Loss" = 'mcdowell (0-1)' |
what is the number of patients whose diagnoses long title is other alteration of consciousness and lab test fluid is blood? | 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 te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Other alteration of consciousness" AND lab.fluid = "Blood" |
What is the Highest Goals for Grella? | CREATE TABLE table_59299 ("Nat." text,"Name" text,"Since" text,"Goals" real,"Transfer fee" text,"Notes" text) | SELECT MAX("Goals") FROM table_59299 WHERE "Name" = 'grella' |
Who was the opponent when the attendance was exactly 16642? | CREATE TABLE table_20745685_1 (opponent VARCHAR,attendance VARCHAR) | SELECT opponent FROM table_20745685_1 WHERE attendance = 16642 |
What is the total weight in Tulsa, Oklahoma? | CREATE TABLE table_5261 ("Name" text,"Number" real,"Position" text,"Weight*" real,"Year" text,"Hometown" text) | SELECT SUM("Weight*") FROM table_5261 WHERE "Hometown" = 'tulsa, oklahoma' |
Which airport has SEB as its IATA code? | CREATE TABLE table_name_86 (airport VARCHAR,iata VARCHAR) | SELECT airport FROM table_name_86 WHERE iata = "seb" |
Are there any that have not taught CAAS 202 ? | 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 area (course_id int,area varchar)CREATE TABLE program_course (program_id int,course_id int,workload in... | SELECT DISTINCT name FROM instructor WHERE NOT name IN (SELECT INSTRUCTORalias1.name FROM course AS COURSEalias0 INNER JOIN course_offering AS COURSE_OFFERINGalias0 ON COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id INNER JOIN offering_instructor AS OFFERING_INSTRUCTOR ON OFFERING_OFFERING_ID = COURSE_OFFERING... |
Where is the location where Scott Junk was the opponent? | CREATE TABLE table_45067 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text,"Time" text,"Location" text) | SELECT "Location" FROM table_45067 WHERE "Opponent" = 'scott junk' |
who is the coach where dudley tuckey medal is ben howlett | CREATE TABLE table_1165048_1 (coach VARCHAR,dudley_tuckey_medal VARCHAR) | SELECT coach FROM table_1165048_1 WHERE dudley_tuckey_medal = "Ben Howlett" |
What construction has a CERCLIS ID of ard092916188? | CREATE TABLE table_name_1 (construction_completed VARCHAR,cerclis_id VARCHAR) | SELECT construction_completed FROM table_name_1 WHERE cerclis_id = "ard092916188" |
Which ministers are not a part of the Progress Party, and count them by a bar chart, list by the Minister from low to high. | CREATE TABLE party (Party_ID int,Minister text,Took_office text,Left_office text,Region_ID int,Party_name text)CREATE TABLE party_events (Event_ID int,Event_Name text,Party_ID int,Member_in_charge_ID int)CREATE TABLE region (Region_ID int,Region_name text,Date text,Label text,Format text,Catalogue text)CREATE TABLE mem... | SELECT Minister, COUNT(Minister) FROM party WHERE Party_name <> 'Progress Party' GROUP BY Minister ORDER BY Minister |
What was the weight of the jockey at Sandown Park? | CREATE TABLE table_24850630_4 (weight VARCHAR,venue VARCHAR) | SELECT weight FROM table_24850630_4 WHERE venue = "Sandown Park" |
Between ARABIC 202 and ARABIC 401 , how are they different ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category 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... | SELECT DISTINCT department, description, number FROM course WHERE (department = 'ARABIC' AND number = 401) OR (department = 'ARABIC' AND number = 202) |
What college team did Ryan Golden come from? | CREATE TABLE table_29996 ("Pick" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "College/junior/club team" FROM table_29996 WHERE "Player" = 'Ryan Golden' |
since 2105 what are the four most common specimen test given to patients in the same month after being diagnosed with candidias urogenital nec? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREAT... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 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_... |
what is procedure long title of procedure icd9 code 5187? | 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 procedures.long_title FROM procedures WHERE procedures.icd9_code = "5187" |
What was the date of the game with 6 goals? | CREATE TABLE table_41354 ("Goal" real,"Date" text,"Venue" text,"Result" text,"Competition" text) | SELECT "Date" FROM table_41354 WHERE "Goal" = '6' |
What was the away team score at the game held on 17 August 1935? | CREATE TABLE table_10142 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_10142 WHERE "Date" = '17 august 1935' |
Which Surname has Bats of r, and a Position of p, and a DOB of 20 may 1989? | CREATE TABLE table_name_73 (surname VARCHAR,dob VARCHAR,bats VARCHAR,position VARCHAR) | SELECT surname FROM table_name_73 WHERE bats = "r" AND position = "p" AND dob = "20 may 1989" |
Which championship had a final score of 6 4, 2 6, 6 4, 7 6(3)? | CREATE TABLE table_26209 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponents in the final" text,"Score in the final" text) | SELECT "Championship" FROM table_26209 WHERE "Score in the final" = '6–4, 2–6, 6–4, 7–6(3)' |
When the ime exchange (including spot, credit and forward transactions) is agricultural - value (billion rials ) what is 2010/11? | CREATE TABLE table_30618 ("IME Exchange (Including spot,credit and forward transactions)" text,"2007/08" text,"2008/09" text,"2009/10" text,"2010/11" text) | SELECT "2010/11" FROM table_30618 WHERE "IME Exchange (Including spot, credit and forward transactions)" = 'Agricultural - Value (billion rials )' |
What was Dick Rathmann's Finish the year he Qualed at 130.928? | CREATE TABLE table_name_35 (finish VARCHAR,qual VARCHAR) | SELECT finish FROM table_name_35 WHERE qual = "130.928" |
look for discharge time of patient bryant johnson. | 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,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT demographic.dischtime FROM demographic WHERE demographic.name = "Bryant Johnson" |
How many points has more than 15 wins and less than 10 losses? | CREATE TABLE table_14831 ("Position" real,"Club" text,"Played" real,"Points" text,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real) | SELECT "Points" FROM table_14831 WHERE "Wins" > '15' AND "Losses" < '10' |
Which Tuesday Tiw/Tyr has a Sunday Sunna/Sol of sondag? | CREATE TABLE table_66877 ("Sunday Sunna/S\u00f3l" text,"Monday Mona/ M\u00e1ni" text,"Tuesday Tiw/ Tyr" text,"Wednesday Woden / Odin" text,"Thursday Thunor / Thor" text,"Friday Frige or Freya" text,"Saturday Saturn" text) | SELECT "Tuesday Tiw/ Tyr" FROM table_66877 WHERE "Sunday Sunna/S\u00f3l" = 'sondag' |
For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id. | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUM... | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID |
In the 6th round match with home team Bahia, who was the away team? | CREATE TABLE table_name_96 (away_team VARCHAR,round VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_96 WHERE round = "6th" AND home_team = "bahia" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.