instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Which metal has a size that is 26mm (across scallops)?
CREATE TABLE table_name_56 (metal VARCHAR,size VARCHAR)
SELECT metal FROM table_name_56 WHERE size = "26mm (across scallops)"
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of headquarter and the amount of headquarter , and group by attribute headquarter, display by the X 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 Headquarter, COUNT(Headquarter) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter
What episode in the season was directed by Jeff Melman?
CREATE TABLE table_16439 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text)
SELECT MIN("No. in season") FROM table_16439 WHERE "Directed by" = 'Jeff Melman'
Bar chart x axis duration y axis how many duration, I want to sort in desc by the bar please.
CREATE TABLE actor (Actor_ID int,Name text,Musical_ID int,Character text,Duration text,age int)CREATE TABLE musical (Musical_ID int,Name text,Year int,Award text,Category text,Nominee text,Result text)
SELECT Duration, COUNT(Duration) FROM actor GROUP BY Duration ORDER BY Duration DESC
What was the loss of the game when the record was 14 8?
CREATE TABLE table_67317 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Time" text,"Att." text,"Record" text)
SELECT "Loss" FROM table_67317 WHERE "Record" = '14–8'
Calculate the minimum days for which patients aged 89 years or more stay in hospital.
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.age >= "89"
What's the writer of Episode 1?
CREATE TABLE table_12919003_3 (writer VARCHAR,episode VARCHAR)
SELECT writer FROM table_12919003_3 WHERE episode = "episode 1"
Who was the home team that played against hawthorn?
CREATE TABLE table_57632 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team" FROM table_57632 WHERE "Away team" = 'hawthorn'
How many wins did the club have with the last win in 2000?
CREATE TABLE table_56539 ("Club" text,"Wins" text,"Last win" text,"Runners-up" text,"Last final lost" text)
SELECT "Wins" FROM table_56539 WHERE "Last win" = '2000'
If the province is Manitoba, what is the Arabs 2001 number?
CREATE TABLE table_1939367_1 (arabs_2001 INTEGER,province VARCHAR)
SELECT MAX(arabs_2001) FROM table_1939367_1 WHERE province = "Manitoba"
What was the away team that played at Princes Park?
CREATE TABLE table_name_17 (away_team VARCHAR,venue VARCHAR)
SELECT away_team FROM table_name_17 WHERE venue = "princes park"
How many patients born in or before 2111 are tested for cerebrospinal fluid?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
what stops does DL 838 make from SAN FRANCISCO to ATLANTA
CREATE TABLE code_description (code varchar,description text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts ...
SELECT DISTINCT flight_stop.stop_airport FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight, flight_stop WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.flight_number = 838 AND flight.to_airport = AIR...
what was the release date of the first single ?
CREATE TABLE table_203_545 (id number,"single/ep" text,"release date" text,"label" text,"format(s)" text,"uk singles chart position" number,"notes" text)
SELECT "release date" FROM table_203_545 ORDER BY "release date" LIMIT 1
What city is Gwang-Yang stadium in?
CREATE TABLE table_46225 ("Club" text,"Head Coach" text,"City" text,"Stadium" text,"2007 season" text)
SELECT "City" FROM table_46225 WHERE "Stadium" = 'gwang-yang stadium'
what is the difference in mchc value in patient 005-87465 second measured on the current hospital visit compared to the first value measured on the current hospital visit?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,...
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'mchc'...
What was the week 14 opponent for the year with a week 10 opponent of Michigan State (8-2)?
CREATE TABLE table_name_50 (week_14_nov_30 VARCHAR,week_10_nov_2 VARCHAR)
SELECT week_14_nov_30 FROM table_name_50 WHERE week_10_nov_2 = "michigan state (8-2)"
Who is the main presenter of the series Twelve (2012)?
CREATE TABLE table_14345690_15 (main_presenter VARCHAR,series VARCHAR)
SELECT main_presenter FROM table_14345690_15 WHERE series = "Twelve (2012)"
What is the original airdate of the episode where the challenge is a '7-pound monster breakfast burrito'?
CREATE TABLE table_3128 ("Episode Number" real,"Location" text,"Original Airdate" text,"Challenge Winner" text,"Challenge" text)
SELECT "Original Airdate" FROM table_3128 WHERE "Challenge" = '7-pound monster breakfast burrito'
What was the number of passengers going to MCO with a rank larger than 9?
CREATE TABLE table_40491 ("Rank" real,"City" text,"Airport" text,"Passengers" real,"Carriers" text)
SELECT COUNT("Passengers") FROM table_40491 WHERE "Airport" = 'mco' AND "Rank" > '9'
Name the Score of the Year larger than 2004 and a Runner-up of northeastern?
CREATE TABLE table_13655 ("Year" real,"Champion" text,"Score" text,"Runner-up" text,"Coach" text)
SELECT "Score" FROM table_13655 WHERE "Year" > '2004' AND "Runner-up" = 'northeastern'
What was the total attendance for the 3:1 game?
CREATE TABLE table_8676 ("Date" text,"Home" text,"Score" text,"Away" text,"Attendance" real)
SELECT SUM("Attendance") FROM table_8676 WHERE "Score" = '3:1'
What is the first party for Lord John Hay earlier than 1857?
CREATE TABLE table_name_82 (first_party VARCHAR,year VARCHAR,first_member VARCHAR)
SELECT first_party FROM table_name_82 WHERE year < 1857 AND first_member = "lord john hay"
Name the year for avg start being 22.4
CREATE TABLE table_25648 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text)
SELECT "Year" FROM table_25648 WHERE "Avg. Start" = '22.4'
Which artist has a draw higher than 4 and fewer than 5 points?
CREATE TABLE table_64788 ("Draw" real,"Song" text,"Artist" text,"Points" real,"Place" text)
SELECT "Artist" FROM table_64788 WHERE "Draw" > '4' AND "Points" < '5'
What is the average Top-5 for the open championship, and a Top-10 smaller than 2?
CREATE TABLE table_name_98 (top_5 INTEGER,tournament VARCHAR,top_10 VARCHAR)
SELECT AVG(top_5) FROM table_name_98 WHERE tournament = "the open championship" AND top_10 < 2
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of hire_date and the sum of department_id bin hire_date by weekday in a bar chart.
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 (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE jobs (JOB_I...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
What is the record for the date 15 december, and a round of final?
CREATE TABLE table_name_6 (record VARCHAR,date VARCHAR,round VARCHAR)
SELECT record FROM table_name_6 WHERE date = "15 december" AND round = "final"
What is the census ranking of the location with population of 959?
CREATE TABLE table_176529_2 (census_ranking VARCHAR,population VARCHAR)
SELECT census_ranking FROM table_176529_2 WHERE population = 959
On the date of June 8 what was the record?
CREATE TABLE table_name_32 (record VARCHAR,date VARCHAR)
SELECT record FROM table_name_32 WHERE date = "june 8"
give me the number of patients whose diagnoses icd9 code is 431 and lab test category is chemistry?
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 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.icd9_code = "431" AND lab."CATEGORY" = "Chemistry"
What is the length of the 6 Hours of Talladega?
CREATE TABLE table_37439 ("Race" text,"Length" text,"Class" text,"Circuit" text,"Date" text)
SELECT "Length" FROM table_37439 WHERE "Race" = '6 hours of talladega'
What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?
CREATE TABLE csu_fees (campus number,year number,campusfee number)CREATE TABLE enrollments (campus number,year number,totalenrollment_ay number,fte_ay number)CREATE TABLE campuses (id number,campus text,location text,county text,year number)CREATE TABLE discipline_enrollments (campus number,discipline number,year numbe...
SELECT campus FROM campuses WHERE location = "Northridge" AND county = "Los Angeles" UNION SELECT campus FROM campuses WHERE location = "San Francisco" AND county = "San Francisco"
how many songs reached position 1 at their highest point ?
CREATE TABLE table_203_249 (id number,"position" number,"song title" text,"artist" text,"sales" number,"highest position" number)
SELECT COUNT("song title") FROM table_203_249 WHERE "highest position" = 1
Find the number of students in total.
CREATE TABLE list (Id VARCHAR)
SELECT COUNT(*) FROM list
What is the total number of positions having points over 2, more than 4 losses, and under 10 matches played?
CREATE TABLE table_46650 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real)
SELECT COUNT("Position") FROM table_46650 WHERE "Points" > '2' AND "Lost" > '4' AND "Played" < '10'
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of hire_date and the sum of employee_id bin hire_date by weekday, sort by the total number in desc.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_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 job_history...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(EMPLOYEE_ID) DESC
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id, display by the Y-axis in descending.
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),E...
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(EMPLOYEE_ID) DESC
what are the five most commonly ordered tests in 2101 for patients aged 30s?
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)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREA...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 30 AND 39) AND STRFTIME('%y', labevents.c...
What is the type for EU Council Presidency of UK and John Major as President-in-Office?
CREATE TABLE table_name_27 (type VARCHAR,eu_council_presidency VARCHAR,president_in_office VARCHAR)
SELECT type FROM table_name_27 WHERE eu_council_presidency = "uk" AND president_in_office = "john major"
What is the Tie no when Crystal Palace is the Away team?
CREATE TABLE table_name_37 (tie_no VARCHAR,away_team VARCHAR)
SELECT tie_no FROM table_name_37 WHERE away_team = "crystal palace"
On what date did the away team score 14.4 (88)?
CREATE TABLE table_52652 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_52652 WHERE "Away team score" = '14.4 (88)'
tell me the intake method for potassium chloride tab?
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 DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'potassium chloride tab'
Find the status of orders which belong to the customer named 'Jeramie', group by order status, and count them. Show the result with a bar chart.
CREATE TABLE Customers (customer_id INTEGER,customer_name VARCHAR(80),customer_details VARCHAR(255))CREATE TABLE Shipments (shipment_id INTEGER,order_id INTEGER,invoice_number INTEGER,shipment_tracking_number VARCHAR(80),shipment_date DATETIME,other_shipment_details VARCHAR(255))CREATE TABLE Shipment_Items (shipment_id...
SELECT T2.order_status, COUNT(T2.order_status) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" GROUP BY order_status
What is the 2009 value with a q1 in 2006 in the French Open?
CREATE TABLE table_name_75 (tournament VARCHAR)
SELECT 2009 FROM table_name_75 WHERE 2006 = "q1" AND tournament = "french open"
In what Round was the draft pick from Florida with an Overall less than 166?
CREATE TABLE table_name_93 (round INTEGER,college VARCHAR,overall VARCHAR)
SELECT AVG(round) FROM table_name_93 WHERE college = "florida" AND overall < 166
Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.
CREATE TABLE apartment_bookings (apt_booking_id number,apt_id number,guest_id number,booking_status_code text,booking_start_date time,booking_end_date time)CREATE TABLE apartments (apt_id number,building_id number,apt_type_code text,apt_number text,bathroom_count number,bedroom_count number,room_count text)CREATE TABLE...
SELECT gender_code, COUNT(*) FROM guests GROUP BY gender_code ORDER BY COUNT(*) DESC
What Nationality is the Iowa State team?
CREATE TABLE table_52824 ("Player" text,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text)
SELECT "Nationality" FROM table_52824 WHERE "School/Club Team" = 'iowa state'
What is the Venue with a Result that is win, and a Score that is 5-0?
CREATE TABLE table_name_35 (venue VARCHAR,result VARCHAR,score VARCHAR)
SELECT venue FROM table_name_35 WHERE result = "win" AND score = "5-0"
how many people fit on a 73S
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)C...
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = '73S'
What was the highest number of laps for rider Shuhei Aoyama in a grid higher than 24?
CREATE TABLE table_name_37 (laps INTEGER,rider VARCHAR,grid VARCHAR)
SELECT MAX(laps) FROM table_name_37 WHERE rider = "shuhei aoyama" AND grid > 24
Top viewed questions of 2015.
CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,Re...
SELECT Title, ViewCount, Score FROM Posts WHERE CreationDate >= '20150101' ORDER BY ViewCount DESC
how many patients received a bronchoscopy thru stoma two or more times until 2104?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx t...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'bronchoscopy thru sto...
What was the stadium for the home team of shamrock rovers and result of 3 0?
CREATE TABLE table_27229 ("Season" text,"Date" text,"Home team" text,"Result" text,"Away team" text,"Stadium" text)
SELECT "Stadium" FROM table_27229 WHERE "Home team" = 'Shamrock Rovers' AND "Result" = '3–0'
How many games were played where exactly 15 points were scored?
CREATE TABLE table_41677 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT SUM("Played") FROM table_41677 WHERE "Points" = '15'
who won more gold medals between jamaica and mexico ?
CREATE TABLE table_204_800 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "nation" FROM table_204_800 WHERE "nation" IN ('jamaica', 'mexico') ORDER BY "gold" DESC LIMIT 1
post count for deleted users.
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 COUNT(*) FROM Posts WHERE NOT OwnerDisplayName IS NULL AND PostTypeId = 1
Visualize the average smallest rating of different movie title using a bar chart, and I want to sort by the stars) in ascending please.
CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Reviewer (rID int,name text)
SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY AVG(MIN(T1.stars))
On what date was the result a draw?
CREATE TABLE table_47021 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Date" FROM table_47021 WHERE "Result" = 'draw'
What are the statuses and average populations of each city.
CREATE TABLE city (City_ID int,Official_Name text,Status text,Area_km_2 real,Population real,Census_Ranking text)CREATE TABLE farm (Farm_ID int,Year int,Total_Horses real,Working_Horses real,Total_Cattle real,Oxen real,Bulls real,Cows real,Pigs real,Sheep_and_Goats real)CREATE TABLE competition_record (Competition_ID i...
SELECT Status, AVG(Population) FROM city GROUP BY Status
What is the Almaty, Kazakhstan when the Sergey Filimonov (KAZ) is 210kg?
CREATE TABLE table_name_42 (almaty_ VARCHAR,_kazakhstan VARCHAR,sergey_filimonov___kaz__ VARCHAR)
SELECT almaty_, _kazakhstan FROM table_name_42 WHERE sergey_filimonov___kaz__ = "210kg"
return me the authors who have more than 10 papers in the VLDB conference .
CREATE TABLE domain_publication (did int,pid int)CREATE TABLE journal (homepage varchar,jid int,name varchar)CREATE TABLE organization (continent varchar,homepage varchar,name varchar,oid int)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int,reference_num int,title varchar,year int)CRE...
SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY author.name HAVING COUNT(DISTINCT (publication.title)) > 10
What was the title used for Rosie, the film nominated for the dutch language?
CREATE TABLE table_80150 ("Year (Ceremony)" text,"Film title used in nomination" text,"Original title" text,"Language(s)" text,"Result" text)
SELECT "Film title used in nomination" FROM table_80150 WHERE "Language(s)" = 'dutch' AND "Original title" = 'rosie'
Find names of the document without any images.
CREATE TABLE users (user_id number,role_code text,user_name text,user_login text,password text)CREATE TABLE functional_areas (functional_area_code text,parent_functional_area_code text,functional_area_description text)CREATE TABLE document_structures (document_structure_code text,parent_document_structure_code text,doc...
SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code JOIN document_sections_images AS t3 ON t2.section_id = t3.section_id
thank you for your answer comments... on questions?.
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditD...
SELECT c.Id AS "comment_link" FROM Comments AS c INNER JOIN Posts AS p ON p.Id = c.PostId INNER JOIN Posts AS q ON q.Id = p.ParentId WHERE Text LIKE '%welcome%' AND c.CreationDate > '01.01.2020'
what does it cost to get hemorrhage - postpartum diagnosed?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid ...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'hemorrhage - postpartum')
When did Darren Day enter?
CREATE TABLE table_14345690_2 (entered VARCHAR,celebrity VARCHAR)
SELECT entered FROM table_14345690_2 WHERE celebrity = "Darren Day"
which rider is on top in points
CREATE TABLE table_204_535 (id number,"pos" text,"rider" text,"manufacturer" text,"laps" number,"time/retired" text,"grid" number,"points" number)
SELECT "rider" FROM table_204_535 ORDER BY "points" DESC LIMIT 1
What player from England was the runner-up at the match played at the Royal Porthcawl Golf Club?
CREATE TABLE table_name_83 (runner_up VARCHAR,country VARCHAR,venue VARCHAR)
SELECT runner_up FROM table_name_83 WHERE country = "england" AND venue = "royal porthcawl golf club"
what is average age of patients whose marital status is single and ethnicity is asian?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "ASIAN"
What Champion had a Score of 9 1?
CREATE TABLE table_name_82 (champion VARCHAR,score VARCHAR)
SELECT champion FROM table_name_82 WHERE score = "9–1"
When did St Kilda play a home game?
CREATE TABLE table_name_91 (date VARCHAR,home_team VARCHAR)
SELECT date FROM table_name_91 WHERE home_team = "st kilda"
Bar chart x axis nationality y axis sum meter 100
CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te...
SELECT Nationality, SUM(meter_100) FROM swimmer GROUP BY Nationality
what is the position for the player from university of alabama?
CREATE TABLE table_name_37 (position VARCHAR,school VARCHAR)
SELECT position FROM table_name_37 WHERE school = "university of alabama"
what were the three most common drugs that were prescribed to the female patients in their 40s in the same month after they had been diagnosed with food/vomit pneumonitis until 3 years ago?
CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_locatio...
SELECT t3.drug FROM (SELECT t2.drug, 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_icd_diagnoses WHERE ...
who athe party where district is louisiana 2?
CREATE TABLE table_18535 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Party" FROM table_18535 WHERE "District" = 'Louisiana 2'
In which programs is RESTORA 744 a requirement ?
CREATE TABLE area (course_id int,area varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement v...
SELECT DISTINCT program.name FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN program ON program.program_id = program_course.program_id WHERE course.department = 'RESTORA' AND course.number = 744
What is the sum of the points of the game with philadelphia as the visitor and an attendance greater than 7,284?
CREATE TABLE table_name_26 (points INTEGER,visitor VARCHAR,attendance VARCHAR)
SELECT SUM(points) FROM table_name_26 WHERE visitor = "philadelphia" AND attendance > 7 OFFSET 284
What position is played by pick 255 overall?
CREATE TABLE table_10360823_1 (position VARCHAR,overall VARCHAR)
SELECT position FROM table_10360823_1 WHERE overall = 255
Where is the location with a record of 50-19?
CREATE TABLE table_45405 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location" text,"Record" text)
SELECT "Location" FROM table_45405 WHERE "Record" = '50-19'
What is the average down (up to kbit/s) when the provider is willy.tel and the up (kbit/s) is more than 1984?
CREATE TABLE table_58872 ("DSL Type" text,"Provider" text,"Resale" text,"Down (up to kbit/s)" real,"Up (up to kbit/s)" real)
SELECT AVG("Down (up to kbit/s)") FROM table_58872 WHERE "Provider" = 'willy.tel' AND "Up (up to kbit/s)" > '1984'
Find Team_Name and All_Games_Percent , and visualize them by a bar chart, display by the x axis in asc.
CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT Team_Name, All_Games_Percent FROM basketball_match ORDER BY Team_Name
Pulling all data from Posts Table.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE Comments (Id number,PostId number,Score number,T...
SELECT * FROM Posts INNER JOIN Users ON Posts.Id = Users.Id
Nagua has the area (km ) of?
CREATE TABLE table_1888051_1 (area__km²_ VARCHAR,capital VARCHAR)
SELECT area__km²_ FROM table_1888051_1 WHERE capital = "Nagua"
What's the lowest team 1 number that had asolo fonte (veneto b) as the Agg.?
CREATE TABLE table_55536 ("Team 1" real,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text)
SELECT MIN("Team 1") FROM table_55536 WHERE "Agg." = 'asolo fonte (veneto b)'
What was the home team score at Richmond's away game against Footscray?
CREATE TABLE table_52651 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team score" FROM table_52651 WHERE "Away team" = 'richmond'
What is the name of the Original artist when the week # is top 16 (8 men)?
CREATE TABLE table_7252 ("Week #" text,"Theme" text,"Song choice" text,"Original artist" text,"Order #" text,"Result" text)
SELECT "Original artist" FROM table_7252 WHERE "Week #" = 'top 16 (8 men)'
What teacher instructs the easiest MDE course ?
CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varcha...
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour...
What is the average Gold when the rank is less than 3 and the bronze is less than 1?
CREATE TABLE table_75068 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT AVG("Gold") FROM table_75068 WHERE "Rank" < '3' AND "Bronze" < '1'
Which teacher is doing ULCS classes next Winter ?
CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comm...
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
how long was the round for season 2010
CREATE TABLE table_204_179 (id number,"season" number,"division" number,"tms." number,"pos." number,"fa cup" text,"afc cl" number)
SELECT "fa cup" FROM table_204_179 WHERE "season" = 2010
What is the winning amount that has May 30, 2009 as the date premiered?
CREATE TABLE table_name_2 (winning_amount VARCHAR,date_premiered__2009_ VARCHAR)
SELECT winning_amount FROM table_name_2 WHERE date_premiered__2009_ = "may 30"
If the proteam is Jacksonville bulls, what is the position?
CREATE TABLE table_27132791_3 (position VARCHAR,pro_team VARCHAR)
SELECT position FROM table_27132791_3 WHERE pro_team = "Jacksonville Bulls"
fort gratiot lighthouse and fort st. joseph are located in what city ?
CREATE TABLE table_204_558 (id number,"name" text,"location" text,"city" text,"listing date" text)
SELECT "city" FROM table_204_558 WHERE "name" = 'fort gratiot lighthouse'
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of manufacturer , and group by attribute name.
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 T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
Name the total number of top 10 with top 25 less than 2 and top 5 more than 0
CREATE TABLE table_35861 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real)
SELECT COUNT("Top-10") FROM table_35861 WHERE "Top-25" < '2' AND "Top-5" > '0'
Where was the venue that had 274 runs?
CREATE TABLE table_34000 ("Rank" text,"Runs" text,"Player" text,"Opponent" text,"Venue" text,"Season" text)
SELECT "Venue" FROM table_34000 WHERE "Runs" = '274'
What is the earliest issue Arnie Kogen wrote for in December 1964?
CREATE TABLE table_42690 ("Spoofed Title" text,"Writer" text,"Artist" text,"Issue" real,"Date" text)
SELECT MIN("Issue") FROM table_42690 WHERE "Writer" = 'arnie kogen' AND "Date" = 'december 1964'
How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, rank by the activity_name in ascending.
CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR...
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY activity_name
When the school picking is utah state for the position of linebacker, what's the sum of those rounds?
CREATE TABLE table_55512 ("Pick" real,"Round" real,"Player" text,"Position" text,"School" text)
SELECT SUM("Round") FROM table_55512 WHERE "Position" = 'linebacker' AND "School" = 'utah state'