instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What type of state was Lu, when Yi was the ruler from the royal house of Ji? | CREATE TABLE table_name_39 (type VARCHAR,state VARCHAR,royal_house VARCHAR,name VARCHAR) | SELECT type FROM table_name_39 WHERE royal_house = "ji" AND name = "yi" AND state = "lu" |
What are the first names of all students who live in the dorm with the most amenities? | CREATE TABLE dorm (dormid number,dorm_name text,student_capacity number,gender text)CREATE TABLE has_amenity (dormid number,amenid number)CREATE TABLE lives_in (stuid number,dormid number,room_number number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_cod... | SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid IN (SELECT T2.dormid FROM dorm AS T3 JOIN has_amenity AS T4 ON T3.dormid = T4.dormid JOIN dorm_amenity AS T5 ON T4.amenid = T5.amenid GROUP BY T3.dormid ORDER BY COUNT(*) DESC LIMIT 1) |
Month wise number of answers by User. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,... | SELECT DATENAME(month, DATEADD(month, MONTH(CreationDate), -1)) AS "month", YEAR(CreationDate) AS "year", COUNT(Id) AS Answers FROM Posts WHERE OwnerUserId = '##UserId##' AND PostTypeId = 2 GROUP BY MONTH(CreationDate), YEAR(CreationDate) ORDER BY YEAR(CreationDate), MONTH(CreationDate) |
Who was the opponents of the 5th Wicket Partnership? | CREATE TABLE table_name_3 (opponents VARCHAR,wicket_partnership VARCHAR) | SELECT opponents FROM table_name_3 WHERE wicket_partnership = "5th" |
What is the call sign for country station fm 93.1? | CREATE TABLE table_name_34 (call_sign VARCHAR,format VARCHAR,frequency VARCHAR) | SELECT call_sign FROM table_name_34 WHERE format = "country" AND frequency = "fm 93.1" |
How many wins did the Northwestern Wildcats? | CREATE TABLE table_1672976_2 (wins INTEGER,institution VARCHAR) | SELECT MAX(wins) FROM table_1672976_2 WHERE institution = "Northwestern Wildcats" |
Which goals/game ratio has fewer than 201 goals and fewer than 170 appearances? | CREATE TABLE table_name_29 (goals VARCHAR,Game VARCHAR,appearances VARCHAR) | SELECT goals / Game AS Ratio FROM table_name_29 WHERE goals < 201 AND appearances < 170 |
Who was the opponent at the game with a result of w 14 6? | CREATE TABLE table_name_60 (opponent VARCHAR,result VARCHAR) | SELECT opponent FROM table_name_60 WHERE result = "w 14–6" |
What is the year when kurtis kraft 500f was the chassis? | CREATE TABLE table_name_46 (year INTEGER,chassis VARCHAR) | SELECT SUM(year) FROM table_name_46 WHERE chassis = "kurtis kraft 500f" |
provide the number of patients whose diagnoses short title is malig neo ascend colon? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Malig neo ascend colon" |
what is the number of patients whose insurance is private and treated with procedure icd9 code 8848? | 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "8848" |
Where was the film about the garden of the finzi-continis made? | CREATE TABLE table_name_30 (country VARCHAR,film_title_used_in_nomination VARCHAR) | SELECT country FROM table_name_30 WHERE film_title_used_in_nomination = "the garden of the finzi-continis" |
what were the five medicines most frequently prescribed since 2102? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature n... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE STRFTIME('%y', medication.drugstarttime) >= '2102' GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 5 |
Out of total number of patients admitted before the year 2150, how many of them had hemodialysis? | 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 text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2150" AND procedures.long_title = "Hemodialysis" |
Name Tonnage on 27 september 1941 and a Ship of hmsspringbank? | CREATE TABLE table_name_81 (tonnage VARCHAR,date VARCHAR,ship VARCHAR) | SELECT tonnage FROM table_name_81 WHERE date = "27 september 1941" AND ship = "hmsspringbank" |
what's the ungegn for the khmer? | CREATE TABLE table_68277 ("Value" text,"Khmer" text,"Word form" text,"UNGEGN" text,"ALA-LC" text,"Notes" text) | SELECT "UNGEGN" FROM table_68277 WHERE "Khmer" = '១០០' |
Give the name of each department and the number of employees in each in a bar chart. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE departments (D... | SELECT DEPARTMENT_NAME, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY T2.DEPARTMENT_NAME |
Which nominee was nominated in the Outstanding Director of a Musical category? | CREATE TABLE table_40295 ("Year" real,"Award" text,"Category" text,"Nominee" text,"Result" text) | SELECT "Nominee" FROM table_40295 WHERE "Category" = 'outstanding director of a musical' |
Name the un region for 3314000 population | CREATE TABLE table_20649 ("Province" text,"Map #" real,"ISO 3166-2:AF" text,"Centers" text,"Population" real,"Area (km\u00b2)" real,"Language" text,"Notes" text,"U.N. Region" text) | SELECT "U.N. Region" FROM table_20649 WHERE "Population" = '3314000' |
What were the Opponents of the team, that made it to the third round, before 2008? | CREATE TABLE table_name_95 (opponents VARCHAR,year VARCHAR,progress VARCHAR) | SELECT opponents FROM table_name_95 WHERE year < 2008 AND progress = "third round" |
Please give me a bar chart for the total enrollment in each county, and order by the sum enrollment in desc. | CREATE TABLE endowment (endowment_id int,School_id int,donator_name text,amount real)CREATE TABLE School (School_id text,School_name text,Location text,Mascot text,Enrollment int,IHSAA_Class text,IHSAA_Football_Class text,County text)CREATE TABLE budget (School_id int,Year int,Budgeted int,total_budget_percent_budgeted... | SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY SUM(Enrollment) DESC |
For each course id, how many students are registered and what are the course names? | CREATE TABLE courses (course_id text,course_name text,course_description text,other_details text)CREATE TABLE student_course_attendance (student_id number,course_id number,date_of_attendance time)CREATE TABLE people (person_id number,first_name text,middle_name text,last_name text,cell_mobile_number text,email_address ... | SELECT T3.course_name, COUNT(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id JOIN courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id |
how many average scores were below 8.700 ? | CREATE TABLE table_204_757 (id number,"state" text,"interview" number,"swimsuit" number,"evening gown" number,"average" number) | SELECT COUNT(*) FROM table_204_757 WHERE "average" < 8.700 |
Which year has has a Engine of maserati straight-6? | CREATE TABLE table_name_31 (year VARCHAR,engine VARCHAR) | SELECT COUNT(year) FROM table_name_31 WHERE engine = "maserati straight-6" |
which country came in first place ? | CREATE TABLE table_203_600 (id number,"rank" text,"country" text,"winners" number,"runners-up" number,"finals total" number) | SELECT "country" FROM table_203_600 WHERE "rank" = 1 |
When Cementarnica is team 2 what is the aggregate score? | CREATE TABLE table_12121 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text) | SELECT "Agg." FROM table_12121 WHERE "Team 2" = 'cementarnica' |
What is the indoor track status for the school that has yes for tennis and no for golf? | CREATE TABLE table_name_91 (indoor_track VARCHAR,tennis VARCHAR,golf VARCHAR) | SELECT indoor_track FROM table_name_91 WHERE tennis = "yes" AND golf = "no" |
Visualize a bar chart for what are total transaction amounts for each transaction type?, rank by the y-axis in descending. | CREATE TABLE Invoice_Line_Items (order_item_id INTEGER,invoice_number INTEGER,product_id INTEGER,product_title VARCHAR(80),product_quantity VARCHAR(50),product_price DECIMAL(19,4),derived_product_cost DECIMAL(19,4),derived_vat_payable DECIMAL(19,4),derived_total_cost DECIMAL(19,4))CREATE TABLE Orders (order_id INTEGER,... | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type ORDER BY SUM(transaction_amount) DESC |
provide the number of patients whose marital status is married and diagnoses long title is acute on chronic diastolic heart failure? | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.long_title = "Acute on chronic diastolic heart failure" |
Which lap has more than 17 grids with tetsuya harada? | CREATE TABLE table_46105 ("Rider" text,"Manufacturer" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT "Laps" FROM table_46105 WHERE "Grid" > '17' AND "Rider" = 'tetsuya harada' |
Which district has an IUCN of iii and was established in 1998? | CREATE TABLE table_46797 ("Reserve" text,"District" text,"IUCN" text,"Co-management" text,"Est." real,"Description" text) | SELECT "District" FROM table_46797 WHERE "IUCN" = 'iii' AND "Est." = '1998' |
In Round 10, what was the Overall for Ed Tomlin? | CREATE TABLE table_name_45 (overall INTEGER,round VARCHAR,name VARCHAR) | SELECT AVG(overall) FROM table_name_45 WHERE round = 10 AND name = "ed tomlin" |
Which Home team has a Year of 2002/03, and a Venue of tahnoun bin mohamed stadium? | CREATE TABLE table_name_35 (home_team VARCHAR,year VARCHAR,venue VARCHAR) | SELECT home_team FROM table_name_35 WHERE year = "2002/03" AND venue = "tahnoun bin mohamed stadium" |
count the number of patients whose lab test name is rbc, joint fluid? | 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,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "RBC, Joint Fluid" |
Who was the opponent before week 8 when the result was l 28-17? | CREATE TABLE table_51002 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT "Opponent" FROM table_51002 WHERE "Week" < '8' AND "Result" = 'l 28-17' |
When goals scored is more than 18, draw is less than 4, and goals conceded is more than 24, what is the sum of played? | CREATE TABLE table_name_33 (played VARCHAR,goals_conceded VARCHAR,goals_scored VARCHAR,draw VARCHAR) | SELECT COUNT(played) FROM table_name_33 WHERE goals_scored > 18 AND draw < 4 AND goals_conceded > 24 |
Find the number of the dates of assessment notes for students with first name 'Fanny', and display total number from high to low order. | CREATE TABLE Ref_Address_Types (address_type_code VARCHAR(15),address_type_description VARCHAR(80))CREATE TABLE Assessment_Notes (notes_id INTEGER,student_id INTEGER,teacher_id INTEGER,date_of_notes DATETIME,text_of_notes VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Student_Addresses (student_id INTEGER,address... | SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny" ORDER BY COUNT(date_of_notes) DESC |
What number truck is owned by Stephen Germain? | CREATE TABLE table_19908313_2 (_number VARCHAR,listed_owner_s_ VARCHAR) | SELECT _number FROM table_19908313_2 WHERE listed_owner_s_ = "Stephen Germain" |
Which 5 UTR splice has a Variant ID at sftpa1 variant 2? | CREATE TABLE table_name_46 (variant_id VARCHAR) | SELECT 5 AS ’utr_splice FROM table_name_46 WHERE variant_id = "sftpa1 variant 2" |
How many games did they play on january 7? | CREATE TABLE table_27734286_7 (high_points VARCHAR,date VARCHAR) | SELECT COUNT(high_points) FROM table_27734286_7 WHERE date = "January 7" |
What june 21 22, 2011 polling has green smaller than 13? | CREATE TABLE table_name_89 (polling_firm VARCHAR,green VARCHAR,date_of_polling VARCHAR) | SELECT polling_firm FROM table_name_89 WHERE green < 13 AND date_of_polling = "june 21–22, 2011" |
What is the sum of the number of regular games played by Morgan Clark with the number of road games less than 7? | CREATE TABLE table_56169 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real) | SELECT SUM("Reg GP") FROM table_56169 WHERE "Player" = 'morgan clark' AND "Rd #" < '7' |
Which away team played against Peterborough United, with a tie no of replay? | CREATE TABLE table_name_85 (away_team VARCHAR,tie_no VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_85 WHERE tie_no = "replay" AND home_team = "peterborough united" |
What is the total number of bronze medals when the silver is greater than 0, and the total medals 5? | CREATE TABLE table_name_14 (bronze INTEGER,silver VARCHAR,total VARCHAR) | SELECT SUM(bronze) FROM table_name_14 WHERE silver > 0 AND total = 5 |
How many patients of american indian/alaska native ethnicity are diagnosed with unspecified erythematous condition? | 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 text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND diagnoses.long_title = "Unspecified erythematous condition" |
what was the top position an album reached on either chart ? | CREATE TABLE table_203_137 (id number,"title" text,"album details" text,"peak chart positions\nus" number,"peak chart positions\nus r&b" number,"certifications" text) | SELECT MIN(MIN("peak chart positions\nus"), MIN("peak chart positions\nus r&b")) FROM table_203_137 |
From all the WRITING upper-level classes , which ones are being provided this Spring-Summer ? | CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction ... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'WRITING' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Spr... |
count the number of patients whose ethnicity is black/haitian and procedure short title is dx ultrasound-heart? | 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND procedures.short_title = "Dx ultrasound-heart" |
Gini coefficient for number of posts. | 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 PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseR... | WITH a AS (SELECT COUNT(Id) AS n_posts, OwnerUserId FROM Posts WHERE PostTypeId = 2 AND TIME_TO_STR(CreationDate, '%Y') = 2019 GROUP BY OwnerUserId, TIME_TO_STR(CreationDate, '%m')), b AS (SELECT COUNT(n_posts) OVER (ORDER BY n_posts + 0.000000001 * OwnerUserId DESC) AS users_quantile, SUM(n_posts) OVER (ORDER BY n_pos... |
How many values of hosted have a highest value of 42659? | CREATE TABLE table_2472711_32 (hosted VARCHAR,highest VARCHAR) | SELECT COUNT(hosted) FROM table_2472711_32 WHERE highest = 42659 |
Is there any section between 11:00 and 6:00 for ASIANPAM 310 ? | 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 course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '6:00' AND course_offering.start_time >= '11:00' AND course.course_id = course_offering.course_id AND course.department = 'ASIANPAM' AND course.nu... |
Who was the arranger for the song that had a lyricist of Sirapatara Kalayapanid? | CREATE TABLE table_76991 ("Title" text,"Lyricist(s)" text,"Composer(s)" text,"Arranger(s)" text,"Length" text) | SELECT "Arranger(s)" FROM table_76991 WHERE "Lyricist(s)" = 'sirapatara kalayapanid' |
how many schools exist in total? | CREATE TABLE department (dept_code text,dept_name text,school_code text,emp_num number,dept_address text,dept_extension text)CREATE TABLE class (class_code text,crs_code text,class_section text,class_time text,class_room text,prof_num number)CREATE TABLE student (stu_num number,stu_lname text,stu_fname text,stu_init te... | SELECT COUNT(DISTINCT school_code) FROM department |
what was the name of the lab test patient 18316 last had since 147 months ago? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id ... | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT labevents.itemid FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18316) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-147 month') ORDER BY labevents.charttime D... |
Name the index weighting % for 17 januaary 2013 for rno | CREATE TABLE table_168274_1 (index_weighting___percentage__at_17_january_2013 VARCHAR,ticker_symbol VARCHAR) | SELECT index_weighting___percentage__at_17_january_2013 FROM table_168274_1 WHERE ticker_symbol = "RNO" |
For small patent type of protections, what type of PCT route is available? | CREATE TABLE table_2279413_1 (pct_route_available VARCHAR,type_of_protection VARCHAR) | SELECT pct_route_available FROM table_2279413_1 WHERE type_of_protection = "small patent" |
what is the total number of teams in team 1 column ? | CREATE TABLE table_204_324 (id number,"team 1" text,"agg." text,"team 2" text,"1st leg" text,"2nd leg" text) | SELECT COUNT("team 1") FROM table_204_324 |
provide the number of patients whose religion is protestant quaker and lab test name is methemoglobin? | 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND lab.label = "Methemoglobin" |
How many top 10s belong to the team with a start of 7 and an average finish less than 16.7? | CREATE TABLE table_77432 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" real,"Avg. Finish" real,"Winnings" text,"Position" text,"Team(s)" text) | SELECT COUNT("Top 10") FROM table_77432 WHERE "Starts" = '7' AND "Avg. Finish" < '16.7' |
What player placed t10? | CREATE TABLE table_name_17 (player VARCHAR,place VARCHAR) | SELECT player FROM table_name_17 WHERE place = "t10" |
What is the largest number for earnings for tom watson when ranked more than 2? | CREATE TABLE table_37717 ("Rank" real,"Player" text,"Country" text,"Earnings ($)" real,"Wins" real) | SELECT MAX("Earnings ( $ )") FROM table_37717 WHERE "Player" = 'tom watson' AND "Rank" > '2' |
What numbr on the list had a peak rating of 42? | CREATE TABLE table_11926114_1 (rank INTEGER,peak VARCHAR) | SELECT MIN(rank) FROM table_11926114_1 WHERE peak = 42 |
Who won the Men's Doubles when Karina de Wit won the Women's Singles? | CREATE TABLE table_12164707_1 (mens_doubles VARCHAR,womens_singles VARCHAR) | SELECT mens_doubles FROM table_12164707_1 WHERE womens_singles = "Karina de Wit" |
How many bookings did each customer make? List the first name as the X-axis, and the count as the Y-axis in the bar chart, could you order by the total number in descending please? | CREATE TABLE Products_Booked (booking_id INTEGER,product_id INTEGER,returned_yn VARCHAR(1),returned_late_yn VARCHAR(1),booked_count INTEGER,booked_amount FLOAT)CREATE TABLE Customers (customer_id INTEGER,coupon_id INTEGER,good_or_bad_customer VARCHAR(4),first_name VARCHAR(80),last_name VARCHAR(80),gender_mf VARCHAR(1),... | SELECT first_name, COUNT(*) FROM Customers AS T1 JOIN Bookings AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC |
Where did the song by Michael Ball, which placed 2nd in Eurovision prior to 1961, place on the UK charts? | CREATE TABLE table_65326 ("Year" real,"Artist" text,"Song" text,"UK Chart" text,"At Eurovision" text) | SELECT "UK Chart" FROM table_65326 WHERE "Year" > '1961' AND "At Eurovision" = '2nd' AND "Artist" = 'michael ball' |
What is the number of silver when the total is less than 1? | CREATE TABLE table_64129 ("Rank" real,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Silver") FROM table_64129 WHERE "Total" < '1' |
What is the release date of the album written by Ford, Phil Phil Ford under BBC Audio? | CREATE TABLE table_48635 ("Title" text,"Writer" text,"Format" text,"Company" text,"release date" text) | SELECT "release date" FROM table_48635 WHERE "Company" = 'bbc audio' AND "Writer" = 'ford, phil phil ford' |
How many participants belong to the type 'Organizer'? | CREATE TABLE events (event_id number,service_id number,event_details text)CREATE TABLE participants_in_events (event_id number,participant_id number)CREATE TABLE services (service_id number,service_type_code text)CREATE TABLE participants (participant_id number,participant_type_code text,participant_details text) | SELECT COUNT(*) FROM participants WHERE participant_type_code = 'Organizer' |
How many were in attendance for the loss of rekar (4 5)? | CREATE TABLE table_10404 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT SUM("Attendance") FROM table_10404 WHERE "Loss" = 'rekar (4–5)' |
What ride was manufactured by Zierer? | CREATE TABLE table_79903 ("Ride name" text,"Type" text,"Opened in" real,"Themed land" text,"Manufacturer" text) | SELECT "Ride name" FROM table_79903 WHERE "Manufacturer" = 'zierer' |
How many players has the highest points in the game against the Heat? | CREATE TABLE table_23285849_6 (high_points VARCHAR,team VARCHAR) | SELECT COUNT(high_points) FROM table_23285849_6 WHERE team = "Heat" |
What is the Status of Mexborough? | CREATE TABLE table_name_83 (status VARCHAR,name VARCHAR) | SELECT status FROM table_name_83 WHERE name = "mexborough" |
give me a list of flights between DENVER and OAKLAND | CREATE TABLE month (month_number int,month_name text)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND... |
what score was on february 21 | CREATE TABLE table_34877 ("Game" real,"February" real,"Opponent" text,"Score" text,"Record" text,"Points" real) | SELECT "Score" FROM table_34877 WHERE "February" = '21' |
What is the Score when Set 2 shows 25-20, and a Total of 75 - 49? | CREATE TABLE table_name_27 (score VARCHAR,set_2 VARCHAR,total VARCHAR) | SELECT score FROM table_name_27 WHERE set_2 = "25-20" AND total = "75 - 49" |
Which date had less than 3 goals and a result of (w) 2-0? | CREATE TABLE table_name_23 (date VARCHAR,goals VARCHAR,result VARCHAR) | SELECT date FROM table_name_23 WHERE goals < 3 AND result = "(w) 2-0" |
Which decile features Mayfield School? | CREATE TABLE table_11938 ("Name" text,"Years" text,"Gender" text,"Area" text,"Authority" text,"Decile" real,"Roll" real) | SELECT "Decile" FROM table_11938 WHERE "Name" = 'mayfield school' |
What was the attendance on November 3, 1968, that was a week smaller than 8? | CREATE TABLE table_10860 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT COUNT("Attendance") FROM table_10860 WHERE "Date" = 'november 3, 1968' AND "Week" < '8' |
What is the title in Canada? | CREATE TABLE table_29487895_2 (title_in_country VARCHAR,country___region VARCHAR) | SELECT title_in_country FROM table_29487895_2 WHERE country___region = "Canada" |
what are the u.s. air dates with a Canadian air date of may 4, 2009 | CREATE TABLE table_487 ("Season #" real,"Series #" real,"Title" text,"Canadian airdate" text,"U.S. airdate" text,"Production code" real) | SELECT "U.S. airdate" FROM table_487 WHERE "Canadian airdate" = 'May 4, 2009' |
what is the minimum total cost of the hospital which include hemogloblin s in this year? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hemogloblin s')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of ... |
What was his record when he went over 1 round? | CREATE TABLE table_6119 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Record" FROM table_6119 WHERE "Round" > '1' |
How many 2007s have 0.2 as a 2006, with a 2010 less than 0.1? | CREATE TABLE table_name_71 (Id VARCHAR) | SELECT SUM(2007) FROM table_name_71 WHERE 2006 = 0.2 AND 2010 < 0.1 |
What is the first locomotive that has a SLM number lower than 924? | CREATE TABLE table_41775 ("Built" real,"Number" real,"Type" text,"SLM Number" real,"Wheel arrangement" text,"Location" text,"Notes" text) | SELECT MIN("Number") FROM table_41775 WHERE "SLM Number" < '924' |
Name the game for l 111 126 | CREATE TABLE table_31448 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Game" FROM table_31448 WHERE "Score" = 'L 111–126' |
Which Draw has a Performer of jenny newman, and Points smaller than 77? | CREATE TABLE table_43725 ("Draw" real,"Song" text,"Performer" text,"Points" real,"Rank" text) | SELECT AVG("Draw") FROM table_43725 WHERE "Performer" = 'jenny newman' AND "Points" < '77' |
For those records from the products and each product's manufacturer, show me about the distribution of founder and the sum of manufacturer , and group by attribute founder in a bar chart, show by the bars from low to high please. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Founder, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder |
What is the displacement of the engine that has a Redline rpm higher than 4750, from 2005? | CREATE TABLE table_name_29 (displacement VARCHAR,redline__rpm_ VARCHAR,year VARCHAR) | SELECT displacement FROM table_name_29 WHERE redline__rpm_ > 4750 AND year = 2005 |
What was the first week that had a transition with Pat Mccready? | CREATE TABLE table_name_6 (week INTEGER,transition VARCHAR) | SELECT MIN(week) FROM table_name_6 WHERE transition = "pat mccready" |
what was the first height of patient 3242 on their first hospital encounter. | 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 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,inti... | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3242 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.item... |
what was the first value of respiration patient 030-80604 had on the last intensive care unit visit. | 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,disch... | SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-80604') AND NOT patient.unitdischargetime IS NULL O... |
What is the year when kurtis kraft 500f was the chassis? | CREATE TABLE table_70434 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT SUM("Year") FROM table_70434 WHERE "Chassis" = 'kurtis kraft 500f' |
What is the name of the youngest captain? | 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) | SELECT name FROM captain ORDER BY age LIMIT 1 |
What party does Bill McCollum belong to? | CREATE TABLE table_1341453_11 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_1341453_11 WHERE incumbent = "Bill McCollum" |
body mass index ( bmi ) < 30 kg / m2 | CREATE TABLE table_train_280 ("id" int,"fpg" float,"hemoglobin_a1c_hba1c" float,"heart_disease" bool,"renal_disease" bool,"hba1c" float,"body_mass_index_bmi" float,"NOUSE" float) | SELECT * FROM table_train_280 WHERE body_mass_index_bmi < 30 |
What are the name and primarily affiliated department name of each physician?, and I want to display in ascending by the x-axis please. | CREATE TABLE Undergoes (Patient INTEGER,Procedures INTEGER,Stay INTEGER,DateUndergoes DATETIME,Physician INTEGER,AssistingNurse INTEGER)CREATE TABLE Appointment (AppointmentID INTEGER,Patient INTEGER,PrepNurse INTEGER,Physician INTEGER,Start DATETIME,End DATETIME,ExaminationRoom TEXT)CREATE TABLE Patient (SSN INTEGER,N... | SELECT T3.Name, COUNT(T3.Name) FROM Physician AS T1 JOIN Affiliated_With AS T2 ON T1.EmployeeID = T2.Physician JOIN Department AS T3 ON T2.Department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1 GROUP BY T3.Name ORDER BY T3.Name |
Which Height Metres / feet has a Rank of 8, and Floors of 3x17? | CREATE TABLE table_74823 ("Rank" real,"Name" text,"Location" text,"Height Metres / feet" text,"Floors" text) | SELECT "Height Metres / feet" FROM table_74823 WHERE "Rank" = '8' AND "Floors" = '3x17' |
How fast does the BMW with 6 points go? | CREATE TABLE table_41373 ("Place" real,"Rider" text,"Country" text,"Machine" text,"Speed" text,"Time" text,"Points" real) | SELECT "Speed" FROM table_41373 WHERE "Machine" = 'bmw' AND "Points" = '6' |
What is the largest number of points for Orion with more than 4 losses? | CREATE TABLE table_7295 ("Place (Posici\u00f3n)" real,"Team (Equipo)" text,"Played (PJ)" real,"Won (PG)" real,"Draw (PE)" real,"Lost (PP)" real,"Goals Scored (GF)" real,"Goals Conceded (GC)" real,"+/- (Dif.)" real,"Points (Pts.)" real) | SELECT MAX("Points (Pts.)") FROM table_7295 WHERE "Team (Equipo)" = 'orion' AND "Lost (PP)" > '4' |
For the group with 1.79% population in 1961, what was their percentage of the population in 1971? | CREATE TABLE table_4506 ("Religious group" text,"Population % 1961" text,"Population % 1971" text,"Population % 1981" text,"Population % 1991" text,"Population % 2001" text) | SELECT "Population % 1971" FROM table_4506 WHERE "Population % 1961" = '1.79%' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.