instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Return the structure description of the document that has been accessed the fewest number of times.
CREATE TABLE roles (role_code text,role_description text)CREATE TABLE images (image_id number,image_alt_text text,image_name text,image_url text)CREATE TABLE users (user_id number,role_code text,user_name text,user_login text,password text)CREATE TABLE document_structures (document_structure_code text,parent_document_s...
SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code = t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY COUNT(*) DESC LIMIT 1
What city was in the 3rd venue when Mexico City was in the 2nd?
CREATE TABLE table_25024 ("Year" real,"1st Venue" text,"2nd Venue" text,"3rd Venue" text,"4th Venue" text,"5th Venue" text)
SELECT "3rd Venue" FROM table_25024 WHERE "2nd Venue" = 'Mexico City'
What's the total points that Scuderia Ferrari with a Ferrari V12 engine have before 1971?
CREATE TABLE table_name_60 (points INTEGER,engine VARCHAR,year VARCHAR,entrant VARCHAR)
SELECT SUM(points) FROM table_name_60 WHERE year < 1971 AND entrant = "scuderia ferrari" AND engine = "ferrari v12"
What Position has a Round that's larger than 21?
CREATE TABLE table_35395 ("Round" real,"Pick" real,"Player" text,"Position" text,"School/Club Team" text)
SELECT "Position" FROM table_35395 WHERE "Round" > '21'
What is the type of glycosylase that has an E. coli of Muty?
CREATE TABLE table_name_11 (type VARCHAR,e_coli VARCHAR)
SELECT type FROM table_name_11 WHERE e_coli = "muty"
What candidates ran in the election when the incumbent was william j. driver?
CREATE TABLE table_1342292_4 (candidates VARCHAR,incumbent VARCHAR)
SELECT candidates FROM table_1342292_4 WHERE incumbent = "William J. Driver"
how many patients aged below 85 years are black/haitian?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.age < "85"
What team does Dan Wheldon drive for when he led 0 laps?
CREATE TABLE table_46060 ("Fin. Pos" text,"Car No." text,"Driver" text,"Team" text,"Laps" text,"Time/Retired" text,"Grid" text,"Laps Led" text,"Points" text)
SELECT "Team" FROM table_46060 WHERE "Laps Led" = '0' AND "Driver" = 'dan wheldon'
What was the home team score at North Melbourne's away game?
CREATE TABLE table_55748 ("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_55748 WHERE "Away team" = 'north melbourne'
let me know the procedure icd9 code for patient stephanie suchan.
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 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,sho...
SELECT procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Stephanie Suchan"
Can you tell me the Venue that has the Away team of south dragons?
CREATE TABLE table_name_98 (venue VARCHAR,away_team VARCHAR)
SELECT venue FROM table_name_98 WHERE away_team = "south dragons"
What is the to par for the score 64-73-74-69=280?
CREATE TABLE table_61492 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money (\u00a3)" real)
SELECT "To par" FROM table_61492 WHERE "Score" = '64-73-74-69=280'
what is drug route and drug dose of drug name neo*po*ferrous sulfate elixir?
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 prescriptions.route, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "NEO*PO*Ferrous Sulfate Elixir"
What is the date for the race that has a circuit of Milwaukee Mile and the sanctioning of cart?
CREATE TABLE table_32857 ("Sanctioning" text,"Race Name" text,"Circuit" text,"City/Location" text,"Date" text)
SELECT "Date" FROM table_32857 WHERE "Circuit" = 'milwaukee mile' AND "Sanctioning" = 'cart'
How many averages have recs smaller than 26, and a Player of reggie brown, and a Long smaller than 40?
CREATE TABLE table_name_45 (avg VARCHAR,long VARCHAR,rec VARCHAR,player VARCHAR)
SELECT COUNT(avg) FROM table_name_45 WHERE rec < 26 AND player = "reggie brown" AND long < 40
Who was the home team on February 3?
CREATE TABLE table_name_68 (home VARCHAR,date VARCHAR)
SELECT home FROM table_name_68 WHERE date = "february 3"
since 2 years ago, what were the top five most frequent microbiological tests ordered for patients in the same month after monitor vital capacities for deterioration?
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientu...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'monitor vital capacities for deterioration' ...
What are the details of all products?
CREATE TABLE order_items (order_id number,product_id number,order_quantity text)CREATE TABLE customer_contact_channels (customer_id number,channel_code text,active_from_date time,active_to_date time,contact_number text)CREATE TABLE customer_orders (order_id number,customer_id number,order_status text,order_date time,or...
SELECT DISTINCT product_details FROM products
If the radio stations is radio nou si radio radio nou m sica; what were the total number of television channels?
CREATE TABLE table_25682 ("Autonomous Community" text,"Organization" text,"Television Channels" text,"Radio Stations" text,"Foundation" real)
SELECT COUNT("Television Channels") FROM table_25682 WHERE "Radio Stations" = 'Radio Nou Si Radio Radio Nou Música'
For those employees who was hired before 2002-06-21, give me the comparison about the sum of employee_id over the hire_date bin hire_date by time, and could you list by the y axis from low to high?
CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE va...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(EMPLOYEE_ID)
How many joined Manchester University?
CREATE TABLE table_27740 ("Institution" text,"Location" text,"Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" text)
SELECT "Joined" FROM table_27740 WHERE "Institution" = 'Manchester University'
Show the average age for male and female students with a bar chart, and could you list bar from high to low order?
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 Allergy_Type (Allergy VARCHAR(20),AllergyType VARCHAR(20))CREATE TABLE Has_Allergy (StuID INTEGER,Allergy VARCHAR(20))
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY Sex DESC
Rollback Done By A User. This shows rollbacks that a particular user has performed. Enter the user ID. Results will be all rollback edits that that user has done.
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score n...
SELECT h.UserId AS "user_link", h.PostId AS "post_link", h.CreationDate AS Date, h.PostHistoryTypeId AS Type, h.Comment, h.Text FROM PostHistory AS h WHERE UserId = 285587 AND PostHistoryTypeId IN (7, 8, 9) ORDER BY h.CreationDate DESC
who is ranked first ?
CREATE TABLE table_204_433 (id number,"rank" number,"name" text,"nationality" text,"time" text)
SELECT "name" FROM table_204_433 WHERE id = 1
how many channels were gained in 1997
CREATE TABLE table_1397655_1 (other_programming_sources VARCHAR,year_acquired VARCHAR)
SELECT COUNT(other_programming_sources) FROM table_1397655_1 WHERE year_acquired = 1997
what were the top four most common drugs that followed within 2 months for the patients who were given contr cerebr arteriogram during this year?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE transfers (row_id number,subject_id numb...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime 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 ...
What is the 0-100km/h (62mph) of the supercharged 5.4l v8 engine?
CREATE TABLE table_59008 ("Engine" text,"Power" text,"Torque" text,"0\u2013100km/h (62mph)" text,"Top speed" text)
SELECT "0\u2013100km/h (62mph)" FROM table_59008 WHERE "Engine" = 'supercharged 5.4l v8'
Group by the local authorities and count the number of local authorities, and then group by services, could you display in desc by the x-axis?
CREATE TABLE train (id int,train_number int,name text,origin text,destination text,time text,interval text)CREATE TABLE route (train_id int,station_id int)CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,low_temperature int,precipitation real,wind_speed_mph int)CREATE TABLE station (id ...
SELECT services, COUNT(services) FROM station GROUP BY local_authority, services ORDER BY services DESC
was the white spruce used in 1985 from michigan or minnesota ?
CREATE TABLE table_203_700 (id number,"year" number,"species" text,"height" text,"location grown" text,"state" text,"notes" text)
SELECT "state" FROM table_203_700 WHERE "species" = 'white spruce' AND "year" = 1985
Who is the Director of Fish Tales?
CREATE TABLE table_63754 ("Title" text,"Series" text,"Director" text,"Production Num." text,"Release date" text)
SELECT "Director" FROM table_63754 WHERE "Title" = 'fish tales'
how many patients whose primary disease is ruq pain?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN"
What is the home team of the game where the Grizzlies were the visitor team and Rudy Gay (21) was the leading scorer?
CREATE TABLE table_name_83 (home VARCHAR,visitor VARCHAR,leading_scorer VARCHAR)
SELECT home FROM table_name_83 WHERE visitor = "grizzlies" AND leading_scorer = "rudy gay (21)"
Draw a pie chart to show all main industry and total market value in each industry.
CREATE TABLE station_company (Station_ID int,Company_ID int,Rank_of_the_Year int)CREATE TABLE gas_station (Station_ID int,Open_Year int,Location text,Manager_Name text,Vice_Manager_Name text,Representative_Name text)CREATE TABLE company (Company_ID int,Rank int,Company text,Headquarters text,Main_Industry text,Sales_bi...
SELECT Main_Industry, SUM(Market_Value) FROM company GROUP BY Main_Industry
count the number of patients diagnosed with nausea - with vomiting within 2 months after they have been diagnosed with ards in 2105.
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labres...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'nausea - with vomiting' AND STRFTIME('%y', diagnosis.diagnosistime) = '2105') AS t1 JOIN (SELECT patient.uni...
What are the first names and ids for customers who have two or more accounts, and rank in desc by the X.
CREATE TABLE Invoices (invoice_number INTEGER,order_id INTEGER,invoice_date DATETIME)CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,product_quantity VARCHAR(50),other_order_item_details VARCHAR(255))CREATE TABLE Orders (order_id INTEGER,customer_id INTEGER,date_order_placed DATETIME...
SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.customer_first_name DESC
How many apartment bookings in each day? Show me a line chart grouping by booking end date, and show by the booking_end_date from high to low.
CREATE TABLE Guests (guest_id INTEGER,gender_code CHAR(1),guest_first_name VARCHAR(80),guest_last_name VARCHAR(80),date_of_birth DATETIME)CREATE TABLE Apartment_Bookings (apt_booking_id INTEGER,apt_id INTEGER,guest_id INTEGER,booking_status_code CHAR(15),booking_start_date DATETIME,booking_end_date DATETIME)CREATE TABL...
SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings GROUP BY booking_end_date ORDER BY booking_end_date DESC
What ranking has the nationality of spain and the goals of 26?
CREATE TABLE table_5069 ("Ranking" real,"Nationality" text,"Name" text,"Years" text,"Goals" real)
SELECT "Ranking" FROM table_5069 WHERE "Nationality" = 'spain' AND "Goals" = '26'
what is the name of drug that patient 022-3713 is allergic to since 104 months ago.
CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventt...
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-3713')) AND DATETIME(allergy.allergytime) >= DATETIME(CURRENT_TIME(), '-...
Which opponent has a Record of 54-38?
CREATE TABLE table_name_73 (opponent VARCHAR,record VARCHAR)
SELECT opponent FROM table_name_73 WHERE record = "54-38"
largest victory
CREATE TABLE table_203_57 (id number,"year" number,"round" text,"against" text,"score" text,"scorers" text)
SELECT "score" FROM table_203_57 ORDER BY "score" - "score" DESC LIMIT 1
What was the result of the election with incumbent john lewis?
CREATE TABLE table_27487712_1 (result VARCHAR,incumbent VARCHAR)
SELECT result FROM table_27487712_1 WHERE incumbent = "John Lewis"
what is the size km when the density hab/km is 8,321?
CREATE TABLE table_name_52 (size_km² INTEGER,density_hab_km VARCHAR)
SELECT SUM(size_km²) FROM table_name_52 WHERE density_hab_km = 8 OFFSET 321
A bar chart shows the distribution of Days and the amount of Days , and group by attribute Days.
CREATE TABLE Department (DNO INTEGER,Division VARCHAR(2),DName VARCHAR(25),Room VARCHAR(5),Building VARCHAR(13),DPhone INTEGER)CREATE TABLE Gradeconversion (lettergrade VARCHAR(2),gradepoint FLOAT)CREATE TABLE Minor_in (StuID INTEGER,DNO INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Ag...
SELECT Days, COUNT(Days) FROM Course GROUP BY Days ORDER BY Credits
What was the result of the Competition of euro 2000 qualifier?
CREATE TABLE table_10863 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Result" FROM table_10863 WHERE "Competition" = 'euro 2000 qualifier'
A bar chart about what are the names and number of hours spent training for each player who trains for less than 1500 hours?, and display in descending by the y axis.
CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))
SELECT pName, HS FROM Player WHERE HS < 1500 ORDER BY HS DESC
Who is listed under the general classifcation where Ben Swift won and Cameron Meyer was listed under the young rider?
CREATE TABLE table_31099 ("Stage" real,"Winner" text,"General Classification" text,"Mountains Classification" text,"Sprint Classification" text,"Young Rider Classification" text,"Team Classification" text,"Aggressive Rider" text)
SELECT "General Classification" FROM table_31099 WHERE "Winner" = 'Ben Swift' AND "Young Rider Classification" = 'Cameron Meyer'
Which Rank has a Qual of 145.144?
CREATE TABLE table_name_68 (rank VARCHAR,qual VARCHAR)
SELECT rank FROM table_name_68 WHERE qual = "145.144"
Name the country for hideki noda category:articles with hcards
CREATE TABLE table_22756 ("Name" text,"Country" text,"Seasons" text,"Championship Titles" text,"Race entries (Starts)" text,"Poles" real,"Wins" real,"Podiums" real,"Fastest Laps" real,"Points" text)
SELECT "Country" FROM table_22756 WHERE "Name" = 'Hideki Noda Category:Articles with hCards'
What is the year that saw a passenger change of +32,9%?
CREATE TABLE table_name_53 (year VARCHAR,passenger_change VARCHAR)
SELECT COUNT(year) FROM table_name_53 WHERE passenger_change = "+32,9%"
What's the highest Ends Lost with a shot % greater than 77, 11 blank ends, 7 stolen ends, and more than 44 ends one?
CREATE TABLE table_5429 ("Locale" text,"Skip" text,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot Pct." real)
SELECT MAX("Ends Lost") FROM table_5429 WHERE "Shot Pct." > '77' AND "Blank Ends" = '11' AND "Stolen Ends" = '7' AND "Ends Won" > '44'
Which constellation has hd 75732 as a destignation HD?
CREATE TABLE table_38579 ("Designation HD" text,"Constellation" text,"Date sent" text,"Arrival date" text,"Message" text)
SELECT "Constellation" FROM table_38579 WHERE "Designation HD" = 'hd 75732'
Who teaches HUMGEN 643 next semester ?
CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cr...
SELECT DISTINCT instructor.name 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 course ON course.course_id = course_offering.course_id INNER JOIN semester...
What was the date of the game that had a decision of wall?
CREATE TABLE table_name_41 (date VARCHAR,decision VARCHAR)
SELECT date FROM table_name_41 WHERE decision = "wall"
What are the completion dates of all the tests that have result 'Fail'?
CREATE TABLE Student_Course_Enrolment (date_of_completion VARCHAR,registration_id VARCHAR)CREATE TABLE Student_Tests_Taken (registration_id VARCHAR,test_result VARCHAR)
SELECT T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail"
What college did pick 33 attend?
CREATE TABLE table_53120 ("Pick" real,"Player" text,"Country of origin*" text,"PBA team" text,"College" text)
SELECT "College" FROM table_53120 WHERE "Pick" = '33'
Who was responsible for original beechwood bunny tale / source material for the episode title 'Papa Bramble's Secret'?
CREATE TABLE table_20810 ("Official #" real,"TF1 #" real,"French title" text,"English title" text,"Air date (France)" text,"Original Beechwood Bunny Tale / Source material" text)
SELECT "Original Beechwood Bunny Tale / Source material" FROM table_20810 WHERE "English title" = 'Papa Bramble''s Secret'
What is Lijsttrekker, when Cabinet is 'Hans Van Mierlo', and when Fractievoorzitter is 'Thom De Graaf'?
CREATE TABLE table_name_81 (lijsttrekker VARCHAR,cabinet VARCHAR,fractievoorzitter VARCHAR)
SELECT lijsttrekker FROM table_name_81 WHERE cabinet = "hans van mierlo" AND fractievoorzitter = "thom de graaf"
when did steve corino win his first wsl title ?
CREATE TABLE table_204_684 (id number,"wrestler:" text,"times:" number,"date:" text,"location:" text,"notes:" text)
SELECT "date:" FROM table_204_684 WHERE "wrestler:" = 'steve corino' ORDER BY "date:" LIMIT 1
How many Games have a Score of 5 4, and Points smaller than 49?
CREATE TABLE table_name_96 (game VARCHAR,score VARCHAR,points VARCHAR)
SELECT COUNT(game) FROM table_name_96 WHERE score = "5–4" AND points < 49
list all flights from ATLANTA to BALTIMORE thursday morning
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 text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time i...
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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 24 AND date_day.month_number = 5 AN...
A bar chart for finding the number of the names of stadiums that some Australian swimmers have been to, list by the name in ascending.
CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadiu...
SELECT T4.Name, COUNT(T4.Name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID JOIN event AS t3 ON t2.Event_ID = t3.ID JOIN stadium AS t4 ON t4.ID = t3.Stadium_ID WHERE t1.Nationality = 'Australia' GROUP BY T4.Name ORDER BY T4.Name
What 2009 has 18.5% as the 2007?
CREATE TABLE table_65707 ("Score" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text)
SELECT "2009" FROM table_65707 WHERE "2007" = '18.5%'
Tell me the average heat rank with a lane of 2 and time less than 27.66
CREATE TABLE table_name_48 (heat_rank INTEGER,lane VARCHAR,time VARCHAR)
SELECT AVG(heat_rank) FROM table_name_48 WHERE lane = 2 AND time < 27.66
What body styles have devaux-hall inline 6 as the engine?
CREATE TABLE table_name_9 (body_styles VARCHAR,engine VARCHAR)
SELECT body_styles FROM table_name_9 WHERE engine = "devaux-hall inline 6"
How many different original air dates did the episode number 6 have?
CREATE TABLE table_13426649_1 (original_air_date VARCHAR,_number VARCHAR)
SELECT COUNT(original_air_date) FROM table_13426649_1 WHERE _number = 6
In what year saw a total distance of 1,870.23 km?
CREATE TABLE table_32694 ("Year" text,"Date" text,"Stages" text,"Distance" text,"Winner" text)
SELECT "Year" FROM table_32694 WHERE "Distance" = '1,870.23 km'
Who was the opponent when Brown (9-5) took the loss?
CREATE TABLE table_5671 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Opponent" FROM table_5671 WHERE "Loss" = 'brown (9-5)'
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, find job_id and the amount of job_id , and group by attribute job_id, and visualize them by a bar chart, and order in desc by the names.
CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGIO...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC
Show me about the correlation between Team_ID and School_ID , and group by attribute All_Games in a scatter chart.
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_ID, School_ID FROM basketball_match GROUP BY All_Games
How many scores have a Place of t5?
CREATE TABLE table_59050 ("Place" text,"Player" text,"Country" text,"Score" real,"To Par" text)
SELECT COUNT("Score") FROM table_59050 WHERE "Place" = 't5'
How many teams did Bob Peppler play for?
CREATE TABLE table_1213511_3 (nhl_team VARCHAR,player VARCHAR)
SELECT COUNT(nhl_team) FROM table_1213511_3 WHERE player = "Bob Peppler"
prostate specific antigen ( psa ) > 4 ng / ml;
CREATE TABLE table_train_248 ("id" int,"anemia" bool,"prostate_specific_antigen_psa" float,"hemoglobin_a1c_hba1c" float,"body_weight" float,"fasting_triglycerides" int,"hyperlipidemia" bool,"hgb" int,"fasting_total_cholesterol" int,"fasting_ldl_cholesterol" int,"body_mass_index_bmi" float,"NOUSE" float)
SELECT * FROM table_train_248 WHERE prostate_specific_antigen_psa > 4
provide the number of patients whose age is less than 54 and item id is 51032?
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 demographic (subject_id text,hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "54" AND lab.itemid = "51032"
What television network, founded in 2002, has a community type of network?
CREATE TABLE table_name_67 (television_network VARCHAR,type_of_network VARCHAR,founded VARCHAR)
SELECT television_network FROM table_name_67 WHERE type_of_network = "community" AND founded = "2002"
Which Total has a Name of alex mcleish category:articles with hcards, and a League smaller than 494?
CREATE TABLE table_47269 ("Name" text,"Years" text,"League" real,"Scottish Cup" real,"League Cup" real,"Europe" real,"Total" real)
SELECT AVG("Total") FROM table_47269 WHERE "Name" = 'alex mcleish category:articles with hcards' AND "League" < '494'
What car/motorcycle goes 91.813mph?
CREATE TABLE table_name_14 (car___motorcycle VARCHAR,speed VARCHAR)
SELECT car___motorcycle FROM table_name_14 WHERE speed = "91.813mph"
What is the total number of bronze medals with more than 1 medal total and fewer than 1 silver medal?
CREATE TABLE table_name_8 (bronze VARCHAR,total VARCHAR,silver VARCHAR)
SELECT COUNT(bronze) FROM table_name_8 WHERE total > 1 AND silver < 1
Return a bar chart on what is the average base price of rooms, for each bed type?, and sort from high to low by the mean baseprice.
CREATE TABLE Rooms (RoomId TEXT,roomName TEXT,beds INTEGER,bedType TEXT,maxOccupancy INTEGER,basePrice INTEGER,decor TEXT)CREATE TABLE Reservations (Code INTEGER,Room TEXT,CheckIn TEXT,CheckOut TEXT,Rate REAL,LastName TEXT,FirstName TEXT,Adults INTEGER,Kids INTEGER)
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC
Which decile has an Area of welcome bay, and an Authority of state?
CREATE TABLE table_66698 ("Name" text,"Gender" text,"Area" text,"Authority" text,"Decile" real)
SELECT "Decile" FROM table_66698 WHERE "Area" = 'welcome bay' AND "Authority" = 'state'
What was Week 15 when Week 12 was Notre Dame (7-2)?
CREATE TABLE table_58977 ("Week 9 Oct 23" text,"Week 10 Oct 30" text,"Week 11 Nov 6" text,"Week 12 Nov 13" text,"Week 13 Nov 20" text,"Week 14 Nov 27" text,"Week 15 (Final) Dec 3" text)
SELECT "Week 15 (Final) Dec 3" FROM table_58977 WHERE "Week 12 Nov 13" = 'notre dame (7-2)'
On what date was the total 25 45?
CREATE TABLE table_55016 ("Date" text,"Score" text,"Set 1" text,"Set 2" text,"Set 3" text,"Total" text)
SELECT "Date" FROM table_55016 WHERE "Total" = '25–45'
What is the total where the gold is larger than 2?
CREATE TABLE table_76070 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT COUNT("Total") FROM table_76070 WHERE "Gold" > '2'
Tell me the affiliation for pick number less than 59 and position of gk
CREATE TABLE table_31644 ("Pick #" real,"MLS Team" text,"Player" text,"Position" text,"Affiliation" text)
SELECT "Affiliation" FROM table_31644 WHERE "Pick #" < '59' AND "Position" = 'gk'
Name the most of 2500-3000ft
CREATE TABLE table_1456056_1 (Id VARCHAR)
SELECT MAX(2500 AS _3000ft) FROM table_1456056_1
what is the discharge location for the patient annette haris?
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 demographic.discharge_location FROM demographic WHERE demographic.name = "Annette Harris"
What was the record of Utah?
CREATE TABLE table_name_65 (record VARCHAR,team VARCHAR)
SELECT record FROM table_name_65 WHERE team = "utah"
How many runs did mahela jayawardene and thilan samaraweera have?
CREATE TABLE table_46541 ("Wicket" text,"Runs" real,"Batting partners" text,"Batting team" text,"Fielding team" text,"Venue" text,"Season" text)
SELECT SUM("Runs") FROM table_46541 WHERE "Batting partners" = 'mahela jayawardene and thilan samaraweera'
Who was everyone first elected when incumbent was John J. Hemphill?
CREATE TABLE table_1431467_4 (first_elected VARCHAR,incumbent VARCHAR)
SELECT first_elected FROM table_1431467_4 WHERE incumbent = "John J. Hemphill"
What was the US national average electric mix rating for the vehicle that was rated 280 g/mi (174 g/km) in the Midwest?
CREATE TABLE table_20553 ("Vehicle" text,"EPA rated All-electric range" text,"EPA rated combined fuel economy" text,"Alaska (Juneau)" text,"California (San Francisco)" text,"Mid-Atlantic South (Washington,D.C.)" text,"U.S. national average electric mix" text,"Southeast (Atlanta)" text,"Midwest (Des Moines)" text,"Rocky...
SELECT "U.S. national average electric mix" FROM table_20553 WHERE "Midwest (Des Moines)" = '280 g/mi (174 g/km)'
which artist has the most concerts ?
CREATE TABLE table_204_697 (id number,"song" text,"artist(s)" text,"concert" number,"film" number,"1978 album" number,"2002 album" number)
SELECT "artist(s)" FROM table_204_697 ORDER BY "concert" DESC LIMIT 1
what number of acts does il giustino have ?
CREATE TABLE table_204_104 (id number,"title" text,"genre" text,"sub\u00addivisions" text,"libretto" text,"premiere date" text,"place,theatre" text,"notes" text)
SELECT "sub\u00addivisions" FROM table_204_104 WHERE "title" = 'il giustino'
Who was North Melbourne's home opponent?
CREATE TABLE table_78308 ("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_78308 WHERE "Away team" = 'north melbourne'
Name number of stellar classification for 3 neptune planets < 1 au
CREATE TABLE table_2296507_1 (stellar_classification VARCHAR,system VARCHAR)
SELECT COUNT(stellar_classification) FROM table_2296507_1 WHERE system = "3 Neptune planets < 1 AU"
Which country is ranked 56 overall and has a heat rank smaller than 8?
CREATE TABLE table_31970 ("Heat Rank" real,"Lane" real,"Swimmer" text,"Country" text,"Time" real,"Overall Rank" text)
SELECT "Country" FROM table_31970 WHERE "Heat Rank" < '8' AND "Overall Rank" = '56'
how many tracks in word ... life have at most two songwriters ?
CREATE TABLE table_203_228 (id number,"#" number,"title" text,"songwriters" text,"producer(s)" text,"performer (s)" text)
SELECT COUNT("title") FROM table_203_228 WHERE "songwriters" <= 2
What was the 18 to 49 rating when 9.50 million watched?
CREATE TABLE table_27044 ("Episode" real,"First Air Date" text,"Rating (18\u201349)" text,"Share (18\u201349)" real,"Viewers (millions)" text,"Rank (timeslot)" text,"Rank (night)" text)
SELECT "Rating (18\u201349)" FROM table_27044 WHERE "Viewers (millions)" = '9.50'
Which 1st Party has a 2nd Member of william rawson shaw, and a 1st Member of sir james stansfeld?
CREATE TABLE table_12845 ("Election" text,"1st Member" text,"1st Party" text,"2nd Member" text,"2nd Party" text)
SELECT "1st Party" FROM table_12845 WHERE "2nd Member" = 'william rawson shaw' AND "1st Member" = 'sir james stansfeld'
which one has the least vote
CREATE TABLE table_204_982 (id number,"party/electoral alliance" text,"seats" number,"change" number,"votes" number,"%" text)
SELECT "party/electoral alliance" FROM table_204_982 ORDER BY "votes" LIMIT 1
return me all the papers in PVLDB after 2000 in ' University of Michigan ' .
CREATE TABLE publication_keyword (kid int,pid int)CREATE TABLE domain_publication (did int,pid int)CREATE TABLE cite (cited int,citing int)CREATE TABLE author (aid int,homepage varchar,name varchar,oid int)CREATE TABLE domain_author (aid int,did int)CREATE TABLE domain_conference (cid int,did int)CREATE TABLE publicati...
SELECT publication.title FROM author, journal, organization, publication, writes WHERE journal.name = 'PVLDB' AND organization.name = 'University of Michigan' AND organization.oid = author.oid AND publication.jid = journal.jid AND publication.year > 2000 AND writes.aid = author.aid AND writes.pid = publication.pid
What venue was the 2000 AFC Asian Cup qualification held at?
CREATE TABLE table_61439 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Venue" FROM table_61439 WHERE "Competition" = '2000 afc asian cup qualification'