table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_name_37 ( venue VARCHAR, kitmaker VARCHAR, team VARCHAR )
Which Venue has a Kitmaker of lotto, and a Team of apoel?
SELECT venue FROM table_name_37 WHERE kitmaker = "lotto" AND team = "apoel"
CREATE TABLE table_47119 ( "Senator" text, "Party" text, "District" real, "Home Town" text, "Took Office" real )
What is the lowest Took Office, when Senator is Eddie Bernice Johnson, and when District is greater than 23?
SELECT MIN("Took Office") FROM table_47119 WHERE "Senator" = 'eddie bernice johnson' AND "District" > '23'
CREATE TABLE table_name_98 ( f_laps VARCHAR, final_placing VARCHAR, podiums VARCHAR, season VARCHAR )
Which F/Laps has Podiums of 1, and a Season of 2000, and a Final Placing of nc?
SELECT f_laps FROM table_name_98 WHERE podiums = "1" AND season = 2000 AND final_placing = "nc"
CREATE TABLE table_34633 ( "Spacecraft" text, "Destination" text, "Launched" text, "Closest approach" text, "Time elapsed" text )
What Launched has both a Spacecraft of Ulysses and 491 days (1 yr, 4 mo, 3 d) as Time elapsed?
SELECT "Launched" FROM table_34633 WHERE "Spacecraft" = 'ulysses' AND "Time elapsed" = '491 days (1 yr, 4 mo, 3 d)'
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 ) CRE...
Which course author teaches the 'advanced database' course? Give me his or her login name.
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"
CREATE TABLE person ( name text, age number, city text, gender text, job text ) CREATE TABLE personfriend ( name text, friend text, year number )
How many type of jobs do they have?
SELECT COUNT(DISTINCT job) FROM person
CREATE TABLE table_11447995_2 ( liscumb VARCHAR, gauthier VARCHAR )
What is the Liscumb when Gauthier is 34?
SELECT liscumb FROM table_11447995_2 WHERE gauthier = "34"
CREATE TABLE table_name_73 ( points VARCHAR, class VARCHAR, rank VARCHAR )
How many points did ginger have when she was ranked 5th on a 350cc class bike?
SELECT COUNT(points) FROM table_name_73 WHERE class = "350cc" AND rank = "5th"
CREATE TABLE table_name_67 ( away_team VARCHAR, home_team VARCHAR )
What away team has tottenham hotspur as the home team?
SELECT away_team FROM table_name_67 WHERE home_team = "tottenham hotspur"
CREATE TABLE table_26218783_6 ( points VARCHAR, player VARCHAR )
How many times is player Stanislas Wawrinka on the list?
SELECT COUNT(points) AS defending FROM table_26218783_6 WHERE player = "Stanislas Wawrinka"
CREATE TABLE table_14408 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
Name the opponent for august 26
SELECT "Opponent" FROM table_14408 WHERE "Date" = 'august 26'
CREATE TABLE table_name_16 ( no_result VARCHAR, wins VARCHAR, losses VARCHAR, played VARCHAR )
Name the total number of no result for losses more than 1 and played of 38 and wins less than 19
SELECT COUNT(no_result) FROM table_name_16 WHERE losses > 1 AND played = 38 AND wins < 19
CREATE TABLE table_name_28 ( to_par VARCHAR, player VARCHAR, total VARCHAR )
What is the total number of To Par, when Player is 'Julius Boros', and when Total is greater than 295?
SELECT COUNT(to_par) FROM table_name_28 WHERE player = "julius boros" AND total > 295
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 )
which team did not have more than 16 wins ?
SELECT "school" FROM table_203_412 WHERE "record (conference)" <= 16
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 re...
Return a scatter chart about the correlation between People_ID and Weight .
SELECT People_ID, Weight FROM people
CREATE TABLE table_name_15 ( partner VARCHAR, opponents_in_the_final VARCHAR )
Tell me the partner for opponents of anamika bhargava sylvia krywacz
SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz"
CREATE TABLE table_26427332_17 ( measurements__in_cm_ VARCHAR, city VARCHAR )
what measurement does the contestant from sindelfingen have?
SELECT measurements__in_cm_ FROM table_26427332_17 WHERE city = "Sindelfingen"
CREATE TABLE table_77928 ( "Round" real, "Pick" real, "Player" text, "Position" text, "Nationality" text, "Team" text, "College" text )
What is the lowest pick number for players from king's (ny)?
SELECT MIN("Pick") FROM table_77928 WHERE "College" = 'king''s (ny)'
CREATE TABLE table_11658094_3 ( joined VARCHAR, location VARCHAR )
What year did the school from mars hill, north carolina join?
SELECT joined FROM table_11658094_3 WHERE location = "Mars Hill, North Carolina"
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(...
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.
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)
CREATE TABLE table_name_63 ( a_score VARCHAR, nation VARCHAR, t_score VARCHAR )
What was the total number of A scores for Japan when the T score was more than 4?
SELECT COUNT(a_score) FROM table_name_63 WHERE nation = "japan" AND t_score > 4
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 TA...
Does ANAT 403 work for ULCS ?
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%'
CREATE TABLE table_21756039_1 ( regular_season_results VARCHAR, year VARCHAR )
What is the regular season results for the year 2011-2012?
SELECT regular_season_results FROM table_21756039_1 WHERE year = "2011-2012"
CREATE TABLE table_name_57 ( home_team VARCHAR )
What is the home team's score for north melbourne?
SELECT home_team AS score FROM table_name_57 WHERE home_team = "north melbourne"
CREATE TABLE table_name_44 ( date VARCHAR, surface VARCHAR )
Which date has a Surface of carpet (i)?
SELECT date FROM table_name_44 WHERE surface = "carpet (i)"
CREATE TABLE table_name_47 ( riding VARCHAR, rank VARCHAR )
What is the Riding, when the Rank is 4th?
SELECT riding FROM table_name_47 WHERE rank = "4th"
CREATE TABLE table_name_29 ( points_difference VARCHAR, points VARCHAR )
I want the points difference for points of 14
SELECT points_difference FROM table_name_29 WHERE points = 14
CREATE TABLE table_name_88 ( Id VARCHAR )
What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?
SELECT 1994 FROM table_name_88 WHERE 1993 = "grand slam tournaments"
CREATE TABLE table_name_47 ( lane INTEGER, semi VARCHAR )
Which lane did the athlete swim in who had a semi-final time of 49.19?
SELECT MIN(lane) FROM table_name_47 WHERE semi = 49.19
CREATE TABLE table_63470 ( "Draw" real, "Language" text, "Artist" text, "English translation" text, "Place" real, "Points" real )
How many points does mia martini have?
SELECT COUNT("Points") FROM table_63470 WHERE "Artist" = 'mia martini'
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 ) ...
how many patients stayed in hospital for more than 17 days and underwent right and left cardiac catheterization?
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"
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 t...
Give the number of patients whose primary disease is cerebral aneurysm/sda and were admitted before the year 2200.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CEREBRAL ANEURYSM/SDA" AND demographic.admityear < "2200"
CREATE TABLE table_203_747 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
what is the total number of medals that india won in the asian youth games ?
SELECT "total" FROM table_203_747 WHERE "nation" = 'india'
CREATE TABLE table_56756 ( "Round" real, "Pick" real, "Name" text, "Position" text, "School" text )
Who is the person from round 8?
SELECT "Name" FROM table_56756 WHERE "Round" = '8'
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 )
what was the drawn when the tries for was 46?
SELECT "Drawn" FROM table_17806 WHERE "Tries for" = '46'
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, instruc...
What 's my current GPA ?
SELECT DISTINCT total_gpa FROM student WHERE student_id = 1
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...
A bar chart showing the average price of each cinema, and sort names in ascending order.
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
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 cine...
Return a bar chart on what are the title and maximum price of each film?, display x-axis in asc order.
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
CREATE TABLE table_27744 ( "Rd." text, "Event" text, "Circuit" text, "City / State" text, "Date" text, "Championship" text, "Challenge" text, "Production" text )
Who made the challenge in the Australian Grand Prix?
SELECT "Challenge" FROM table_27744 WHERE "Event" = 'Australian Grand Prix'
CREATE TABLE table_name_97 ( attendance VARCHAR, final VARCHAR )
What was the attendance for the final quarter (1)?
SELECT attendance FROM table_name_97 WHERE final = "quarter (1)"
CREATE TABLE table_26686908_2 ( production VARCHAR, rd VARCHAR )
How many productions are shown for rd 2?
SELECT COUNT(production) FROM table_26686908_2 WHERE rd = "Rd 2"
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 t...
Calculate the minimum age of unmarried patients who have pituitary bleed as their primary disease.
SELECT MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "PITUITARY BLEED"
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 ...
can i have a list of all the thursday flights from BALTIMORE to ATLANTA that leave after 1300
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...
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 ( ...
A pie chart for what are the number of the descriptions of the service types with product price above 100?
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
CREATE TABLE table_name_97 ( bahia VARCHAR, northeast_total VARCHAR )
What is the value for Bahia when the Northeast total was 6747013?
SELECT bahia FROM table_name_97 WHERE northeast_total = "6747013"
CREATE TABLE table_28513 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Nickname" text, "Joined" text )
what type was joined in 1902 5?
SELECT "Type" FROM table_28513 WHERE "Joined" = '1902 5'
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, ...
Show the total number of passengers of each location in a bar chart.
SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location
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 ...
on last month/05, what was the average value of the heart rate of patient 27703?
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...
CREATE TABLE table_23014685_1 ( place_ VARCHAR, _date VARCHAR, area_damaged VARCHAR )
What was the place and date that the Apartments area was damaged?
SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = "Apartments area"
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,...
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?
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"
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 swimme...
Bar graph to show meter_100 from different meter 400
SELECT meter_400, meter_100 FROM swimmer
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...
Give me a histogram to show the date and the amount for all the payments processed with Visa.
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
CREATE TABLE table_name_34 ( earnings_per_share__ INTEGER, ebit__us_$m_ VARCHAR, year_to_april VARCHAR, revenue__us_$million_ VARCHAR )
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?
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
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 TA...
Is there a project in class 545 ?
SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 545
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_proje...
What is the frequency with which SI 644 has been offered ?
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
CREATE TABLE table_name_85 ( played INTEGER, lost INTEGER )
What is the lowest played with a lost bigger than 10?
SELECT MIN(played) FROM table_name_85 WHERE lost > 10
CREATE TABLE table_23988 ( "Rd." real, "Race Title" text, "Circuit" text, "Location" text, "Date" text, "Format" text, "Winner" text, "Team" text, "Report" text )
Was the result of the supercheap auto bathurst 1000 reported?
SELECT "Report" FROM table_23988 WHERE "Race Title" = 'Supercheap Auto Bathurst 1000'
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 TA...
what would be patient 013-12480's monthly average weight since 115 months ago?
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...
CREATE TABLE table_60581 ( "Year (Ceremony)" text, "Original title" text, "Film title used in nomination" text, "Director" text, "Result" text )
What year has a original title of 'el tinte de la fama'?
SELECT "Year (Ceremony)" FROM table_60581 WHERE "Original title" = 'el tinte de la fama'
CREATE TABLE table_74982 ( "Year" real, "Class" text, "Team" text, "Points" real, "Wins" real )
Which highest wins number had Kawasaki as a team, 95 points, and a year prior to 1981?
SELECT MAX("Wins") FROM table_74982 WHERE "Team" = 'kawasaki' AND "Points" = '95' AND "Year" < '1981'
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, ...
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.
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country
CREATE TABLE table_36827 ( "Title" text, "Genre" text, "C=64" text, "ZX Spectrum" text, "Others" text, "Year" real, "Format" text )
How many years have a Title of kriegspiel?
SELECT COUNT("Year") FROM table_36827 WHERE "Title" = 'kriegspiel'
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 ( ...
what is drug name and drug route of drug code epo2i?
SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "EPO2I"
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 t...
show me all flights from KANSAS CITY to CHICAGO on 6 16 arriving around 7 o'clock in the evening
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...
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 )
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.
SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
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 )
How many years was he car number 92?
SELECT COUNT("Speed rank") FROM table_22183 WHERE "Car number" = '92'
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 t...
what is the average age of female patients diagnosed primarily for celo-vessicle fistula?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CELO-VESSICLE FISTULA"
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 Suggeste...
find candidates for Revival badge. find questions older than 30 days which have no answers
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...
CREATE TABLE table_name_59 ( play VARCHAR, base VARCHAR, company VARCHAR )
What is the Athens Base play with Dance Theatre Roes Company?
SELECT play FROM table_name_59 WHERE base = "athens" AND company = "dance theatre roes"
CREATE TABLE table_13083 ( "Date (dd.mm.yyyy)" text, "Soviet Unit" text, "Aircraft flown" text, "Enemy Aircraft" text, "Axis Unit" text )
What was the enemy aircraft on 14.09.1942, when the Soviet Unit was 437 iap?
SELECT "Enemy Aircraft" FROM table_13083 WHERE "Soviet Unit" = '437 iap' AND "Date (dd.mm.yyyy)" = '14.09.1942'
CREATE TABLE table_51119 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
Where does Bob Tway Place?
SELECT "Place" FROM table_51119 WHERE "Player" = 'bob tway'
CREATE TABLE table_name_84 ( opponents VARCHAR, date VARCHAR, score VARCHAR, competition VARCHAR )
Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?
SELECT opponents FROM table_name_84 WHERE score = "2-1" AND competition = "pl" AND date = "december 22, 2006"
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 )
Name the total numbe rof years for gaby weissen mireille kosmala
SELECT COUNT("Year") FROM table_6543 WHERE "Women's doubles" = 'gaby weissen mireille kosmala'
CREATE TABLE table_name_29 ( played VARCHAR, goal_difference VARCHAR, club VARCHAR )
Which Played number had a goal difference of more than 0 when the club was Valencia CF?
SELECT COUNT(played) FROM table_name_29 WHERE goal_difference > 0 AND club = "valencia cf"
CREATE TABLE table_name_96 ( nationality VARCHAR, player VARCHAR, position VARCHAR )
What was the nationality of five-eighth player Darren Lockyer?
SELECT nationality FROM table_name_96 WHERE player = "darren lockyer" AND position = "five-eighth"
CREATE TABLE table_name_42 ( weight VARCHAR, club VARCHAR )
What is the weight of the player from the vk primorac kotor club?
SELECT weight FROM table_name_42 WHERE club = "vk primorac kotor"
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 )
what was the average number of assists in league one ?
SELECT AVG("league one") FROM table_204_575
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 )
What is the team with the date of vacancy 8 dec 2010?
SELECT "Team" FROM table_29477 WHERE "Date of vacancy" = '8 Dec 2010'
CREATE TABLE table_name_30 ( pages INTEGER, vol__number VARCHAR, isbn VARCHAR )
How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have?
SELECT SUM(pages) FROM table_name_30 WHERE vol__number < 8 AND isbn = "1-40122-892-5"
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 n...
Find the city that hosted some events in the most recent year. What is the id of this city?
SELECT host_city FROM hosting_city ORDER BY year DESC LIMIT 1
CREATE TABLE table_22670216_1 ( location VARCHAR, winning_driver VARCHAR, track VARCHAR )
If the track is the Wisconsin State Fair Park Speedway and the winning driver is Wally Dallenbach, what was the location?
SELECT location FROM table_22670216_1 WHERE winning_driver = "Wally Dallenbach" AND track = "Wisconsin State Fair Park Speedway"
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 ( ...
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?
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...
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, ...
What is the total number of clubs?
SELECT COUNT(*) FROM club
CREATE TABLE table_26352332_4 ( years_produced VARCHAR, cylinder_layout VARCHAR )
The cylinder layout v8 is produced in what years?
SELECT years_produced FROM table_26352332_4 WHERE cylinder_layout = "V8"
CREATE TABLE table_17616 ( "Rank" real, "Fastest time (s)" text, "Wind (m/s)" text, "Athlete" text, "Nation" text, "Date" text, "Location" text )
What is the athlete from Edwardsville?
SELECT "Athlete" FROM table_17616 WHERE "Location" = 'Edwardsville'
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, ...
How many patients who had incision of vessel (aorta) have an unspecified death status?
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"
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 )
What is the original air date of the episode with the title 'Monica Wilder'?
SELECT "Original air date" FROM table_28789 WHERE "Title" = 'Monica Wilder'
CREATE TABLE table_66220 ( "Round" real, "Pick #" real, "Player" text, "Position" text, "College" text )
what is the round when the pick # is less than 236 and the position is offensive guard?
SELECT AVG("Round") FROM table_66220 WHERE "Pick #" < '236' AND "Position" = 'offensive guard'
CREATE TABLE table_name_10 ( team__number2 VARCHAR )
Tell me the 1st leg for antwerp bc
SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc"
CREATE TABLE table_13383 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
Which artist speaks croatian?
SELECT "Artist" FROM table_13383 WHERE "Language" = 'croatian'
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...
How many professors teach AAPTIS 838 in Winter 2006 ?
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...
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...
Active Meta Stack Overflow Users.
SELECT COUNT(*) FROM Users WHERE LastAccessDate >= '2018-07-26'
CREATE TABLE table_name_76 ( metacritic VARCHAR, gamerankings VARCHAR, year_released VARCHAR, platform VARCHAR )
What is the Metacritic released after 2005, with a Platform of playstation 3 and a GameRankings of 84.44%?
SELECT metacritic FROM table_name_76 WHERE year_released > 2005 AND platform = "playstation 3" AND gamerankings = "84.44%"
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, pape...
How many publications were added to the Cell journal this year ?
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
CREATE TABLE table_name_50 ( outcome VARCHAR, surface VARCHAR, score VARCHAR )
Which outcome has a Surface of clay and a Score of 4 6, 7 5, 2 6?
SELECT outcome FROM table_name_50 WHERE surface = "clay" AND score = "4–6, 7–5, 2–6"
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 ) C...
how many patients whose discharge location is left against medical advi and diagnoses short title is blood in stool?
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"
CREATE TABLE table_54593 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" real )
How many attended tie number 1?
SELECT SUM("Attendance") FROM table_54593 WHERE "Tie no" = '1'
CREATE TABLE table_48149 ( "Missouri vs." text, "Overall Record" text, "at Columbia" text, "at Opponent's Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "Since Joining SEC" text )
What's the opponent's venue result when the opponent is tennessee?
SELECT "at Opponent's Venue" FROM table_48149 WHERE "Missouri vs." = 'tennessee'
CREATE TABLE table_name_47 ( spoofed_title VARCHAR, date VARCHAR )
Which Spoofed title is from February 1998?
SELECT spoofed_title FROM table_name_47 WHERE date = "february 1998"
CREATE TABLE airlines ( alid number, name text, iata text, icao text, callsign text, country text, active text ) CREATE TABLE routes ( rid number, dst_apid number, dst_ap text, src_apid number, src_ap text, alid number, airline text, codeshare text ) CREATE ...
What is the total number of airlines?
SELECT COUNT(*) FROM airlines