instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Who was the coach of the Pandas when their overall record was 20-6-2?
CREATE TABLE table_29289 ("Season" text,"Coach" text,"Conf. Record" text,"Overall" text,"Standings" text,"Postseason" text)
SELECT "Coach" FROM table_29289 WHERE "Overall" = '20-6-2'
in what year the position was the 9th
CREATE TABLE table_31291 ("Season" text,"Level" text,"Division" text,"Section" text,"Position" text,"Movements" text)
SELECT "Season" FROM table_31291 WHERE "Position" = '9th'
Which Venue has a Kitmaker of lotto, and a Team of apoel?
CREATE TABLE table_name_37 (venue VARCHAR,kitmaker VARCHAR,team VARCHAR)
SELECT venue FROM table_name_37 WHERE kitmaker = "lotto" AND team = "apoel"
What is the lowest Took Office, when Senator is Eddie Bernice Johnson, and when District is greater than 23?
CREATE TABLE table_47119 ("Senator" text,"Party" text,"District" real,"Home Town" text,"Took Office" real)
SELECT MIN("Took Office") FROM table_47119 WHERE "Senator" = 'eddie bernice johnson' AND "District" > '23'
Never Met A Question Or Answer They Didn't Like!.
CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE PendingFla...
SELECT u.Id, u.DisplayName, u.Reputation, u.DownVotes, u.UpVotes, u.LastAccessDate FROM Users AS u WHERE u.Reputation >= 3000 AND u.DownVotes = 0 ORDER BY u.Reputation DESC
Which F/Laps has Podiums of 1, and a Season of 2000, and a Final Placing of nc?
CREATE TABLE table_name_98 (f_laps VARCHAR,final_placing VARCHAR,podiums VARCHAR,season VARCHAR)
SELECT f_laps FROM table_name_98 WHERE podiums = "1" AND season = 2000 AND final_placing = "nc"
What Launched has both a Spacecraft of Ulysses and 491 days (1 yr, 4 mo, 3 d) as Time elapsed?
CREATE TABLE table_34633 ("Spacecraft" text,"Destination" text,"Launched" text,"Closest approach" text,"Time elapsed" text)
SELECT "Launched" FROM table_34633 WHERE "Spacecraft" = 'ulysses' AND "Time elapsed" = '491 days (1 yr, 4 mo, 3 d)'
Which course author teaches the 'advanced database' course? Give me his or her login name.
CREATE TABLE course_authors_and_tutors (author_id number,author_tutor_atb text,login_name text,password text,personal_name text,middle_name text,family_name text,gender_mf text,address_line_1 text)CREATE TABLE subjects (subject_id number,subject_name text)CREATE TABLE student_tests_taken (registration_id number,date_te...
SELECT T1.login_name FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database"
How many type of jobs do they have?
CREATE TABLE person (name text,age number,city text,gender text,job text)CREATE TABLE personfriend (name text,friend text,year number)
SELECT COUNT(DISTINCT job) FROM person
What is the Liscumb when Gauthier is 34?
CREATE TABLE table_11447995_2 (liscumb VARCHAR,gauthier VARCHAR)
SELECT liscumb FROM table_11447995_2 WHERE gauthier = "34"
How many points did ginger have when she was ranked 5th on a 350cc class bike?
CREATE TABLE table_name_73 (points VARCHAR,class VARCHAR,rank VARCHAR)
SELECT COUNT(points) FROM table_name_73 WHERE class = "350cc" AND rank = "5th"
What away team has tottenham hotspur as the home team?
CREATE TABLE table_name_67 (away_team VARCHAR,home_team VARCHAR)
SELECT away_team FROM table_name_67 WHERE home_team = "tottenham hotspur"
How many times is player Stanislas Wawrinka on the list?
CREATE TABLE table_26218783_6 (points VARCHAR,player VARCHAR)
SELECT COUNT(points) AS defending FROM table_26218783_6 WHERE player = "Stanislas Wawrinka"
Name the opponent for august 26
CREATE TABLE table_14408 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT "Opponent" FROM table_14408 WHERE "Date" = 'august 26'
Name the total number of no result for losses more than 1 and played of 38 and wins less than 19
CREATE TABLE table_name_16 (no_result VARCHAR,wins VARCHAR,losses VARCHAR,played VARCHAR)
SELECT COUNT(no_result) FROM table_name_16 WHERE losses > 1 AND played = 38 AND wins < 19
What is the total number of To Par, when Player is 'Julius Boros', and when Total is greater than 295?
CREATE TABLE table_name_28 (to_par VARCHAR,player VARCHAR,total VARCHAR)
SELECT COUNT(to_par) FROM table_name_28 WHERE player = "julius boros" AND total > 295
which team did not have more than 16 wins ?
CREATE TABLE table_203_412 (id number,"school" text,"conference" text,"record (conference)" text,"head coach" text,"cws appearances" text,"cws best finish" text,"cws record" text)
SELECT "school" FROM table_203_412 WHERE "record (conference)" <= 16
Return a scatter chart about the correlation between People_ID and Weight .
CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)
SELECT People_ID, Weight FROM people
Tell me the partner for opponents of anamika bhargava sylvia krywacz
CREATE TABLE table_name_15 (partner VARCHAR,opponents_in_the_final VARCHAR)
SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz"
what measurement does the contestant from sindelfingen have?
CREATE TABLE table_26427332_17 (measurements__in_cm_ VARCHAR,city VARCHAR)
SELECT measurements__in_cm_ FROM table_26427332_17 WHERE city = "Sindelfingen"
What is the lowest pick number for players from king's (ny)?
CREATE TABLE table_77928 ("Round" real,"Pick" real,"Player" text,"Position" text,"Nationality" text,"Team" text,"College" text)
SELECT MIN("Pick") FROM table_77928 WHERE "College" = 'king''s (ny)'
What year did the school from mars hill, north carolina join?
CREATE TABLE table_11658094_3 (joined VARCHAR,location VARCHAR)
SELECT joined FROM table_11658094_3 WHERE location = "Mars Hill, North Carolina"
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about the average of employee_id over the hire_date bin hire_date by weekday by a bar chart.
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, AVG(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
What was the total number of A scores for Japan when the T score was more than 4?
CREATE TABLE table_name_63 (a_score VARCHAR,nation VARCHAR,t_score VARCHAR)
SELECT COUNT(a_score) FROM table_name_63 WHERE nation = "japan" AND t_score > 4
Does ANAT 403 work for ULCS ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE...
SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ANAT' AND course.number = 403 AND program_course.category LIKE '%ULCS%'
What is the regular season results for the year 2011-2012?
CREATE TABLE table_21756039_1 (regular_season_results VARCHAR,year VARCHAR)
SELECT regular_season_results FROM table_21756039_1 WHERE year = "2011-2012"
What is the home team's score for north melbourne?
CREATE TABLE table_name_57 (home_team VARCHAR)
SELECT home_team AS score FROM table_name_57 WHERE home_team = "north melbourne"
Which date has a Surface of carpet (i)?
CREATE TABLE table_name_44 (date VARCHAR,surface VARCHAR)
SELECT date FROM table_name_44 WHERE surface = "carpet (i)"
What is the Riding, when the Rank is 4th?
CREATE TABLE table_name_47 (riding VARCHAR,rank VARCHAR)
SELECT riding FROM table_name_47 WHERE rank = "4th"
I want the points difference for points of 14
CREATE TABLE table_name_29 (points_difference VARCHAR,points VARCHAR)
SELECT points_difference FROM table_name_29 WHERE points = 14
What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?
CREATE TABLE table_name_88 (Id VARCHAR)
SELECT 1994 FROM table_name_88 WHERE 1993 = "grand slam tournaments"
Which lane did the athlete swim in who had a semi-final time of 49.19?
CREATE TABLE table_name_47 (lane INTEGER,semi VARCHAR)
SELECT MIN(lane) FROM table_name_47 WHERE semi = 49.19
How many points does mia martini have?
CREATE TABLE table_63470 ("Draw" real,"Language" text,"Artist" text,"English translation" text,"Place" real,"Points" real)
SELECT COUNT("Points") FROM table_63470 WHERE "Artist" = 'mia martini'
how many patients stayed in hospital for more than 17 days and underwent right and left cardiac catheterization?
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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "17" AND procedures.long_title = "Combined right and left heart cardiac catheterization"
Give the number of patients whose primary disease is cerebral aneurysm/sda and were admitted before the year 2200.
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 text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CEREBRAL ANEURYSM/SDA" AND demographic.admityear < "2200"
what is the total number of medals that india won in the asian youth games ?
CREATE TABLE table_203_747 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "total" FROM table_203_747 WHERE "nation" = 'india'
Who is the person from round 8?
CREATE TABLE table_56756 ("Round" real,"Pick" real,"Name" text,"Position" text,"School" text)
SELECT "Name" FROM table_56756 WHERE "Round" = '8'
what was the drawn when the tries for was 46?
CREATE TABLE table_17806 ("Club" text,"Played" text,"Won" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries for" text,"Tries against" text,"Try bonus" text,"Losing bonus" text,"Points" text)
SELECT "Drawn" FROM table_17806 WHERE "Tries for" = '46'
What 's my current GPA ?
CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program_requirement (program_id int...
SELECT DISTINCT total_gpa FROM student WHERE student_id = 1
A bar chart showing the average price of each cinema, and sort names in ascending order.
CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Location text)CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price...
SELECT Name, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name ORDER BY Name
Return a bar chart on what are the title and maximum price of each film?, display x-axis in asc order.
CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_code text)CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price float)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Locatio...
SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title
Who made the challenge in the Australian Grand Prix?
CREATE TABLE table_27744 ("Rd." text,"Event" text,"Circuit" text,"City / State" text,"Date" text,"Championship" text,"Challenge" text,"Production" text)
SELECT "Challenge" FROM table_27744 WHERE "Event" = 'Australian Grand Prix'
What was the attendance for the final quarter (1)?
CREATE TABLE table_name_97 (attendance VARCHAR,final VARCHAR)
SELECT attendance FROM table_name_97 WHERE final = "quarter (1)"
How many productions are shown for rd 2?
CREATE TABLE table_26686908_2 (production VARCHAR,rd VARCHAR)
SELECT COUNT(production) FROM table_26686908_2 WHERE rd = "Rd 2"
Calculate the minimum age of unmarried patients who have pituitary bleed as their primary disease.
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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "PITUITARY BLEED"
can i have a list of all the thursday flights from BALTIMORE to ATLANTA that leave after 1300
CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE code_description (code varchar,description text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_c...
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 ((date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
A pie chart for what are the number of the descriptions of the service types with product price above 100?
CREATE TABLE Bookings (Booking_ID INTEGER,Customer_ID INTEGER,Workshop_Group_ID VARCHAR(100),Status_Code CHAR(15),Store_ID INTEGER,Order_Date DATETIME,Planned_Delivery_Date DATETIME,Actual_Delivery_Date DATETIME,Other_Order_Details VARCHAR(255))CREATE TABLE Order_Items (Order_Item_ID INTEGER,Order_ID INTEGER,Product_ID...
SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description
What is the value for Bahia when the Northeast total was 6747013?
CREATE TABLE table_name_97 (bahia VARCHAR,northeast_total VARCHAR)
SELECT bahia FROM table_name_97 WHERE northeast_total = "6747013"
what type was joined in 1902 5?
CREATE TABLE table_28513 ("Institution" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real,"Nickname" text,"Joined" text)
SELECT "Type" FROM table_28513 WHERE "Joined" = '1902 5'
Show the total number of passengers of each location in a bar chart.
CREATE TABLE train_station (Train_ID int,Station_ID int)CREATE TABLE train (Train_ID int,Name text,Time text,Service text)CREATE TABLE station (Station_ID int,Name text,Annual_entry_exit real,Annual_interchanges real,Total_Passengers real,Location text,Main_Services text,Number_of_Platforms int)
SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location
on last month/05, what was the average value of the heart rate of patient 27703?
CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icus...
SELECT AVG(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 = 27703)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hear...
What was the place and date that the Apartments area was damaged?
CREATE TABLE table_23014685_1 (place_ VARCHAR,_date VARCHAR,area_damaged VARCHAR)
SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = "Apartments area"
what is the number of patients whose insurance is private and procedure long title is other closed [endoscopic] biopsy of biliary duct or sphincter of oddi?
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 diagnoses (subject_id text,hadm_id tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi"
Bar graph to show meter_100 from different meter 400
CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)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 swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te...
SELECT meter_400, meter_100 FROM swimmer
Give me a histogram to show the date and the amount for all the payments processed with Visa.
CREATE TABLE Settlements (Settlement_ID INTEGER,Claim_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER,Customer_Policy_ID INTEGER)CREATE TABLE Customers (Customer_ID INTEGER,Customer_Details VARCHAR(255))CREATE TABLE Customer_Policies (Policy_ID INTEGER,Customer_ID I...
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
Count the Earnings per share ( ) in April smaller than 2012, a Revenue (US $million) of 432.6 and a EBIT (US $m) smaller than 150.5?
CREATE TABLE table_name_34 (earnings_per_share__ INTEGER,ebit__us_$m_ VARCHAR,year_to_april VARCHAR,revenue__us_$million_ VARCHAR)
SELECT SUM(earnings_per_share__) AS ¢_ FROM table_name_34 WHERE year_to_april < 2012 AND revenue__us_$million_ = 432.6 AND ebit__us_$m_ < 150.5
Is there a project in class 545 ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE...
SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 545
What is the frequency with which SI 644 has been offered ?
CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch...
SELECT COUNT(DISTINCT course_offering.offering_id) FROM course, course_offering WHERE course.course_id = course_offering.course_id AND course.department = 'SI' AND course.number = 644
What is the lowest played with a lost bigger than 10?
CREATE TABLE table_name_85 (played INTEGER,lost INTEGER)
SELECT MIN(played) FROM table_name_85 WHERE lost > 10
Was the result of the supercheap auto bathurst 1000 reported?
CREATE TABLE table_23988 ("Rd." real,"Race Title" text,"Circuit" text,"Location" text,"Date" text,"Format" text,"Winner" text,"Team" text,"Report" text)
SELECT "Report" FROM table_23988 WHERE "Race Title" = 'Supercheap Auto Bathurst 1000'
what would be patient 013-12480's monthly average weight since 115 months ago?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid numb...
SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-12480') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-115 month') GROUP BY STRFTIM...
What year has a original title of 'el tinte de la fama'?
CREATE TABLE table_60581 ("Year (Ceremony)" text,"Original title" text,"Film title used in nomination" text,"Director" text,"Result" text)
SELECT "Year (Ceremony)" FROM table_60581 WHERE "Original title" = 'el tinte de la fama'
Which highest wins number had Kawasaki as a team, 95 points, and a year prior to 1981?
CREATE TABLE table_74982 ("Year" real,"Class" text,"Team" text,"Points" real,"Wins" real)
SELECT MAX("Wins") FROM table_74982 WHERE "Team" = 'kawasaki' AND "Points" = '95' AND "Year" < '1981'
Show the countries that have managers of age above 50 or below 46, and count them by a bar chart, and sort in ascending by the bar.
CREATE TABLE manager (Manager_ID int,Name text,Country text,Working_year_starts text,Age int,Level int)CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE train (Train_ID int,Train_Num text,Name text,From text,Arrival text,Railway_ID int)CREATE TABLE railway (Railway_ID int,Railway te...
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country
How many years have a Title of kriegspiel?
CREATE TABLE table_36827 ("Title" text,"Genre" text,"C=64" text,"ZX Spectrum" text,"Others" text,"Year" real,"Format" text)
SELECT COUNT("Year") FROM table_36827 WHERE "Title" = 'kriegspiel'
what is drug name and drug route of drug code epo2i?
CREATE TABLE procedures (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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "EPO2I"
show me all flights from KANSAS CITY to CHICAGO on 6 16 arriving around 7 o'clock in the evening
CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE month (month_number int,month_name text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE ...
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 (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 16 AND date_day.month_number = 6 AND date_day.year = 19...
For those records from the products and each product's manufacturer, show me about the correlation between code and code , and group by attribute headquarter in a scatter chart.
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 T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
How many years was he car number 92?
CREATE TABLE table_22183 ("Year" real,"Car number" real,"Start" real,"Qual. speed" text,"Speed rank" real,"Finish" real,"Laps completed" real,"Laps led" real,"Race status" text,"Chassis" text)
SELECT COUNT("Speed rank") FROM table_22183 WHERE "Car number" = '92'
what is the average age of female patients diagnosed primarily for celo-vessicle fistula?
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 AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CELO-VESSICLE FISTULA"
find candidates for Revival badge. find questions older than 30 days which have no answers
CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,R...
SELECT Id AS "post_link", Score, ViewCount AS Views, AnswerCount AS Answers, CreationDate, Tags FROM Posts WHERE AcceptedAnswerId IS NULL AND PostTypeId = 1 AND CreationDate < CURRENT_TIMESTAMP() - 30 AND ClosedDate IS NULL AND NOT EXISTS(SELECT * FROM Posts AS p WHERE p.ParentId = Posts.Id AND p.PostTypeId = 2) AND Ta...
What is the Athens Base play with Dance Theatre Roes Company?
CREATE TABLE table_name_59 (play VARCHAR,base VARCHAR,company VARCHAR)
SELECT play FROM table_name_59 WHERE base = "athens" AND company = "dance theatre roes"
What was the enemy aircraft on 14.09.1942, when the Soviet Unit was 437 iap?
CREATE TABLE table_13083 ("Date (dd.mm.yyyy)" text,"Soviet Unit" text,"Aircraft flown" text,"Enemy Aircraft" text,"Axis Unit" text)
SELECT "Enemy Aircraft" FROM table_13083 WHERE "Soviet Unit" = '437 iap' AND "Date (dd.mm.yyyy)" = '14.09.1942'
Where does Bob Tway Place?
CREATE TABLE table_51119 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Place" FROM table_51119 WHERE "Player" = 'bob tway'
Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?
CREATE TABLE table_name_84 (opponents VARCHAR,date VARCHAR,score VARCHAR,competition VARCHAR)
SELECT opponents FROM table_name_84 WHERE score = "2-1" AND competition = "pl" AND date = "december 22, 2006"
Name the total numbe rof years for gaby weissen mireille kosmala
CREATE TABLE table_6543 ("Year" real,"Men's singles" text,"Women's singles" text,"Men's doubles" text,"Women's doubles" text,"Mixed doubles" text)
SELECT COUNT("Year") FROM table_6543 WHERE "Women's doubles" = 'gaby weissen mireille kosmala'
Which Played number had a goal difference of more than 0 when the club was Valencia CF?
CREATE TABLE table_name_29 (played VARCHAR,goal_difference VARCHAR,club VARCHAR)
SELECT COUNT(played) FROM table_name_29 WHERE goal_difference > 0 AND club = "valencia cf"
What was the nationality of five-eighth player Darren Lockyer?
CREATE TABLE table_name_96 (nationality VARCHAR,player VARCHAR,position VARCHAR)
SELECT nationality FROM table_name_96 WHERE player = "darren lockyer" AND position = "five-eighth"
What is the weight of the player from the vk primorac kotor club?
CREATE TABLE table_name_42 (weight VARCHAR,club VARCHAR)
SELECT weight FROM table_name_42 WHERE club = "vk primorac kotor"
what was the average number of assists in league one ?
CREATE TABLE table_204_575 (id number,"place" number,"position" text,"number" number,"name" text,"league one" number,"fa cup" number,"league cup" number,"football league trophy" number,"total" number)
SELECT AVG("league one") FROM table_204_575
What is the team with the date of vacancy 8 dec 2010?
CREATE TABLE table_29477 ("Team" text,"Outgoing head coach" text,"Manner of departure" text,"Date of vacancy" text,"Position in table" real,"Incoming head coach" text,"Date of appointment" text)
SELECT "Team" FROM table_29477 WHERE "Date of vacancy" = '8 Dec 2010'
How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have?
CREATE TABLE table_name_30 (pages INTEGER,vol__number VARCHAR,isbn VARCHAR)
SELECT SUM(pages) FROM table_name_30 WHERE vol__number < 8 AND isbn = "1-40122-892-5"
Find the city that hosted some events in the most recent year. What is the id of this city?
CREATE TABLE city (city_id number,city text,hanzi text,hanyu_pinyin text,regional_population number,gdp number)CREATE TABLE hosting_city (year number,match_id number,host_city text)CREATE TABLE temperature (city_id number,jan number,feb number,mar number,apr number,jun number,jul number,aug number,sep number,oct number...
SELECT host_city FROM hosting_city ORDER BY year DESC LIMIT 1
If the track is the Wisconsin State Fair Park Speedway and the winning driver is Wally Dallenbach, what was the location?
CREATE TABLE table_22670216_1 (location VARCHAR,winning_driver VARCHAR,track VARCHAR)
SELECT location FROM table_22670216_1 WHERE winning_driver = "Wally Dallenbach" AND track = "Wisconsin State Fair Park Speedway"
what is the three most frequent medication that was prescribed in the same month to the patients aged 40s after they had been diagnosed with bone fracture(s) - ribs, since 5 years ago?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - ribs' AND DATETIME(diagnosis.di...
What is the total number of clubs?
CREATE TABLE club (club_id number,name text,region text,start_year text)CREATE TABLE competition_result (competition_id number,club_id_1 number,club_id_2 number,score text)CREATE TABLE competition (competition_id number,year number,competition_type text,country text)CREATE TABLE club_rank (rank number,club_id number,go...
SELECT COUNT(*) FROM club
The cylinder layout v8 is produced in what years?
CREATE TABLE table_26352332_4 (years_produced VARCHAR,cylinder_layout VARCHAR)
SELECT years_produced FROM table_26352332_4 WHERE cylinder_layout = "V8"
What is the athlete from Edwardsville?
CREATE TABLE table_17616 ("Rank" real,"Fastest time (s)" text,"Wind (m/s)" text,"Athlete" text,"Nation" text,"Date" text,"Location" text)
SELECT "Athlete" FROM table_17616 WHERE "Location" = 'Edwardsville'
What year did Miyoshi Umeki make a film?
CREATE TABLE table_51242 ("Year" text,"Name" text,"Film" text,"Role" text,"Status" text)
SELECT "Year" FROM table_51242 WHERE "Name" = 'miyoshi umeki'
How many patients who had incision of vessel (aorta) have an unspecified death status?
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_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Incision of vessel, aorta"
What is the original air date of the episode with the title 'Monica Wilder'?
CREATE TABLE table_28789 ("No." real,"#" real,"Title" text,"Directed by" text,"Written by" text,"Patient Portrayer" text,"Original air date" text,"Production code" text)
SELECT "Original air date" FROM table_28789 WHERE "Title" = 'Monica Wilder'
what is the round when the pick # is less than 236 and the position is offensive guard?
CREATE TABLE table_66220 ("Round" real,"Pick #" real,"Player" text,"Position" text,"College" text)
SELECT AVG("Round") FROM table_66220 WHERE "Pick #" < '236' AND "Position" = 'offensive guard'
Tell me the 1st leg for antwerp bc
CREATE TABLE table_name_10 (team__number2 VARCHAR)
SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc"
Which artist speaks croatian?
CREATE TABLE table_13383 ("Draw" real,"Language" text,"Artist" text,"Song" text,"English translation" text,"Place" real,"Points" real)
SELECT "Artist" FROM table_13383 WHERE "Language" = 'croatian'
How many professors teach AAPTIS 838 in Winter 2006 ?
CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course (course_...
SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'AAPTIS' AND course.number = 838 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.off...
Active Meta Stack Overflow Users.
CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId nu...
SELECT COUNT(*) FROM Users WHERE LastAccessDate >= '2018-07-26'
What is the Metacritic released after 2005, with a Platform of playstation 3 and a GameRankings of 84.44%?
CREATE TABLE table_name_76 (metacritic VARCHAR,gamerankings VARCHAR,year_released VARCHAR,platform VARCHAR)
SELECT metacritic FROM table_name_76 WHERE year_released > 2005 AND platform = "playstation 3" AND gamerankings = "84.44%"
How many publications were added to the Cell journal this year ?
CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename ...
SELECT DISTINCT COUNT(paper.paperid) FROM journal, paper, paperkeyphrase WHERE journal.journalname = 'Cell' AND paper.journalid = journal.journalid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016
Which outcome has a Surface of clay and a Score of 4 6, 7 5, 2 6?
CREATE TABLE table_name_50 (outcome VARCHAR,surface VARCHAR,score VARCHAR)
SELECT outcome FROM table_name_50 WHERE surface = "clay" AND score = "4–6, 7–5, 2–6"
how many patients whose discharge location is left against medical advi and diagnoses short title is blood in stool?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" AND diagnoses.short_title = "Blood in stool"