answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT "Win #" FROM table_54365 WHERE "Season" = '2004-05'
How many wins were there in 2004-05?
CREATE TABLE table_54365 ( "Season" text, "Winner" text, "Team" text, "Position" text, "Win #" real )
SELECT mult FROM table_name_73 WHERE release_date = "q4 2007" AND model_number = "pentium dual-core t2310"
What is the mult value of the microprocessor with a release date q4 2007 and model number pentium dual-core t2310?
CREATE TABLE table_name_73 (mult VARCHAR, release_date VARCHAR, model_number VARCHAR)
SELECT COUNT(outcome) FROM table_2215159_2 WHERE surface = "Grass" AND partner = "Chuck McKinley" AND year = 1962
How many outcomes were there for matches played with Chuck McKinley on grass in 1962?
CREATE TABLE table_2215159_2 (outcome VARCHAR, year VARCHAR, surface VARCHAR, partner VARCHAR)
SELECT COUNT("Winning Coach") FROM table_26311 WHERE "Top Team in Regular Season (points)" = 'Kansas City Spurs (110 points)'
What is the winning coach total number if the top team in regular season (points) is the Kansas City Spurs (110 points)?
CREATE TABLE table_26311 ( "Year" real, "Winner (number of titles)" text, "Runners-up" text, "Top Team in Regular Season (points)" text, "Top Scorer (points)" text, "Winning Coach" text )
SELECT l2_cache FROM table_name_91 WHERE model_number = "pentium dual-core t3400"
What is the L2 cache of the microprocessor with model number pentium dual-core t3400?
CREATE TABLE table_name_91 (l2_cache VARCHAR, model_number VARCHAR)
SELECT home_leg FROM table_2214582_3 WHERE opponents = "Partizani Tirana"
What was the home leg score against partizani tirana?
CREATE TABLE table_2214582_3 (home_leg VARCHAR, opponents VARCHAR)
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
What are the classes that can be taken as PreMajor next semester ?
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location 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 jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction 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_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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id 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 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_requirement ( program_id int, category varchar, min_credit int, additional_req varchar )
SELECT release_price___usd__ FROM table_name_32 WHERE model_number = "pentium dual-core t2330"
What is the release price (USD) of the microprocessor with a model number pentium dual-core t2330?
CREATE TABLE table_name_32 (release_price___usd__ VARCHAR, model_number VARCHAR)
SELECT COUNT(round) FROM table_2214582_3 WHERE opponents = "FC St. Gallen"
What round did they face fc st. gallen?
CREATE TABLE table_2214582_3 (round VARCHAR, opponents VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Laryngoscopy and other tracheoscopy"
Bring the number of patients who had laryngoscopy and other tracheoscopy procedures.
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_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 )
SELECT date FROM table_name_35 WHERE fastest_lap = "patrick tambay"
What day did Patrick Tambay have the fastest lap?
CREATE TABLE table_name_35 (date VARCHAR, fastest_lap VARCHAR)
SELECT home_leg FROM table_2214582_3 WHERE opponents = "FC Schalke 04"
What was the home leg score against fc schalke 04?
CREATE TABLE table_2214582_3 (home_leg VARCHAR, opponents 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, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND fare_basis.economy = 'YES' AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
can you show me the available flights from BALTIMORE to DALLAS with economy fares
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight 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 month ( month_number int, month_name text ) 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 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 ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) 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 code_description ( code varchar, description 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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_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 compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) 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 )
SELECT pole_position FROM table_name_41 WHERE location = "spa-francorchamps"
Who held the pole position in SPA-Francorchamps?
CREATE TABLE table_name_41 (pole_position VARCHAR, location VARCHAR)
SELECT COUNT(dfb_pokal) FROM table_22167196_1 WHERE player = "Kevin-Prince Boateng"
How many dfb-pokal did kevin-prince boateng have?
CREATE TABLE table_22167196_1 (dfb_pokal VARCHAR, player VARCHAR)
SELECT "Location/Attendance" FROM table_45569 WHERE "Record" = '3-1'
What is the location/attendance of the game with a 3-1 record?
CREATE TABLE table_45569 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location/Attendance" text, "Record" text )
SELECT constructor FROM table_name_24 WHERE location = "long beach"
Who was the Long Beach constructor?
CREATE TABLE table_name_24 (constructor VARCHAR, location VARCHAR)
SELECT head_coach FROM table_22165661_3 WHERE championship_game_opponent = "Miami University"
Who is the head coach when Miami University is the championship game opponent?
CREATE TABLE table_22165661_3 (head_coach VARCHAR, championship_game_opponent VARCHAR)
SELECT T2.Name, COUNT(T2.Name) FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID GROUP BY T2.Name ORDER BY COUNT(T2.Name)
Show the number of cities in each country with a bar chart, sort in asc by the Y please.
CREATE TABLE city ( City_ID int, County_ID int, Name text, White real, Black real, Amerindian real, Asian real, Multiracial real, Hispanic real ) CREATE TABLE county_public_safety ( County_ID int, Name text, Population int, Police_officers int, Residents_per_officer int, Case_burden int, Crime_rate real, Police_force text, Location text )
SELECT home_team AS score FROM table_name_53 WHERE home_team = "st kilda"
What did St Kilda score when they were the home team?
CREATE TABLE table_name_53 (home_team VARCHAR)
SELECT location FROM table_22165661_3 WHERE score = "2-1"
What is the location when 2-1 is the score?
CREATE TABLE table_22165661_3 (location VARCHAR, score VARCHAR)
SELECT constellation FROM table_name_71 WHERE date_sent = "september 4, 2001" AND distance___ly__ < 57.4
What is Constellation, when Date Sent is 'September 4, 2001', and when Distance ( ly ) is less than 57.4?
CREATE TABLE table_name_71 ( constellation VARCHAR, date_sent VARCHAR, distance___ly__ VARCHAR )
SELECT home_team AS score FROM table_name_6 WHERE away_team = "south melbourne"
What did the home team score when South Melbourne was the away team?
CREATE TABLE table_name_6 (home_team VARCHAR, away_team VARCHAR)
SELECT conference FROM table_22165661_3 WHERE championship_game_opponent = "Ferris State"
What is the conference when Ferris State is the championship game opponent?
CREATE TABLE table_22165661_3 (conference VARCHAR, championship_game_opponent VARCHAR)
SELECT AVG(goal_ratio) FROM table_name_71 WHERE goals > 1 AND games > 161 AND debut_in_europe < 1985
What's the average goal ratio with Goals larger than 1, Games larger than 161, and a Debut in Europe smaller than 1985?
CREATE TABLE table_name_71 ( goal_ratio INTEGER, debut_in_europe VARCHAR, goals VARCHAR, games VARCHAR )
SELECT leading_scorer FROM table_name_13 WHERE date = "april 12, 2008"
Name the leading scorer for april 12, 2008
CREATE TABLE table_name_13 (leading_scorer VARCHAR, date VARCHAR)
SELECT location FROM table_22165661_3 WHERE tournament = 1999
What is the location of the 1999 tournament?
CREATE TABLE table_22165661_3 (location VARCHAR, tournament VARCHAR)
SELECT Team_ID, School_ID FROM basketball_match GROUP BY All_Home
Group by all home, show the team id and school id in a scatter plot.
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text )
SELECT home_team AS score FROM table_name_52 WHERE venue = "brunswick street oval"
What was the score for the home team that played at Brunswick Street Oval?
CREATE TABLE table_name_52 (home_team VARCHAR, venue VARCHAR)
SELECT COUNT(score) FROM table_22165661_3 WHERE championship_game_opponent = "Miami University"
How many scores are there when the championship game opponent is Miami University?
CREATE TABLE table_22165661_3 (score VARCHAR, championship_game_opponent VARCHAR)
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE STRFTIME('%y', prescriptions.startdate) = '2100' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 4
in 2100 what are the top four most commonly prescribed drugs?
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text )
SELECT name FROM table_name_49 WHERE seasons = "1981" AND order > 807
what is the name for seasons 1981 and an order more than 807?
CREATE TABLE table_name_49 (name VARCHAR, seasons VARCHAR, order VARCHAR)
SELECT head_coach FROM table_22165661_3 WHERE score = "4-3"
Who is the head coach for the score of 4-3?
CREATE TABLE table_22165661_3 (head_coach VARCHAR, score VARCHAR)
SELECT * FROM albums WHERE year = 2010
What information is there on albums from 2010?
CREATE TABLE vocals ( songid number, bandmate number, type text ) CREATE TABLE performance ( songid number, bandmate number, stageposition text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE tracklists ( albumid number, position number, songid number ) CREATE TABLE songs ( songid number, title text ) CREATE TABLE albums ( aid number, title text, year number, label text, type text )
SELECT away_team FROM table_name_63 WHERE venue = "lake oval"
What away team played in Lake Oval?
CREATE TABLE table_name_63 (away_team VARCHAR, venue VARCHAR)
SELECT bleeding_time FROM table_221653_1 WHERE platelet_count = "Decreased or unaffected"
What is the bleeding time when the platelet count is decreased or unaffected?
CREATE TABLE table_221653_1 (bleeding_time VARCHAR, platelet_count VARCHAR)
SELECT "Phase" FROM table_72342 WHERE "New entries this round" = '12'
The new entries this round was shown to be 12, in which phase would you find this?
CREATE TABLE table_72342 ( "Phase" text, "Round" text, "Clubs remaining" real, "Clubs involved" real, "Winners from previous round" text, "New entries this round" text, "Leagues entering at this round" text )
SELECT tournament FROM table_name_30 WHERE 2009 = "11"
Which tournament was on 2009 with 11?
CREATE TABLE table_name_30 (tournament VARCHAR)
SELECT partial_thromboplastin_time FROM table_221653_1 WHERE condition = "Factor X deficiency as seen in amyloid purpura"
What is the partial thromboplastin time when the condition factor x deficiency as seen in amyloid purpura?
CREATE TABLE table_221653_1 (partial_thromboplastin_time VARCHAR, condition VARCHAR)
SELECT COUNT(*) FROM table_204_4 WHERE "competition" = 'uci europe tour'
how many uci europe tour competitions are recorded in the chart ?
CREATE TABLE table_204_4 ( id number, "date" text, "race" text, "competition" text, "rider" text, "country" text, "location" text )
SELECT driver FROM table_name_57 WHERE laps = 59 AND grid = 11
What driver went 59 laps on grid 11?
CREATE TABLE table_name_57 (driver VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT COUNT(platelet_count) FROM table_221653_1 WHERE prothrombin_time = "Prolonged" AND bleeding_time = "Prolonged"
How many time does the platelet count occur when prothrombin time and bleeding time are prolonged?
CREATE TABLE table_221653_1 (platelet_count VARCHAR, prothrombin_time VARCHAR, bleeding_time VARCHAR)
SELECT touchdowns FROM table_14342592_5 WHERE points = 22
When the total points are 22 how many total touchdowns have been made?
CREATE TABLE table_14342592_5 ( touchdowns VARCHAR, points VARCHAR )
SELECT driver FROM table_name_38 WHERE grid = "22"
Which driver has a grid value of 22?
CREATE TABLE table_name_38 (driver VARCHAR, grid VARCHAR)
SELECT COUNT(bleeding_time) FROM table_221653_1 WHERE condition = "Disseminated intravascular coagulation"
What is the bleeding time for the disseminated intravascular coagulation condition?
CREATE TABLE table_221653_1 (bleeding_time VARCHAR, condition VARCHAR)
SELECT "Intermediate Sprints Classification Klasyfikacja najaktywniejszych" FROM table_30282 WHERE "Winner" = 'Daniel Martin'
What was the intermediate sprint classification for the race whose winner was Daniel Martin?
CREATE TABLE table_30282 ( "Stage" real, "Winner" text, "General classification \u017b\u00f3\u0142ta koszulka" text, "Mountains classification Klasyfikacja g\u00f3rska" text, "Intermediate Sprints Classification Klasyfikacja najaktywniejszych" text, "Points classification Klasyfikacja punktowa" text, "Teams classification" text )
SELECT time_retired FROM table_name_29 WHERE driver = "jean alesi"
What is the value of time/retired for Jean Alesi?
CREATE TABLE table_name_29 (time_retired VARCHAR, driver VARCHAR)
SELECT partial_thromboplastin_time FROM table_221653_1 WHERE prothrombin_time = "Prolonged" AND bleeding_time = "Prolonged"
What is the result for partial thromboplastin time when prothrombin time and bleeding time are prolonged?
CREATE TABLE table_221653_1 (partial_thromboplastin_time VARCHAR, prothrombin_time VARCHAR, bleeding_time VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Medium Chain Triglycerides"
how many patients were given the drug medium chain triglycerides?
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT laps FROM table_name_53 WHERE time_retired = "electrical" AND driver = "rubens barrichello"
When the time/retired is electrical how many laps did Rubens Barrichello have?
CREATE TABLE table_name_53 (laps VARCHAR, time_retired VARCHAR, driver VARCHAR)
SELECT platelet_count FROM table_221653_1 WHERE partial_thromboplastin_time = "Unaffected" AND bleeding_time = "Unaffected"
What is the platelet count when partial thromboplastin time and bleeding time are unaffected?
CREATE TABLE table_221653_1 (platelet_count VARCHAR, partial_thromboplastin_time VARCHAR, bleeding_time VARCHAR)
SELECT SUM("Silver") FROM table_74951 WHERE "Nation" = 'china' AND "Bronze" < '7'
Which Silver has a Nation of china, and a Bronze smaller than 7?
CREATE TABLE table_74951 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT laps FROM table_name_73 WHERE driver = "eddie irvine"
How many laps did Eddie Irvine have?
CREATE TABLE table_name_73 (laps VARCHAR, driver VARCHAR)
SELECT MIN(top_50_ranking) FROM table_22170495_7 WHERE title = "The God-Why-Don't-You-Love-Me Blues"
What is the lowest top 50 ranking that the episode titled "the god-why-don't-you-love-me blues" received?
CREATE TABLE table_22170495_7 (top_50_ranking INTEGER, title VARCHAR)
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
Show the country names and the corresponding number of players in a pie chart.
CREATE TABLE country ( Country_id int, Country_name text, Capital text, Official_native_language text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL text, Team int ) CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text ) CREATE TABLE team ( Team_id int, Name text )
SELECT score FROM table_name_9 WHERE home = "hornets" AND visitor = "clippers"
In the game where the Hornets were the home team and Clippers the visiting team, what is the score?
CREATE TABLE table_name_9 (score VARCHAR, home VARCHAR, visitor VARCHAR)
SELECT title FROM table_22170495_7 WHERE original_airing = "April 19, 2010"
Which episodes originally aired on April 19, 2010?
CREATE TABLE table_22170495_7 (title VARCHAR, original_airing VARCHAR)
SELECT MAX("Played") FROM table_13095 WHERE "Points" = '37' AND "Goals Conceded" > '17'
When goals conceded is greater than 17 with 37 points, what is the greatest played?
CREATE TABLE table_13095 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real )
SELECT finish FROM table_name_13 WHERE qual = "99.550"
Which finish has a 99.550 Qual?
CREATE TABLE table_name_13 (finish VARCHAR, qual VARCHAR)
SELECT MIN(scripted_show_ranking) FROM table_22170495_7 WHERE title = "Epiphany"
The episode titled "Epiphany" received what scripted show ranking?
CREATE TABLE table_22170495_7 (scripted_show_ranking INTEGER, title VARCHAR)
SELECT "H/A/N" FROM table_50110 WHERE "Score" = '104-109'
What is H/A/N, when Score is 104-109?
CREATE TABLE table_50110 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text )
SELECT qual FROM table_name_4 WHERE laps < 200 AND start = "11"
Which Qual with laps less than 200 and an 11 start?
CREATE TABLE table_name_4 (qual VARCHAR, laps VARCHAR, start VARCHAR)
SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = "June 28, 2010"
How many of the episodes in the top 50 rankings were originally aired on June 28, 2010?
CREATE TABLE table_22170495_7 (top_50_ranking VARCHAR, original_airing VARCHAR)
SELECT name, COUNT(name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID WHERE Result = 'Win' GROUP BY name ORDER BY COUNT(name)
Find the number of the names of swimmers who has a result of 'win', rank by the y-axis in ascending.
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text )
SELECT rank FROM table_name_78 WHERE start = "totals"
Which rank is the start of totals?
CREATE TABLE table_name_78 (rank VARCHAR, start VARCHAR)
SELECT athletic_nickname FROM table_22171978_1 WHERE location = "Quezon City , Metro Manila"
For the location of quezon city , metro manila what is the athletic nickname?
CREATE TABLE table_22171978_1 (athletic_nickname VARCHAR, location VARCHAR)
SELECT "Format" FROM table_31962 WHERE "Frequency" = '1290 khz'
Say the frequency of 1290 khz
CREATE TABLE table_31962 ( "Calls" text, "Frequency" text, "Branding" text, "Format" text, "Timeslot" text, "Group owner" text )
SELECT year FROM table_name_31 WHERE laps = 112
Which year has 112 laps?
CREATE TABLE table_name_31 (year VARCHAR, laps VARCHAR)
SELECT COUNT(location) FROM table_22171978_1 WHERE athletic_nickname = "Blue Crusaders"
How many locations are there for the athletic nickname is blue crusaders?
CREATE TABLE table_22171978_1 (location VARCHAR, athletic_nickname VARCHAR)
SELECT Policy_Type_Code, COUNT(*) FROM Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC
Find the number of records of each policy type and its type code Visualize by bar chart, I want to order from high to low by the y axis.
CREATE TABLE Staff ( Staff_ID INTEGER, Staff_Details VARCHAR(255) ) CREATE TABLE Claims_Processing_Stages ( Claim_Stage_ID INTEGER, Next_Claim_Stage_ID INTEGER, Claim_Status_Name VARCHAR(255), Claim_Status_Description VARCHAR(255) ) CREATE TABLE Policies ( Policy_ID INTEGER, Customer_ID INTEGER, Policy_Type_Code CHAR(15), Start_Date DATETIME, End_Date DATETIME ) CREATE TABLE Claims_Processing ( Claim_Processing_ID INTEGER, Claim_ID INTEGER, Claim_Outcome_Code CHAR(15), Claim_Stage_ID INTEGER, Staff_ID INTEGER ) CREATE TABLE Claim_Headers ( Claim_Header_ID INTEGER, Claim_Status_Code CHAR(15), Claim_Type_Code CHAR(15), Policy_ID INTEGER, Date_of_Claim DATETIME, Date_of_Settlement DATETIME, Amount_Claimed DECIMAL(20,4), Amount_Piad DECIMAL(20,4) ) CREATE TABLE Customers ( Customer_ID INTEGER, Customer_Details VARCHAR(255) ) CREATE TABLE Claims_Documents ( Claim_ID INTEGER, Document_Type_Code CHAR(15), Created_by_Staff_ID INTEGER, Created_Date INTEGER )
SELECT surface FROM table_name_47 WHERE score_in_the_final = "0–6, 4–6"
On what surface was the score in the final 0–6, 4–6?
CREATE TABLE table_name_47 (surface VARCHAR, score_in_the_final VARCHAR)
SELECT COUNT(school_colors) FROM table_22171978_1 WHERE location = "Naga , Camarines Sur"
How many entries are shown for school colors for the location of naga , camarines sur?
CREATE TABLE table_22171978_1 (school_colors VARCHAR, location VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.itemid = "51144"
provide me the number of male patients who have lab test item id 51144.
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 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 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 )
SELECT score_in_the_final FROM table_name_82 WHERE tournament = "$25,000 glasgow, great britain"
What score in the final had a tournament of $25,000 Glasgow, Great Britain?
CREATE TABLE table_name_82 (score_in_the_final VARCHAR, tournament VARCHAR)
SELECT COUNT(enrollment) FROM table_22171978_1 WHERE athletic_nickname = "Golden Knights"
For the athletic nickname of golden knights how many entries are shown for enrollment?
CREATE TABLE table_22171978_1 (enrollment VARCHAR, athletic_nickname VARCHAR)
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.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 inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'deliver 2.0' AND d_items.linksto = 'inputevents_cv') AND DATETIME(inputevents_cv.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', inputevents_cv.charttime) = '05'
tell me the amount of deliver 2.0 that patient 27703 has received on last month/05.
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time )
SELECT surface FROM table_name_77 WHERE score_in_the_final = "4–6, 3–6"
Which surface has a score in the final of 4–6, 3–6?
CREATE TABLE table_name_77 (surface VARCHAR, score_in_the_final VARCHAR)
SELECT founded FROM table_22171978_1 WHERE institution = "Ateneo de Manila University"
What year was the ateneo de manila university founded?
CREATE TABLE table_22171978_1 (founded VARCHAR, institution VARCHAR)
SELECT format FROM table_name_41 WHERE catalog = "rtradcd491" AND date = "september 22, 2008"
What is the Format of the September 22, 2008 release with Catalog number RTRADCD491?
CREATE TABLE table_name_41 ( format VARCHAR, catalog VARCHAR, date VARCHAR )
SELECT COUNT(silver) FROM table_name_44 WHERE nation = "united states" AND total > 1
how many times is the nation listed as united states with the total more than 1?
CREATE TABLE table_name_44 (silver VARCHAR, nation VARCHAR, total VARCHAR)
SELECT founded FROM table_22171978_1 WHERE athletic_nickname = "Blue Crusaders"
What year was the athletic nickname blue crusaders founded?
CREATE TABLE table_22171978_1 (founded VARCHAR, athletic_nickname VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "B-complex defic NEC"
calculate the number of patients diagnosed with b-complex defic nec
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id 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 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT MIN(total) FROM table_name_30 WHERE rank < 2 AND bronze > 0
what is the lowest total when the rank is less than 2 and bronze is more than 0?
CREATE TABLE table_name_30 (total INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT COUNT(original_air_date) FROM table_22181917_2 WHERE season__number = 20
How many original airdates did season 20 have?
CREATE TABLE table_22181917_2 (original_air_date VARCHAR, season__number VARCHAR)
SELECT "Team" FROM table_2491 WHERE "Race Time" = '3:12:30'
What team won when the race time was 3:12:30?
CREATE TABLE table_2491 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text )
SELECT nation FROM table_name_62 WHERE total = 1 AND bronze < 1 AND rank = 3
what is the nation with a total of 1, bronze smaller than 1 and a rank of 3?
CREATE TABLE table_name_62 (nation VARCHAR, rank VARCHAR, total VARCHAR, bronze VARCHAR)
SELECT directed_by FROM table_22181917_2 WHERE us_viewers__millions_ = "6.62"
Who directed the episode that was watched by 6.62 million U.S. viewers?
CREATE TABLE table_22181917_2 (directed_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT location FROM county_public_safety GROUP BY location ORDER BY COUNT(*) DESC LIMIT 1
Which location has the most corresponding counties?
CREATE TABLE county_public_safety ( county_id number, name text, population number, police_officers number, residents_per_officer number, case_burden number, crime_rate number, police_force text, location text ) CREATE TABLE city ( city_id number, county_id number, name text, white number, black number, amerindian number, asian number, multiracial number, hispanic number )
SELECT SUM(rank) FROM table_name_6 WHERE silver < 0
what is the rank when silver is less than 0?
CREATE TABLE table_name_6 (rank INTEGER, silver INTEGER)
SELECT production_code FROM table_22181917_2 WHERE us_viewers__millions_ = "8.56"
What is the production code for the episode with 8.56 million U.S. viewers?
CREATE TABLE table_22181917_2 (production_code VARCHAR, us_viewers__millions_ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "85" AND lab.label = "Other Cells"
how many patients younger than 85 years of age lab tested for other cells?
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id 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 )
SELECT AVG(silver) FROM table_name_6 WHERE gold = 2 AND rank > 1
what is the amount of silver when gold is 2 and the rank is more than 1?
CREATE TABLE table_name_6 (silver INTEGER, gold VARCHAR, rank VARCHAR)
SELECT title FROM table_22181917_2 WHERE us_viewers__millions_ = "9.76"
What is the title of the episode that had 9.76 million U.S. viewers?
CREATE TABLE table_22181917_2 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT "No. in series" FROM table_72673 WHERE "U.S. viewers (millions)" = '7.78'
Name the number in the series for when the viewers is 7.78
CREATE TABLE table_72673 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text )
SELECT home FROM table_name_9 WHERE decision = "kolzig" AND date = "november 5"
Which home has a Decision of kolzig, and a Date of november 5?
CREATE TABLE table_name_9 (home VARCHAR, decision VARCHAR, date VARCHAR)
SELECT title FROM table_22170495_6 WHERE original_airing_on_e4 = "May 2, 2010"
What is the title of the original airing on e4 May 2, 2010?
CREATE TABLE table_22170495_6 (title VARCHAR, original_airing_on_e4 VARCHAR)
SELECT MAX(bush_number) FROM table_13608101_1 WHERE others_percentage = "1.57%"
what is the maximum bush# with others% being 1.57%
CREATE TABLE table_13608101_1 ( bush_number INTEGER, others_percentage VARCHAR )
SELECT score FROM table_name_29 WHERE decision = "johnson"
Which score has a Decision of johnson?
CREATE TABLE table_name_29 (score VARCHAR, decision VARCHAR)
SELECT COUNT(total_viewers) FROM table_22170495_6 WHERE original_airing_on_channel_4 = "April 21, 2010"
How many total viewers have April 21, 2010 as the original airing on channel 4?
CREATE TABLE table_22170495_6 (total_viewers VARCHAR, original_airing_on_channel_4 VARCHAR)
SELECT campus FROM campuses WHERE year = 1958
Find all the campuses opened in 1958.
CREATE TABLE discipline_enrollments ( campus number, discipline number, year number, undergraduate number, graduate number ) CREATE TABLE enrollments ( campus number, year number, totalenrollment_ay number, fte_ay number ) CREATE TABLE faculty ( campus number, year number, faculty number ) CREATE TABLE campuses ( id number, campus text, location text, county text, year number ) CREATE TABLE csu_fees ( campus number, year number, campusfee number ) CREATE TABLE degrees ( year number, campus number, degrees number )