answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT high_assists FROM table_27712702_7 WHERE game = 9
Who had high assists in game number 9?
CREATE TABLE table_27712702_7 (high_assists VARCHAR, game VARCHAR)
SELECT nation FROM table_name_98 WHERE gold = 0 AND bronze > 0 AND rank = "16"
What is the nation when gold is 0, bronze is more than 0 and rank is 16?
CREATE TABLE table_name_98 ( nation VARCHAR, rank VARCHAR, gold VARCHAR, bronze VARCHAR )
SELECT MAX(appearances) FROM table_24807406_1 WHERE starts = 18
What is the appearance maximum if the starts is 18?
CREATE TABLE table_24807406_1 (appearances INTEGER, starts VARCHAR)
SELECT high_assists FROM table_27712702_7 WHERE location_attendance = "Oklahoma City Arena 17,509"
Who had high assists in the game played at Oklahoma city arena 17,509?
CREATE TABLE table_27712702_7 (high_assists VARCHAR, location_attendance VARCHAR)
SELECT location FROM table_name_42 WHERE record = "1-0"
What was the location of the fight when Sara McMann's record was 1-0?
CREATE TABLE table_name_42 ( location VARCHAR, record VARCHAR )
SELECT name FROM table_2482547_5 WHERE average = "15.89"
What are the names of all the players with an average of 15.89?
CREATE TABLE table_2482547_5 (name VARCHAR, average VARCHAR)
SELECT team FROM table_27712702_7 WHERE date = "November 15"
Which team played on November 15?
CREATE TABLE table_27712702_7 (team VARCHAR, date VARCHAR)
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hematological effect of infection - leukocytosis') AS t1 GROUP BY t1.uniquepid HAVING MIN(t1.diagnosistime) = t1.diagnosistime AND DATETIME(t1.diagnosistime) <= DATETIME(CURRENT_TIME(), '-2 year')) AS t2 JOIN (SELECT patient.uniquepid, patient.patienthealthsystemstayid, patient.hospitaldischargetime FROM patient WHERE patient.hospitaldischargestatus = 'expired') AS t3 ON t2.uniquepid = t3.uniquepid WHERE t2.patienthealthsystemstayid = t3.patienthealthsystemstayid
how many patient have died after they were diagnosed with hematological effect of infection - leukocytosis during the same hospital encounter until 2 years 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 medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time )
SELECT MAX(wickets_taken) FROM table_2482547_5 WHERE name = "Bill Lockwood"
What's the maximum wickets taken by players named Bill Lockwood?
CREATE TABLE table_2482547_5 (wickets_taken INTEGER, name VARCHAR)
SELECT series FROM table_27713030_16 WHERE score = "L 103–112 (OT)"
Which series had a score of l 103–112 (ot)?
CREATE TABLE table_27713030_16 (series VARCHAR, score VARCHAR)
SELECT "9:00" FROM table_35272 WHERE "8:00" = 'dawson''s creek'
What is the 9:00 show that will be aired on the station that airs Dawson's Creek at 8:00?
CREATE TABLE table_35272 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text, "10:30" text )
SELECT team_s_ FROM table_2482547_5 WHERE average = "15.89"
What are all the teams with an average of 15.89?
CREATE TABLE table_2482547_5 (team_s_ VARCHAR, average VARCHAR)
SELECT location_attendance FROM table_27713030_16 WHERE high_assists = "LeBron James (10)"
What was the location and attendance when lebron james (10) had the high assists?
CREATE TABLE table_27713030_16 (location_attendance VARCHAR, high_assists VARCHAR)
SELECT "Writer" FROM table_29106 WHERE "Title" = 'Monica''s Bad Day'
Who wrote 'Monica's bad day'?
CREATE TABLE table_29106 ( "Series #" real, "Season #" real, "Title" text, "Director" text, "Writer" text, "Original air date" text )
SELECT name FROM table_2482547_5 WHERE balls_bowled = 4969
Who are all the players who've bowled more than 4969 balls?
CREATE TABLE table_2482547_5 (name VARCHAR, balls_bowled VARCHAR)
SELECT COUNT(team) FROM table_27713030_16 WHERE high_rebounds = "Chris Bosh , LeBron James (8)"
How many teams were there when chris bosh , lebron james (8) had the high rebounds?
CREATE TABLE table_27713030_16 (team VARCHAR, high_rebounds VARCHAR)
SELECT COUNT(*) FROM table_203_250 WHERE "type" = 'irregular'
what number of irregular types are there ?
CREATE TABLE table_203_250 ( id number, "name" text, "type" text, "r.a. (j2000)" text, "dec. (j2000)" text, "redshift (km/s)" text, "apparent magnitude" number )
SELECT average FROM table_2482547_5 WHERE wickets_taken = 212
What are the averages for games with 212 wickets taken?
CREATE TABLE table_2482547_5 (average VARCHAR, wickets_taken VARCHAR)
SELECT high_assists FROM table_27712702_9 WHERE date = "January 17"
Who led in assists on January 17, and with how many?
CREATE TABLE table_27712702_9 (high_assists VARCHAR, date VARCHAR)
SELECT Id AS "suggested_edit_link" FROM SuggestedEdits WHERE OwnerUserId = '##UserId##'
Suggested edits by a specific user.
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text )
SELECT turbine_manufacturer FROM table_24837750_1 WHERE county = "Wheatland"
Who was the turbine manufacturer for the Wheatland county?
CREATE TABLE table_24837750_1 (turbine_manufacturer VARCHAR, county VARCHAR)
SELECT score FROM table_27712702_9 WHERE date = "January 8"
What was the score of the January 8 game?
CREATE TABLE table_27712702_9 (score VARCHAR, date VARCHAR)
SELECT COUNT(DISTINCT patient.patientunitstayid) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-196241') AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
how many times did patient 021-196241 during this year go to the icu?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) 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 diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )
SELECT COUNT(turbine_manufacturer) FROM table_24837750_1 WHERE installed_capacity__mw_ = "189"
How many turbine manufacturers installed a capacity of 189 MW?
CREATE TABLE table_24837750_1 (turbine_manufacturer VARCHAR, installed_capacity__mw_ VARCHAR)
SELECT game FROM table_27713583_8 WHERE date = "January 14"
What game number was on January 14?
CREATE TABLE table_27713583_8 (game VARCHAR, date VARCHAR)
SELECT Country, COUNT(Country) FROM member GROUP BY Country
Give me a pie to show how many country from different country.
CREATE TABLE member ( Member_ID int, Name text, Country text, College_ID int ) CREATE TABLE college ( College_ID int, Name text, Leader_Name text, College_Location text ) CREATE TABLE round ( Round_ID int, Member_ID int, Decoration_Theme text, Rank_in_Round int )
SELECT installed_capacity__mw_ FROM table_24837750_1 WHERE county = "Wheatland"
How much capacity was installed in Wheatland?
CREATE TABLE table_24837750_1 (installed_capacity__mw_ VARCHAR, county VARCHAR)
SELECT date FROM table_27713583_2 WHERE high_assists = "Raymond Felton (4)"
what is the date of the game that the high assists is raymond felton (4)?
CREATE TABLE table_27713583_2 (date VARCHAR, high_assists VARCHAR)
SELECT * FROM table_train_57 WHERE hypotension = 1 AND receiving_vasopressor = 1
hypotension requiring vasopressor therapy, despite fluid resuscitation of at least 30 cc / kg and lactate > 2 mmol / l
CREATE TABLE table_train_57 ( "id" int, "bleeding" int, "in_another_study" bool, "hiv_infection" bool, "hepatitis_c_infection" bool, "receiving_vasopressor" bool, "hypotension" bool, "NOUSE" float )
SELECT turbine_manufacturer FROM table_24837750_1 WHERE date_in_service = "2005"
Who was the turbine manufacturer of the wind farm that started service on 2005?
CREATE TABLE table_24837750_1 (turbine_manufacturer VARCHAR, date_in_service VARCHAR)
SELECT COUNT(high_points) FROM table_27713583_2 WHERE date = "October 17"
How many games were on october 17?
CREATE TABLE table_27713583_2 (high_points VARCHAR, date VARCHAR)
SELECT title FROM table_26448179_4 WHERE production_code = 305
What is the title of the episode with production code 305?
CREATE TABLE table_26448179_4 ( title VARCHAR, production_code VARCHAR )
SELECT date_in_service FROM table_24837750_1 WHERE installed_capacity__mw_ = "135"
When did this wind farm started service with a capacity of 135 MW?
CREATE TABLE table_24837750_1 (date_in_service VARCHAR, installed_capacity__mw_ VARCHAR)
SELECT record FROM table_27713583_2 WHERE team = "@ Minnesota"
What is the record for the game against team @ Minnesota?
CREATE TABLE table_27713583_2 (record VARCHAR, team VARCHAR)
SELECT payment_method_code, party_phone FROM parties WHERE party_email = "enrico09@example.com"
Find the payment method and phone of the party with email 'enrico09@example.com'.
CREATE TABLE organizations ( organization_id number, date_formed time, organization_name text, uk_vat_number text ) CREATE TABLE organization_contact_individuals ( individual_id number, organization_id number, date_contact_from time, date_contact_to time ) CREATE TABLE addresses ( address_id number, line_1_number_building text, town_city text, zip_postcode text, state_province_county text, country text ) CREATE TABLE individuals ( individual_id number, individual_first_name text, individual_middle_name text, inidividual_phone text, individual_email text, individual_address text, individual_last_name text ) CREATE TABLE party_addresses ( party_id number, address_id number, date_address_from time, address_type_code text, date_address_to time ) CREATE TABLE party_forms ( party_id number, form_id number, date_completion_started time, form_status_code text, date_fully_completed time ) CREATE TABLE party_services ( booking_id number, customer_id number, service_id number, service_datetime time, booking_made_date time ) CREATE TABLE parties ( party_id number, payment_method_code text, party_phone text, party_email text ) CREATE TABLE services ( service_id number, service_type_code text, service_name text, service_descriptio text ) CREATE TABLE forms ( form_id number, form_type_code text, service_id number, form_number text, form_name text, form_description text )
SELECT date_in_service FROM table_24837750_1 WHERE county = "Musselshell"
When did the wind farm in Musselshell started service?
CREATE TABLE table_24837750_1 (date_in_service VARCHAR, county VARCHAR)
SELECT date FROM table_27713583_2 WHERE high_points = "Toney Douglas (23)"
What is the date the high points was by toney douglas (23)?
CREATE TABLE table_27713583_2 (date VARCHAR, high_points VARCHAR)
SELECT "NBA Draft" FROM table_58211 WHERE "School" = 'dunbar high school'
What is the NBA draft result of the player from Dunbar High School?
CREATE TABLE table_58211 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
SELECT MAX(attendance) FROM table_24814477_2 WHERE game_site = "Rheinstadion"
What was the largest attendance at the Rheinstadion?
CREATE TABLE table_24814477_2 (attendance INTEGER, game_site VARCHAR)
SELECT COUNT(production_code) FROM table_27713721_1 WHERE us_viewers__millions_ = "25.3"
How many episodes had an audience of exactly 25.3 million viewers in the U.S.A.?
CREATE TABLE table_27713721_1 (production_code VARCHAR, us_viewers__millions_ VARCHAR)
SELECT player FROM table_name_34 WHERE college = "northwestern"
What player belongs to Northwestern College?
CREATE TABLE table_name_34 ( player VARCHAR, college VARCHAR )
SELECT week FROM table_24814477_2 WHERE opponent = "Amsterdam Admirals"
What week did the Galaxy play the Amsterdam Admirals?
CREATE TABLE table_24814477_2 (week VARCHAR, opponent VARCHAR)
SELECT high_points FROM table_27715173_8 WHERE high_assists = "Tim Duncan (5)"
Who had the high points when high assists is tim duncan (5)?
CREATE TABLE table_27715173_8 (high_points VARCHAR, high_assists VARCHAR)
SELECT "opponent" FROM table_204_881 WHERE id = (SELECT id FROM table_204_881 WHERE "opponent" = 'hawthorn') + 1
who was the opponent after hawthorn ?
CREATE TABLE table_204_881 ( id number, "round" number, "date" text, "score" text, "opponent" text, "opponent's score" text, "result" text, "venue" text, "attendance" number, "best on ground" text, "team" text )
SELECT opponent FROM table_24814477_2 WHERE week = 8
Who was the opponent in Week 8?
CREATE TABLE table_24814477_2 (opponent VARCHAR, week VARCHAR)
SELECT date FROM table_27715173_8 WHERE location_attendance = "EnergySolutions Arena 19,911"
what is the date when the location attendance is energysolutions arena 19,911?
CREATE TABLE table_27715173_8 (date VARCHAR, location_attendance VARCHAR)
SELECT "Worcs f-c matches" FROM table_16891 WHERE "Name of ground" = 'Chester Road North Ground'
There were 68 worcs f-c matches played on Chester Road North Ground.
CREATE TABLE table_16891 ( "Name of ground" text, "Location" text, "First-class span" text, "Worcs f-c matches" real, "List A span" text, "Worcs LA matches" real )
SELECT class_a_winner FROM table_24852622_1 WHERE class_c_winner = "David Haynes"
Who was the Class A winner when the Class C winner was David Haynes?
CREATE TABLE table_24852622_1 (class_a_winner VARCHAR, class_c_winner VARCHAR)
SELECT COUNT(high_points) FROM table_27715173_8 WHERE team = "Oklahoma City"
how many times is the team oklahoma city?
CREATE TABLE table_27715173_8 (high_points VARCHAR, team VARCHAR)
SELECT COUNT("location") FROM table_204_558 WHERE "city" = 'algonac'
what is the total number of locations in the city of algonac ?
CREATE TABLE table_204_558 ( id number, "name" text, "location" text, "city" text, "listing date" text )
SELECT class_c_winner FROM table_24852622_1 WHERE round = "8"
Who was the Class C winner in round 8?
CREATE TABLE table_24852622_1 (class_c_winner VARCHAR, round VARCHAR)
SELECT game FROM table_27715173_8 WHERE high_points = "Manu Ginóbili (26)"
what is the game where the high points is by manu ginóbili (26)?
CREATE TABLE table_27715173_8 (game VARCHAR, high_points VARCHAR)
SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN (DERIVED_TABLEalias0.course_id) AND NOT COURSEalias0.course_id IN (SELECT DISTINCT COURSE_PREREQUISITEalias0.course_id FROM course_prerequisite AS COURSE_PREREQUISITEalias0 WHERE NOT COURSE_PREREQUISITEalias0.pre_course_id IN (DERIVED_TABLEalias0.course_id)) AND COURSEalias0.department = 'GREEKMOD' AND COURSEalias0.number = 505 AND SEMESTERalias0.semester = 'Summer' AND SEMESTERalias0.semester_id = COURSE_OFFERINGalias0.semester AND SEMESTERalias0.year = 2003
In Summer 2003 , can I take GREEKMOD 505 ?
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) 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 varchar, allow_audit varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar )
SELECT class_d_winner FROM table_24852622_1 WHERE round = "6"
Who was the Class D winner in round 6?
CREATE TABLE table_24852622_1 (class_d_winner VARCHAR, round VARCHAR)
SELECT location_attendance FROM table_27715173_8 WHERE record = "39–7"
what is the location attendance when the record is 39–7?
CREATE TABLE table_27715173_8 (location_attendance VARCHAR, record VARCHAR)
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 <= 1300 AND flight.departure_time <= 1100) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
i would like to find a flight from PITTSBURGH to BOSTON on wednesday and i have to be in BOSTON by one so i'd like a flight out of here no later than 1100
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) 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 city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int, time_elapsed int, to_airport varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) 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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text )
SELECT circuit FROM table_24852622_1 WHERE round = "2"
What was the circuit in round 2?
CREATE TABLE table_24852622_1 (circuit VARCHAR, round VARCHAR)
SELECT MAX(game) FROM table_27715173_2
What is the maximum basketball game?
CREATE TABLE table_27715173_2 (game INTEGER)
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%William Gehring%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
What are the course numbers Dr. William Gehring is teaching next semester ?
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 varchar, allow_audit varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) 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 requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar )
SELECT round FROM table_24853015_1 WHERE class_d_winner = "Roy Salvadori" AND class_b_winner = "Alan Hutcheson"
In which round did Roy Salvadori won Class D and Alan Hutcheson won Class B?
CREATE TABLE table_24853015_1 (round VARCHAR, class_d_winner VARCHAR, class_b_winner VARCHAR)
SELECT COUNT(high_points) FROM table_27722408_6 WHERE score = "L 87–89 (OT)"
How many entries are shown for high points when the score was l 87–89 (ot)?
CREATE TABLE table_27722408_6 (high_points VARCHAR, score VARCHAR)
SELECT "% 0-19 years" FROM table_4223 WHERE "Quartier" = 'Saint-Loup'
How many o-19% are where the quartier is in saint-loup?
CREATE TABLE table_4223 ( "Quartier" text, "% 0-19 years" text, "% 20-39 years" text, "% 40-59 years" text, "% 60-74 years" text, "% 75 years and +" text )
SELECT date FROM table_24853015_1 WHERE class_b_winner = "Alan Hutcheson" AND round = 1
When did Alan Hutcheson won Class B on round 1?
CREATE TABLE table_24853015_1 (date VARCHAR, class_b_winner VARCHAR, round VARCHAR)
SELECT team FROM table_27722408_6 WHERE game = 11
What was the other team in game 11?
CREATE TABLE table_27722408_6 (team VARCHAR, game VARCHAR)
SELECT COUNT("title") FROM table_204_500 WHERE "year" < 1952
how many singles did kitty wells release before 1952 ?
CREATE TABLE table_204_500 ( id number, "year" number, "title" text, "peak chart positions\nus country" number, "peak chart positions\nus" number, "album" text )
SELECT field_goals FROM table_24850487_5 WHERE player = "Stacey Thomas"
How many field goals did Stacey Thomas have?
CREATE TABLE table_24850487_5 (field_goals VARCHAR, player VARCHAR)
SELECT high_points FROM table_27722408_6 WHERE record = "9–3"
Who scored the high points for the game with record 9–3?
CREATE TABLE table_27722408_6 (high_points VARCHAR, record VARCHAR)
SELECT position FROM table_name_74 WHERE player = "jeff brown"
What position is Jeff Brown?
CREATE TABLE table_name_74 ( position VARCHAR, player VARCHAR )
SELECT MAX(assists) FROM table_24850487_5 WHERE rebounds = 121
How many assists did the player who had 121 rebounds have?
CREATE TABLE table_24850487_5 (assists INTEGER, rebounds VARCHAR)
SELECT date FROM table_27722734_7 WHERE team = "Washington"
Name the date for washington
CREATE TABLE table_27722734_7 (date VARCHAR, team VARCHAR)
SELECT goals FROM table_name_54 WHERE score = "38-28"
Tell me the goals for score of 38-28
CREATE TABLE table_name_54 ( goals VARCHAR, score VARCHAR )
SELECT MIN(field_goals) FROM table_24850487_5 WHERE blocks = 8
How many field goals did the player who had 8 blocks have?
CREATE TABLE table_24850487_5 (field_goals INTEGER, blocks VARCHAR)
SELECT record FROM table_27722734_7 WHERE game = 23
Name the record for 23 game
CREATE TABLE table_27722734_7 (record VARCHAR, game VARCHAR)
SELECT "winner" FROM table_204_48 WHERE "winner" IN ('usa', 'canada') GROUP BY "winner" ORDER BY COUNT(*) DESC LIMIT 1
who won more races , the usa or canada ?
CREATE TABLE table_204_48 ( id number, "date" text, "race name" text, "location" text, "uci rating" text, "winner" text, "team" text )
SELECT MIN(assists) FROM table_24850487_5 WHERE minutes = 863
How many assists did the player who had 863 minutes have?
CREATE TABLE table_24850487_5 (assists INTEGER, minutes VARCHAR)
SELECT MAX(game) FROM table_27722734_7 WHERE date = "December 1"
Name the most game for december 1
CREATE TABLE table_27722734_7 (game INTEGER, date VARCHAR)
SELECT MAX("Winners Group Legs won") FROM table_26758 WHERE "Total money won" = '£21,850'
What is the highest amount of group legs won when the prize money was 21,850?
CREATE TABLE table_26758 ( "Player" text, "Group Legs won" real, "Play-Off Legs won" real, "Winners Group Legs won" real, "Winners Play-Off Legs won" real, "Final position money won*" text, "Total money won" text )
SELECT blocks FROM table_24850487_5 WHERE rebounds = 59
How many blocks did the player who had 59 rebounds have?
CREATE TABLE table_24850487_5 (blocks VARCHAR, rebounds VARCHAR)
SELECT score FROM table_27723526_10 WHERE team = "Portland"
What was the score of the game against portland?
CREATE TABLE table_27723526_10 (score VARCHAR, team VARCHAR)
SELECT AVG(Reputation) AS "average_reputation", COUNT(Id) AS "total_users" FROM Users WHERE LOWER(Location) LIKE '%manchester, united kingdom' AND Reputation > 1
Average Reputation of SO Users n Manchester, United Kingdom.
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean )
SELECT opponent FROM table_24852001_2 WHERE attendance = 16115
Who were the opponents that had an attendance of exactly 16115?
CREATE TABLE table_24852001_2 (opponent VARCHAR, attendance VARCHAR)
SELECT high_assists FROM table_27723526_10 WHERE date = "January 27"
Who had the high assist total on january 27?
CREATE TABLE table_27723526_10 (high_assists VARCHAR, date VARCHAR)
SELECT COUNT(gold) FROM table_name_12 WHERE silver = 1 AND nation = "albania" AND total < 1
Tell me the number of gold for albania with a silver of 1 and total less than 1
CREATE TABLE table_name_12 ( gold VARCHAR, total VARCHAR, silver VARCHAR, nation VARCHAR )
SELECT team_record FROM table_24852001_2 WHERE opponent = "Frankfurt Galaxy"
What was the team record after the Frankfurt Galaxy matchup?
CREATE TABLE table_24852001_2 (team_record VARCHAR, opponent VARCHAR)
SELECT location_attendance FROM table_27733909_9 WHERE game = 70
What is the location and attendance of game 70?
CREATE TABLE table_27733909_9 (location_attendance VARCHAR, game VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "2094" AND diagnoses.short_title = "Anemia in chr kidney dis"
How many patients born before the year 2094 have diagnosis short title anemia in chronic kidney 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 text, admittime text, dischtime text, admityear 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, 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 text, flag text, value_unit text, label text, fluid text )
SELECT game_site FROM table_24852001_2 WHERE opponent = "Frankfurt Galaxy"
What was the game site for the matchup against the Frankfurt Galaxy?
CREATE TABLE table_24852001_2 (game_site VARCHAR, opponent VARCHAR)
SELECT team FROM table_27734577_13 WHERE high_assists = "Josh Smith (8)"
What team was the opponent when josh smith (8) had the high assists?
CREATE TABLE table_27734577_13 (team VARCHAR, high_assists VARCHAR)
SELECT "Club" FROM table_55082 WHERE "National Cup" = 'turkish basketball cup' AND "European Cup" = 'fiba eurochallenge (3rd tier)'
What is the club that has the turkish basketball cup and fiba eurochallenge (3rd tier)?
CREATE TABLE table_55082 ( "Season" text, "Club" text, "National League" text, "National Cup" text, "European Cup" text )
SELECT COUNT(results) FROM table_24865763_2 WHERE circuit = "Algarve" AND gt1_winning_team = "No. 50 Larbre Compétition"
How many results did the GT1 Winning Team No. 50 Larbre Compétition on the Algarve circuit?
CREATE TABLE table_24865763_2 (results VARCHAR, circuit VARCHAR, gt1_winning_team VARCHAR)
SELECT MIN(game) FROM table_27734577_13 WHERE high_assists = "Josh Smith (4)"
What is the game number where josh smith (4) had the high assists?
CREATE TABLE table_27734577_13 (game INTEGER, high_assists VARCHAR)
SELECT SUM(population) FROM table_name_38 WHERE name_of_city = "chimbote"
What is the population of Chimbote?
CREATE TABLE table_name_38 ( population INTEGER, name_of_city VARCHAR )
SELECT COUNT(lmp2_winning_team) FROM table_24865763_2 WHERE gt1_winning_team = "Gabriele Gardel Patrice Goueslard Fernando Rees" AND circuit = "Algarve"
How many winning teams are there on LMP2 if Gabriele Gardel Patrice Goueslard Fernando Rees was the GT1 Winning Team on the Algarve circuit?
CREATE TABLE table_24865763_2 (lmp2_winning_team VARCHAR, gt1_winning_team VARCHAR, circuit VARCHAR)
SELECT series FROM table_27734577_13 WHERE high_rebounds = "Al Horford (10)"
What is the series number when al horford (10) had the high rebounds?
CREATE TABLE table_27734577_13 (series VARCHAR, high_rebounds VARCHAR)
SELECT winning_score FROM table_name_51 WHERE year = 1980
What was the winning score in 1980?
CREATE TABLE table_name_51 ( winning_score VARCHAR, year VARCHAR )
SELECT gt2_winning_team FROM table_24865763_2 WHERE lmp1_winning_team = "Greg Mansell Leo Mansell"
Who was the GT2 Winning Team if Greg Mansell Leo Mansell was the LMP1 Winning Team?
CREATE TABLE table_24865763_2 (gt2_winning_team VARCHAR, lmp1_winning_team VARCHAR)
SELECT team FROM table_27734577_7 WHERE location_attendance = "Philips Arena 12,140"
What is every team with location attendance of Philips Arena 12,140?
CREATE TABLE table_27734577_7 (team VARCHAR, location_attendance VARCHAR)
SELECT premises_type, COUNT(*) FROM premises GROUP BY premises_type
Show each premise type and the number of premises in that type.
CREATE TABLE premises ( premises_type VARCHAR )
SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = "Marc Lieb Richard Lietz"
What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team?
CREATE TABLE table_24865763_2 (rnd INTEGER, gt2_winning_team VARCHAR)
SELECT COUNT(high_points) FROM table_27756014_1 WHERE date = "October 16"
How many games were played on october 16?
CREATE TABLE table_27756014_1 (high_points VARCHAR, date VARCHAR)