answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT pole_position FROM table_name_41 WHERE grand_prix = "hungarian grand prix"
What is the pole position of the Hungarian Grand Prix?
CREATE TABLE table_name_41 (pole_position VARCHAR, grand_prix VARCHAR)
SELECT percentage FROM table_22825679_1 WHERE team = "Georgia"
Name the percentage for georgia
CREATE TABLE table_22825679_1 (percentage VARCHAR, team VARCHAR)
SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM course AS COURSEalias1, program_course AS PROGRAM_COURSEalias1 WHERE COURSEalias1.course_id = PROGRAM_COURSEalias1.course_id AND COURSEalias1.department = 'EECS')
What is the class that is the hardest ?
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 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_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 requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) 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 area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar )
SELECT pole_position FROM table_name_27 WHERE grand_prix = "belgian grand prix"
What is the pole position of the Belgian Grand Prix?
CREATE TABLE table_name_27 (pole_position VARCHAR, grand_prix VARCHAR)
SELECT overall_record FROM table_22825679_1 WHERE road_record = "4-3"
Name the overall record for road record being 4-3
CREATE TABLE table_22825679_1 (overall_record VARCHAR, road_record VARCHAR)
SELECT MAX("Attendance") FROM table_12603 WHERE "Date" = 'december 23'
What was the highest attendance on December 23?
CREATE TABLE table_12603 ( "Date" text, "Opponent" text, "Score" text, "Decision" text, "Attendance" real, "Record" text )
SELECT grand_prix FROM table_name_50 WHERE fastest_lap = "gerhard berger" AND pole_position = "michael schumacher"
What is the grand prix with Gerhard Berger as the fastest lap and Michael Schumacher as the pole position?
CREATE TABLE table_name_50 (grand_prix VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR)
SELECT COUNT(road_record) FROM table_22825679_1 WHERE team = "Ole Miss"
Name the number of road record for team ole miss
CREATE TABLE table_22825679_1 (road_record VARCHAR, team VARCHAR)
SELECT "Player" FROM table_10921 WHERE "Hometown" = 'los angeles, ca'
Who has a hometown of los angeles, ca?
CREATE TABLE table_10921 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
SELECT declination___j2000__ FROM table_name_55 WHERE constellation = "ophiuchus" AND apparent_magnitude < 8.6 AND right_ascension___j2000__ = "16h47m14.5s"
Tell me the declination for consellaion of ophiuchus and apparent magnitude less than 8.6 with right ascension of 16h47m14.5s
CREATE TABLE table_name_55 (declination___j2000__ VARCHAR, right_ascension___j2000__ VARCHAR, constellation VARCHAR, apparent_magnitude VARCHAR)
SELECT percentage FROM table_22825679_1 WHERE team = "Ole Miss"
Name the percentage for ole miss
CREATE TABLE table_22825679_1 (percentage VARCHAR, team VARCHAR)
SELECT "Issue date(s)" FROM table_49547 WHERE "Weeks at number one" = '5' AND "Volume:Issue" = '61:17-21'
Which Issue date(s) has a Weeks at number one of 5, and a Volume:Issue of 61:17-21?
CREATE TABLE table_49547 ( "Volume:Issue" text, "Issue date(s)" text, "Weeks at number one" real, "Song" text, "Artist(s)" text )
SELECT right_ascension___j2000__ FROM table_name_2 WHERE object_type = "globular cluster" AND apparent_magnitude = 8.5 AND ngc_number = 6273
Tell me the right ascensuon for object type of globular cluster and apparent magnitude of 8.5 and NGC number of 6273
CREATE TABLE table_name_2 (right_ascension___j2000__ VARCHAR, ngc_number VARCHAR, object_type VARCHAR, apparent_magnitude VARCHAR)
SELECT MAX(blocks) FROM table_22824324_2 WHERE player = "Kendall Gill"
What is the most number of blocks kendall gill had?
CREATE TABLE table_22824324_2 (blocks INTEGER, player VARCHAR)
SELECT date FROM table_name_92 WHERE opposing_teams = "australia" AND against = 12
What day was Australia the opposing team and the against 12?
CREATE TABLE table_name_92 ( date VARCHAR, opposing_teams VARCHAR, against VARCHAR )
SELECT date FROM table_name_4 WHERE home_team = "st kilda"
When was the game played where St Kilda was the home team?
CREATE TABLE table_name_4 (date VARCHAR, home_team VARCHAR)
SELECT MIN(three_pointers) FROM table_22824324_2 WHERE rebounds = 178
What is the lowest number of three pointers in games where the number of rebounds was 178?
CREATE TABLE table_22824324_2 (three_pointers INTEGER, rebounds VARCHAR)
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-180') AND treatment.treatmentname = 'eeg monitoring' AND STRFTIME('%y-%m', treatment.treatmenttime) >= '2105-06') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-180') AND STRFTIME('%y-%m', medication.drugstarttime) >= '2105-06') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid
what is the name of the drug that patient 015-180 was prescribed during the same hospital encounter after having received a eeg monitoring procedure since 06/2105.
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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime 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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT home_team AS score FROM table_name_65 WHERE away_team = "melbourne"
What was the home team score with an away team of Melbourne?
CREATE TABLE table_name_65 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(steals) FROM table_22824324_2 WHERE player = "Andy Kaufmann"
How many steals were the in games that andy kaufmann played?
CREATE TABLE table_22824324_2 (steals VARCHAR, player VARCHAR)
SELECT original_air_date FROM table_28768925_1 WHERE us_viewers__million_ = "8.84"
What date did the episode that had 8.84 million u.s. viewers originally air?
CREATE TABLE table_28768925_1 ( original_air_date VARCHAR, us_viewers__million_ VARCHAR )
SELECT away_team FROM table_name_56 WHERE home_team = "footscray"
Which away team played the home team of Footscray?
CREATE TABLE table_name_56 (away_team VARCHAR, home_team VARCHAR)
SELECT MIN(three_pointers) FROM table_22824324_2 WHERE player = "Kendall Gill"
What is the lowest number of three pointers in games that kendall gill played?
CREATE TABLE table_22824324_2 (three_pointers INTEGER, player VARCHAR)
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_course.category LIKE '%Core%' AND semester.semester IN ('SP', 'SS', 'SU') AND semester.year = 2016
In the Spring or Summer , which courses have the ability to meet the Core requirement ?
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) 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 program_course ( program_id int, course_id int, workload int, category varchar ) 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 area ( course_id int, area varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location 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 instructor ( instructor_id int, name varchar, uniqname 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 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 course_prerequisite ( pre_course_id int, course_id int ) 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 requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar )
SELECT age_on_leaving FROM table_name_43 WHERE political_party = "conservative" AND left_house = "2001"
How old was the conservative party member that left the house in 2001?
CREATE TABLE table_name_43 (age_on_leaving VARCHAR, political_party VARCHAR, left_house VARCHAR)
SELECT COUNT(three_pointers) FROM table_22824324_2 WHERE points = 581
How many games had three pointers where the number of points was 581?
CREATE TABLE table_22824324_2 (three_pointers VARCHAR, points VARCHAR)
SELECT "team" FROM table_203_309 ORDER BY id LIMIT 1
who was the top winner ?
CREATE TABLE table_203_309 ( id number, "team" text, "winners" number, "runners-up" number, "years won" text, "years lost" text )
SELECT MIN(attendance) FROM table_name_21 WHERE points > 14 AND arena = "staples center"
What was the lowest Attendance for the Staples Center Arena when the Points were over 14?
CREATE TABLE table_name_21 (attendance INTEGER, points VARCHAR, arena VARCHAR)
SELECT MAX(episodes) FROM table_22837363_1 WHERE viewers__in_millions_ = "5.74"
What was the highest amount of episodes for the season with 5.74 million viewers?
CREATE TABLE table_22837363_1 (episodes INTEGER, viewers__in_millions_ VARCHAR)
SELECT class FROM table_name_5 WHERE weight = 220
Weight of 220 has what class?
CREATE TABLE table_name_5 ( class VARCHAR, weight VARCHAR )
SELECT leading_scorer FROM table_name_40 WHERE date = "12 january 2008"
Name the leading scorer for 12 january 2008
CREATE TABLE table_name_40 (leading_scorer VARCHAR, date VARCHAR)
SELECT surface FROM table_22834834_3 WHERE score_in_the_final = "6–1, 6–7 (2–7) , 7–6 (7–5) , 7–6 (10–8)"
Which surfaces have the final score of 6–1, 6–7 (2–7) , 7–6 (7–5) , 7–6 (10–8)?
CREATE TABLE table_22834834_3 (surface VARCHAR, score_in_the_final VARCHAR)
SELECT MIN(first_elected) FROM table_1342379_45
What year was someone first elected?
CREATE TABLE table_1342379_45 ( first_elected INTEGER )
SELECT record FROM table_name_4 WHERE date = "21 january 2008"
Name the record for 21 january 2008
CREATE TABLE table_name_4 (record VARCHAR, date VARCHAR)
SELECT COUNT(outcome) FROM table_22834834_3 WHERE score_in_the_final = "7–6 (9–7) , 6–3"
How many outcome have a score of 7–6 (9–7) , 6–3?
CREATE TABLE table_22834834_3 (outcome VARCHAR, score_in_the_final VARCHAR)
SELECT Company, Market_Value FROM company WHERE Main_Industry = 'Banking'
What is the market value of every comapny in the banking industry? Return a pie chart.
CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int )
SELECT date FROM table_name_48 WHERE away_team = "melbourne"
what is the date when the away team is melbourne?
CREATE TABLE table_name_48 (date VARCHAR, away_team VARCHAR)
SELECT outcome FROM table_22834834_3 WHERE score_in_the_final = "6–3, 6–2"
Which outcomes have a final score of 6–3, 6–2?
CREATE TABLE table_22834834_3 (outcome VARCHAR, score_in_the_final VARCHAR)
SELECT name, elevation FROM airports WHERE city = 'New York' ORDER BY elevation
What is the altitude (or elevation) of the airports in the city of New York? Show me a bar chart, order in ascending by the elevation.
CREATE TABLE airports ( apid integer, name text, city text, country text, x real, y real, elevation bigint, iata character varchar(3), icao character varchar(4) ) CREATE TABLE airlines ( alid integer, name text, iata varchar(2), icao varchar(3), callsign text, country text, active varchar(2) ) CREATE TABLE routes ( rid integer, dst_apid integer, dst_ap varchar(4), src_apid bigint, src_ap varchar(4), alid bigint, airline varchar(4), codeshare text )
SELECT home_team AS score FROM table_name_57 WHERE venue = "glenferrie oval"
What is the score for the home team for the venue glenferrie oval?
CREATE TABLE table_name_57 (home_team VARCHAR, venue VARCHAR)
SELECT MAX(year) FROM table_22834834_3 WHERE opponent_in_the_final = "Andre Agassi"
What is the last year that Andre Agassi was the final opponent?
CREATE TABLE table_22834834_3 (year INTEGER, opponent_in_the_final VARCHAR)
SELECT "2002" FROM table_42282 WHERE "2008" = 'career statistics'
What was 2002, when 2008 was, 'career statistics'?
CREATE TABLE table_42282 ( "Tournament" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
SELECT away_team AS score FROM table_name_5 WHERE away_team = "south melbourne"
What was South Melbourne's score when they played as the away team?
CREATE TABLE table_name_5 (away_team VARCHAR)
SELECT COUNT(year) FROM table_22834834_3 WHERE score_in_the_final = "6–3, 6–2"
How many years have a final score of 6–3, 6–2?
CREATE TABLE table_22834834_3 (year VARCHAR, score_in_the_final VARCHAR)
SELECT DISTINCT cite.citingpaperid FROM cite, paper WHERE paper.paperid = cite.citedpaperid GROUP BY cite.citingpaperid HAVING COUNT(DISTINCT cite.citedpaperid) > 5
papers with more than 5 citations
CREATE TABLE field ( fieldid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE venue ( venueid int, venuename varchar )
SELECT crowd FROM table_name_31 WHERE home_team = "north melbourne"
What was the attendance for the North Melbourne's home game?
CREATE TABLE table_name_31 (crowd VARCHAR, home_team VARCHAR)
SELECT championship FROM table_22834834_3 WHERE score_in_the_final = "6–7 (9–11) , 6–4, 7–5, 4–6, 4–6"
Which championship has a final score of 6–7 (9–11) , 6–4, 7–5, 4–6, 4–6?
CREATE TABLE table_22834834_3 (championship VARCHAR, score_in_the_final VARCHAR)
SELECT epoch__utc_ FROM table_206217_2 WHERE periselene__km_ = "5,454.925"
What is every entry for epoch if periselene is 5,454.925?
CREATE TABLE table_206217_2 ( epoch__utc_ VARCHAR, periselene__km_ VARCHAR )
SELECT venue FROM table_name_83 WHERE home_team = "st kilda"
What is the name of the venue where home team st kilda played?
CREATE TABLE table_name_83 (venue VARCHAR, home_team VARCHAR)
SELECT COUNT(year) FROM table_22834834_12 WHERE earnings__$_ = 2254598
How many years had a total earnings amount of 2254598?
CREATE TABLE table_22834834_12 (year VARCHAR, earnings__$_ VARCHAR)
SELECT "Hometown" FROM table_10727 WHERE "Player" = 'thomas tyner'
What's the hometown of thomas tyner?
CREATE TABLE table_10727 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
SELECT home_team AS score FROM table_name_60 WHERE away_team = "carlton"
What is the home team score that played away team carlton?
CREATE TABLE table_name_60 (home_team VARCHAR, away_team VARCHAR)
SELECT MAX(year) FROM table_22834834_12
What is the latest year that data is available for?
CREATE TABLE table_22834834_12 (year INTEGER)
SELECT product_name FROM products GROUP BY product_name HAVING AVG(product_price) < 1000000
Find the product names whose average product price is below 1000000.
CREATE TABLE ref_service_types ( service_type_code text, parent_service_type_code text, service_type_description text ) CREATE TABLE invoices ( invoice_id number, order_id number, payment_method_code text, product_id number, order_quantity text, other_item_details text, order_item_id number ) CREATE TABLE customer_orders ( order_id number, customer_id number, store_id number, order_date time, planned_delivery_date time, actual_delivery_date time, other_order_details text ) CREATE TABLE products ( product_id text, product_name text, product_price number, product_description text, other_product_service_details text ) CREATE TABLE invoice_items ( invoice_item_id number, invoice_id number, order_id number, order_item_id number, product_id number, order_quantity number, other_item_details text ) CREATE TABLE order_items ( order_item_id number, order_id number, product_id number, order_quantity text, other_item_details text ) CREATE TABLE customers ( customer_id text, address_id number, customer_name text, customer_phone text, customer_email_address text, other_details text ) CREATE TABLE performers ( performer_id number, address_id number, customer_name text, customer_phone text, customer_email_address text, other_details text ) CREATE TABLE bookings_services ( order_id number, product_id number ) CREATE TABLE marketing_regions ( marketing_region_code text, marketing_region_name text, marketing_region_descriptrion text, other_details text ) CREATE TABLE services ( service_id number, service_type_code text, workshop_group_id number, product_description text, product_name text, product_price number, other_product_service_details text ) CREATE TABLE bookings ( booking_id number, customer_id number, workshop_group_id text, status_code text, store_id number, order_date time, planned_delivery_date time, actual_delivery_date time, other_order_details text ) CREATE TABLE addresses ( address_id text, line_1 text, line_2 text, city_town text, state_county text, other_details text ) CREATE TABLE stores ( store_id text, address_id number, marketing_region_code text, store_name text, store_phone text, store_email_address text, other_details text ) CREATE TABLE clients ( client_id number, address_id number, customer_email_address text, customer_name text, customer_phone text, other_details text ) CREATE TABLE ref_payment_methods ( payment_method_code text, payment_method_description text ) CREATE TABLE performers_in_bookings ( order_id number, performer_id number ) CREATE TABLE drama_workshop_groups ( workshop_group_id number, address_id number, currency_code text, marketing_region_code text, store_name text, store_phone text, store_email_address text, other_details text )
SELECT ratings FROM table_name_86 WHERE year < 2004 AND lap_by_lap = "mike joy"
When the Year is smaller than 2004, and Mike Joy is the Lap-by-lap, what are the Ratings?
CREATE TABLE table_name_86 (ratings VARCHAR, year VARCHAR, lap_by_lap VARCHAR)
SELECT score_in_the_final FROM table_22834834_2 WHERE year = 1994
What is the score in the final in the year 1994?
CREATE TABLE table_22834834_2 (score_in_the_final VARCHAR, year VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "27" AND prescriptions.drug = "Meropenem"
how many patients whose age is less than 27 and drug name is meropenem?
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 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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT network FROM table_name_90 WHERE lap_by_lap = "bill weber"
Which Network has Bill Weber for the Lap-by-lap?
CREATE TABLE table_name_90 (network VARCHAR, lap_by_lap VARCHAR)
SELECT championship FROM table_22834834_2 WHERE year = 1993
Who is the championship for the year of 1993?
CREATE TABLE table_22834834_2 (championship VARCHAR, year VARCHAR)
SELECT "IHSAA Class (Football)" FROM table_13817 WHERE "Mascot" = 'generals'
What IHSAA football class do the Generals play in?
CREATE TABLE table_13817 ( "School" text, "Mascot" text, "School Corp." text, "Size" real, "IHSAA Class (Football)" text, "Year Joined" text, "Other Conferences" text )
SELECT pre_race_host FROM table_name_87 WHERE lap_by_lap = "mike joy" AND year = 2005
Who was the Pre-Race Host when Mike Joy was the Lap-by-lap in the Year 2005?
CREATE TABLE table_name_87 (pre_race_host VARCHAR, lap_by_lap VARCHAR, year VARCHAR)
SELECT opponent_in_the_final FROM table_22834834_2 WHERE championship = "Frankfurt" AND year < 1993.0
Who is the opponent in the final when frankfurt is championship and the year is less than 1993.0?
CREATE TABLE table_22834834_2 (opponent_in_the_final VARCHAR, championship VARCHAR, year VARCHAR)
SELECT "Taxes From Bracket:" FROM table_22931 WHERE "Percentage of Income Kept:" = '73%'
Name the taxes from brqacket for percentage of income kept being 73%
CREATE TABLE table_22931 ( "Currency Bracket:" text, "Dollars Taxed in Bracket:" text, "Rate:" text, "Taxes From Bracket:" text, "After Tax Income:" text, "Percentage of Income Kept:" text )
SELECT COUNT(year) FROM table_name_7 WHERE ratings = "10.9/23"
How many Years have Ratings of 10.9/23?
CREATE TABLE table_name_7 (year VARCHAR, ratings VARCHAR)
SELECT MIN(year) FROM table_22839669_12 WHERE money_list_rank = 3
In what year was his money list rank 3?
CREATE TABLE table_22839669_12 (year INTEGER, money_list_rank VARCHAR)
SELECT "Club" FROM table_60137 WHERE "Location" = 'thomson, victoria'
Which club is located in Thomson, Victoria?
CREATE TABLE table_60137 ( "Club" text, "Nickname" text, "Location" text, "GFL Premierships" text, "Years in GFL" text )
SELECT home_team AS score FROM table_name_57 WHERE venue = "lake oval"
What is the home team of lake oval's score?
CREATE TABLE table_name_57 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(money_list_rank) FROM table_22839669_12 WHERE year = 2001
What was his money list rank in 2001?
CREATE TABLE table_22839669_12 (money_list_rank INTEGER, year VARCHAR)
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC
For those records from the products and each product's manufacturer, find name and the sum of price , and group by attribute name, and visualize them by a bar chart, I want to order by the total number of price in descending.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT date FROM table_name_18 WHERE venue = "victoria park"
When was victoria park used as a venue?
CREATE TABLE table_name_18 (date VARCHAR, venue VARCHAR)
SELECT MAX(atp_wins) FROM table_22839669_12 WHERE money_list_rank = 4
How many atp wins did he have when his money list rank was 4?
CREATE TABLE table_22839669_12 (atp_wins INTEGER, money_list_rank VARCHAR)
SELECT COUNT("Rank") FROM table_22435 WHERE "Release Date" = '21 October 1992'
How many titles were released on 21 October 1992?
CREATE TABLE table_22435 ( "Rank" real, "Title" text, "Release Date" text, "Franchise" text, "Developer(s)" text, "Platform" text, "Units sold (in Millions)" text )
SELECT date FROM table_name_67 WHERE away_team = "fitzroy"
Which date has an Away team of fitzroy?
CREATE TABLE table_name_67 (date VARCHAR, away_team VARCHAR)
SELECT MAX(total_wins) FROM table_22839669_12
What is the maximum total wins he had for any year?
CREATE TABLE table_22839669_12 (total_wins INTEGER)
SELECT building, COUNT(building) FROM department WHERE budget > (SELECT AVG(budget) FROM department) GROUP BY building ORDER BY COUNT(building) DESC
How many departments whose budget is more than the average budget in each building? Show me a bar chart, and display y axis from high to low order.
CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_number varchar(7), time_slot_id varchar(4) ) CREATE TABLE takes ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), grade varchar(2) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2), end_min numeric(2) ) CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0) ) CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget numeric(12,2) )
SELECT MAX(crowd) FROM table_name_96 WHERE home_team = "carlton"
What is the largest crowd for a Home team of carlton?
CREATE TABLE table_name_96 (crowd INTEGER, home_team VARCHAR)
SELECT district FROM table_228439_4 WHERE successor = "Samuel A. Bridges ( D )"
What district is Samuel A. Bridges ( D ) assigned to as a successor?
CREATE TABLE table_228439_4 (district VARCHAR, successor VARCHAR)
SELECT MIN(yards) FROM table_name_30 WHERE avg = 7 AND long < 7
what is the least yards when the average is 7 and the long is less than 7?
CREATE TABLE table_name_30 ( yards INTEGER, avg VARCHAR, long VARCHAR )
SELECT MIN(crowd) FROM table_name_42 WHERE away_team = "melbourne"
When the Away team is melbourne, what's the lowest Crowd attended?
CREATE TABLE table_name_42 (crowd INTEGER, away_team VARCHAR)
SELECT reason_for_change FROM table_228439_4 WHERE successor = "Richard K. Meade ( D )"
what was the reason Richard K. Meade ( d ) became a successor?
CREATE TABLE table_228439_4 (reason_for_change VARCHAR, successor VARCHAR)
SELECT "Result" FROM table_49440 WHERE "Round" = 'r3'
What is the result the R3 round?
CREATE TABLE table_49440 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Scorers" text )
SELECT home_team AS score FROM table_name_99 WHERE away_team = "essendon"
When the Away team is essendon, what's the Home team score?
CREATE TABLE table_name_99 (home_team VARCHAR, away_team VARCHAR)
SELECT successor FROM table_228439_4 WHERE district = "Massachusetts 8th"
Who is the successor for massachusetts 8th?
CREATE TABLE table_228439_4 (successor VARCHAR, district VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admityear < "2105"
how many female patients are admitted before the year 2105?
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, 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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT date FROM table_name_81 WHERE venue = "brunswick street oval"
If the Venue is brunswick street oval, what date was the game played ?
CREATE TABLE table_name_81 (date VARCHAR, venue VARCHAR)
SELECT opponent FROM table_22847880_2 WHERE record = "11-1"
Name the opponent for 11-1
CREATE TABLE table_22847880_2 (opponent VARCHAR, record VARCHAR)
SELECT finish FROM table_name_79 WHERE win__percentage = ".585"
What was the final rank of the Brewers when they achieved a win percentage of .585?
CREATE TABLE table_name_79 ( finish VARCHAR, win__percentage VARCHAR )
SELECT first FROM table_name_39 WHERE country = "trinidad and tobago" AND last = "hutchinson" AND year < 2004
Name the first for countries of trinidad and tobago for hutchinson for years before 2004
CREATE TABLE table_name_39 (first VARCHAR, year VARCHAR, country VARCHAR, last VARCHAR)
SELECT record FROM table_22847880_2 WHERE opponent = "Kentucky"
Name the record for kentucky
CREATE TABLE table_22847880_2 (record VARCHAR, opponent VARCHAR)
SELECT "Verb meaning" FROM table_44367 WHERE "Part 1" = 'lopen'
what is the verb meaning when the part 1 is lopen?
CREATE TABLE table_44367 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
SELECT sport FROM table_name_40 WHERE country = "canada" AND year = 2004
Name the sport for canada in 2004
CREATE TABLE table_name_40 (sport VARCHAR, country VARCHAR, year VARCHAR)
SELECT opponent_in_the_final FROM table_22839669_1 WHERE score_in_the_final = "3–6, 4–6, 7–5, 4–6"
Who is the opponent in the match with final score 3–6, 4–6, 7–5, 4–6?
CREATE TABLE table_22839669_1 (opponent_in_the_final VARCHAR, score_in_the_final VARCHAR)
SELECT "Rank" FROM table_24138 WHERE "Value world rank" = '7'
When the value world rank is 7, what is the rank?
CREATE TABLE table_24138 ( "Rank" real, "Commodity" text, "Value (Int $1000)" real, "Production (MT)" real, "Quantity world rank" text, "Value world rank" text )
SELECT last FROM table_name_95 WHERE year < 2000 AND sport = "softball"
Name the last for softball before 2000
CREATE TABLE table_name_95 (last VARCHAR, year VARCHAR, sport VARCHAR)
SELECT outcome FROM table_22839669_1 WHERE score_in_the_final = "4–6, 3–6, 2–6"
What was the outcome of the match with score 4–6, 3–6, 2–6?
CREATE TABLE table_22839669_1 (outcome VARCHAR, score_in_the_final VARCHAR)
SELECT Snatch, Total FROM body_builder
Show me about the correlation between Snatch and Total in a scatter chart.
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real )
SELECT SUM(year) FROM table_name_68 WHERE sport = "swimming" AND first = "mike"
Name the sum of year for swimming and first of mike
CREATE TABLE table_name_68 (year INTEGER, sport VARCHAR, first VARCHAR)
SELECT MAX(year) FROM table_22839669_1 WHERE score_in_the_final = "4–6, 3–6, 6–4, 5–7"
What is the most recent year where the final score is 4–6, 3–6, 6–4, 5–7?
CREATE TABLE table_22839669_1 (year INTEGER, score_in_the_final VARCHAR)
SELECT COUNT(goals_against) FROM table_name_97 WHERE played > 34
How many Goals against have Played more than 34?
CREATE TABLE table_name_97 ( goals_against VARCHAR, played INTEGER )
SELECT sport FROM table_name_44 WHERE country = "puerto rico" AND year = 2000
Name the sport for puerto rico and year of 2000
CREATE TABLE table_name_44 (sport VARCHAR, country VARCHAR, year VARCHAR)