answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT location FROM table_19215259_1 WHERE power__kw_ = "5kW" AND frequency = "102.3MHz"
Where is the frequency 102.3mhz and 5kw power?
CREATE TABLE table_19215259_1 (location VARCHAR, power__kw_ VARCHAR, frequency VARCHAR)
SELECT SUM("1952") FROM table_65970 WHERE "1954" > '4.2'
What is the 1952 rate when the 1954 is more than 4.2?
CREATE TABLE table_65970 ( "Country" text, "1951" real, "1952" real, "1953" real, "1954" real, "1955" real, "1956" real, "1957" real, "1958" real, "1959" real )
SELECT general_classification FROM table_2267345_2 WHERE young_rider_classification = "Salvatore Commesso" AND winner = "Erik Dekker"
Who was the general classification leader when the young rider classification leader was Salvatore Commesso and the winner was Erik Dekker?
CREATE TABLE table_2267345_2 (general_classification VARCHAR, young_rider_classification VARCHAR, winner VARCHAR)
SELECT location FROM table_19215259_1 WHERE frequency = "92.3MHz"
Where is the frequency 92.3mhz?
CREATE TABLE table_19215259_1 (location VARCHAR, frequency VARCHAR)
SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Year
Find those years for all exhibitions with ticket prices lower than 15, group by year, and count year.
CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real )
SELECT COUNT(team_classification) FROM table_2267345_2 WHERE young_rider_classification = "Salvatore Commesso" AND combativity_award = "Jacky Durand"
What is the total number of team classifications when the young rider classification leader was Salvatore Commesso and the combativity award winner was Jacky Durand?
CREATE TABLE table_2267345_2 (team_classification VARCHAR, young_rider_classification VARCHAR, combativity_award VARCHAR)
SELECT MAX(no) FROM table_1924975_1
What is the highest no.?
CREATE TABLE table_1924975_1 (no INTEGER)
SELECT "Name" FROM table_11971 WHERE "CERCLIS ID" = 'fld004092532'
Which site has the CERCLIS ID fld004092532?
CREATE TABLE table_11971 ( "CERCLIS ID" text, "Name" text, "County" text, "Partially deleted" text, "Deleted" text )
SELECT MIN(rnd) FROM table_22673872_1 WHERE winning_driver = "Al Unser" AND track = "Wisconsin State Fair Park Speedway"
In what round did Al Unser win at Wisconsin State Fair Park Speedway?
CREATE TABLE table_22673872_1 (rnd INTEGER, winning_driver VARCHAR, track VARCHAR)
SELECT q1 + q2_time FROM table_1924975_1 WHERE q1_time = "1:18.574"
What is the q1+q2 time in which q1 is 1:18.574?
CREATE TABLE table_1924975_1 (q1 VARCHAR, q2_time VARCHAR, q1_time VARCHAR)
SELECT SUM("Total") FROM table_75870 WHERE "Gold" = '18'
What is the total number of medals when there are 18 gold medals?
CREATE TABLE table_75870 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT COUNT(race_name) FROM table_22673872_1 WHERE location = "College Station, Texas" AND winning_driver = "Johnny Rutherford"
How many races are in College Station, Texas and won by Johnny Rutherford?
CREATE TABLE table_22673872_1 (race_name VARCHAR, location VARCHAR, winning_driver VARCHAR)
SELECT q1 + q2_time FROM table_1924975_1 WHERE q1_pos = 8
when q1 pos is 8 what is the q1+q2 time?
CREATE TABLE table_1924975_1 (q1 VARCHAR, q2_time VARCHAR, q1_pos VARCHAR)
SELECT "Attendance" FROM table_33015 WHERE "Date" = '1997-12-14'
What was the attendance on 1997-12-14?
CREATE TABLE table_33015 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" text )
SELECT race_name FROM table_22673872_1 WHERE pole_position = "Al Unser"
What was the name of the race that Al Unser had the pole position?
CREATE TABLE table_22673872_1 (race_name VARCHAR, pole_position VARCHAR)
SELECT COUNT(pos) FROM table_1924975_1 WHERE q1 + q2_time = "2.34.736"
when the q1+q2 time was 2.34.736, what was the total pos number?
CREATE TABLE table_1924975_1 (pos VARCHAR, q1 VARCHAR, q2_time VARCHAR)
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"
What is the name of tracks whose genre is Rock?
CREATE TABLE genres ( id VARCHAR, name VARCHAR ) CREATE TABLE tracks ( name VARCHAR, genre_id VARCHAR )
SELECT track FROM table_22673872_1 WHERE race_name = "International 500 Mile Sweepstakes"
What is the name of the track for the International 500 mile Sweepstakes race?
CREATE TABLE table_22673872_1 (track VARCHAR, race_name VARCHAR)
SELECT MAX(q1_pos) FROM table_1924975_1 WHERE q1_time = "1:16.218"
When the q1 time is 1:16.218 what is the highest q1 pos?
CREATE TABLE table_1924975_1 (q1_pos INTEGER, q1_time VARCHAR)
SELECT league_from FROM table_name_36 WHERE pick__number = 160
What is the league that has the pick #160?
CREATE TABLE table_name_36 ( league_from VARCHAR, pick__number VARCHAR )
SELECT location FROM table_22673872_1 WHERE pole_position = "Gordon Johncock"
Which locations did Gordon Johncock hold the pole position?
CREATE TABLE table_22673872_1 (location VARCHAR, pole_position VARCHAR)
SELECT MAX(6 AS _car_sets) FROM table_19255192_1 WHERE fiscal_year = 1968
What is the largest 6-car-sets for fiscal year 1968?
CREATE TABLE table_19255192_1 (fiscal_year VARCHAR)
SELECT club FROM table_12886178_5 WHERE tries_for = "19"
What club has a tries for count of 19?
CREATE TABLE table_12886178_5 ( club VARCHAR, tries_for VARCHAR )
SELECT classification FROM table_2266990_2 WHERE title = "Fish Rap Live!"
What classifications does Fish Rap live! has?
CREATE TABLE table_2266990_2 (classification VARCHAR, title VARCHAR)
SELECT MIN(fiscal_year) FROM table_19255192_1 WHERE total_vehicles = 490
What is the lowest fiscal year if total vehicles is 490?
CREATE TABLE table_19255192_1 (fiscal_year INTEGER, total_vehicles VARCHAR)
SELECT date FROM table_name_61 WHERE winning_driver = "ugo sivocci"
What Date has a Winning driver of ugo sivocci?
CREATE TABLE table_name_61 ( date VARCHAR, winning_driver VARCHAR )
SELECT COUNT(race_name) FROM table_22673956_1 WHERE date = "October 1"
How many races took place on October 1?
CREATE TABLE table_22673956_1 (race_name VARCHAR, date VARCHAR)
SELECT degree_diploma FROM table_19304764_2 WHERE discipline = "Otorhinolaryngology"
Name the degree for otorhinolaryngology
CREATE TABLE table_19304764_2 (degree_diploma VARCHAR, discipline VARCHAR)
SELECT home FROM table_name_30 WHERE date = "21.10.07" AND geust = "bsc young boys (asl)"
Who was the home team of the match on 21.10.07, which had bsc young boys (asl) as the geust?
CREATE TABLE table_name_30 ( home VARCHAR, date VARCHAR, geust VARCHAR )
SELECT COUNT(type) FROM table_22673956_1 WHERE track = "Phoenix International Raceway"
How many types of tracks are there on the Phoenix International raceway?
CREATE TABLE table_22673956_1 (type VARCHAR, track VARCHAR)
SELECT total_seats FROM table_19304764_2 WHERE discipline = "Otorhinolaryngology"
Name the total seats for otorhinolaryngology
CREATE TABLE table_19304764_2 (total_seats VARCHAR, discipline VARCHAR)
SELECT "Reader" FROM table_23589 WHERE "Title" = 'Department X'
who the reader of title department x?
CREATE TABLE table_23589 ( "Title" text, "Author" text, "Reader" text, "Format" text, "Company" text, "Release Date" text, "Notes" text )
SELECT MAX(rnd) FROM table_22673956_1 WHERE race_name = "Daily Empress Indy Silverstone"
Daily Empress Indy Silverstone took place on which round?
CREATE TABLE table_22673956_1 (rnd INTEGER, race_name VARCHAR)
SELECT recognised_seats FROM table_19304764_2 WHERE discipline = "Pharmacology"
Name the recognised seats for pharmacology
CREATE TABLE table_19304764_2 (recognised_seats VARCHAR, discipline VARCHAR)
SELECT time FROM table_name_15 WHERE show_name = "mornings with neil mitchell"
What Time has a Show Name of mornings with neil mitchell?
CREATE TABLE table_name_15 ( time VARCHAR, show_name VARCHAR )
SELECT COUNT(race_name) FROM table_22673956_1 WHERE track = "Indianapolis Motor Speedway"
How many races took place on the Indianapolis Motor Speedway track?
CREATE TABLE table_22673956_1 (race_name VARCHAR, track VARCHAR)
SELECT COUNT(permitted_seats) FROM table_19304764_2 WHERE discipline = "General Surgery"
Name the total number of seats for general surgery
CREATE TABLE table_19304764_2 (permitted_seats VARCHAR, discipline VARCHAR)
SELECT status FROM table_name_75 WHERE authors = "varricchio"
What is varricchio's status?
CREATE TABLE table_name_75 ( status VARCHAR, authors VARCHAR )
SELECT driver FROM table_2267465_1 WHERE race_time = "3:50:12"
What driver achieved a 3:50:12 race time?
CREATE TABLE table_2267465_1 (driver VARCHAR, race_time VARCHAR)
SELECT MIN(recognised_seats) FROM table_19304764_2
Name the least recognised seats
CREATE TABLE table_19304764_2 (recognised_seats INTEGER)
SELECT years FROM table_179174_2 WHERE flights = "134 Orbital"
What years had 134 orbital flights?
CREATE TABLE table_179174_2 ( years VARCHAR, flights VARCHAR )
SELECT manufacturer FROM table_2267465_1 WHERE team = "Race Hill Farm team"
Can you tell me the manufacturer behind Race Hill Farm Team?
CREATE TABLE table_2267465_1 (manufacturer VARCHAR, team VARCHAR)
SELECT COUNT(nation) FROM table_19312274_3 WHERE name = "FMS International"
How many nations do the FMS international team represent?
CREATE TABLE table_19312274_3 (nation VARCHAR, name VARCHAR)
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "4"
what is the average age of patients who have stayed in the hospital for 4 days with a government insurance policy?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title 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 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 COUNT(laps) FROM table_2267465_1 WHERE race_time = "3:34:26"
How many laps have a 3:34:26 race time?
CREATE TABLE table_2267465_1 (laps VARCHAR, race_time VARCHAR)
SELECT MIN(fastest_laps) FROM table_19312274_3
What is the smallest number of fastest laps listed?
CREATE TABLE table_19312274_3 (fastest_laps INTEGER)
SELECT AVG("Bronze") FROM table_58556 WHERE "Total" = '47'
What was the bronze medal count of the team that finished with 47 total medals?
CREATE TABLE table_58556 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT average_speed__mph_ FROM table_2267465_1 WHERE year = "1964"
What's the average mph of 1964?
CREATE TABLE table_2267465_1 (average_speed__mph_ VARCHAR, year VARCHAR)
SELECT championship_titles FROM table_19312274_3 WHERE name = "LRS Formula / Laurent Rédon Motorsport"
How many championship titles for LRS Formula / Laurent Rédon Motorsport?
CREATE TABLE table_19312274_3 (championship_titles VARCHAR, name VARCHAR)
SELECT player FROM table_name_33 WHERE position = "no pick" AND year = 1976
What player has a no pick position in 1976?
CREATE TABLE table_name_33 ( player VARCHAR, position VARCHAR, year VARCHAR )
SELECT manufacturer FROM table_2268216_1 WHERE team = "Ranier-Lundy"
Whose is the manufacturer for team Ranier-Lundy?
CREATE TABLE table_2268216_1 (manufacturer VARCHAR, team VARCHAR)
SELECT version FROM table_19329117_1 WHERE official_name = "AutoCAD Architectural Desktop 3"
What's the version of AutoCAD Architectural Desktop 3?
CREATE TABLE table_19329117_1 (version VARCHAR, official_name VARCHAR)
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'WASHINGTON' AND ground_service.airport_code = airport.airport_code AND ground_service.city_code = CITY_0.city_code
how do i get from BWI to WASHINGTON
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) 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 equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) 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 ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) 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 time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt 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 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 flight_fare ( flight_id int, fare_id int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight 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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) 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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note 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 year FROM table_2268216_1 WHERE average_speed__mph_ = "92.68"
In what year was the average speed 92.68?
CREATE TABLE table_2268216_1 (year VARCHAR, average_speed__mph_ VARCHAR)
SELECT regular_season FROM table_1939214_1 WHERE playoffs = "Conference Finals"
In what season did the team get in the conference finals of the playoffs?
CREATE TABLE table_1939214_1 (regular_season VARCHAR, playoffs VARCHAR)
SELECT COUNT(silver) FROM table_name_10 WHERE bronze < 0
What is the number of silver when bronze is less than 0?
CREATE TABLE table_name_10 ( silver VARCHAR, bronze INTEGER )
SELECT COUNT(year) FROM table_2268216_1 WHERE team = "Joe Gibbs Racing" AND manufacturer = "Pontiac"
How many years was Pontiac the manufacturer for Joe Gibbs Racing?
CREATE TABLE table_2268216_1 (year VARCHAR, team VARCHAR, manufacturer VARCHAR)
SELECT playoffs FROM table_1939214_1 WHERE league = "USISL Pro league"
What was the team's status in the USISL Pro League playoffs?
CREATE TABLE table_1939214_1 (playoffs VARCHAR, league VARCHAR)
SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer DESC
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, and I want to order in desc by the y axis please.
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_2268216_1 WHERE race_time = "2:43:19"
What is the date for the race that had the time of 2:43:19?
CREATE TABLE table_2268216_1 (date VARCHAR, race_time VARCHAR)
SELECT year FROM table_1939214_1 WHERE league = "USL PDL" AND regular_season = "2nd, Northeast"
In what year did the team compete in the 2nd, Northeast season of the USL PDL League?
CREATE TABLE table_1939214_1 (year VARCHAR, league VARCHAR, regular_season VARCHAR)
SELECT director FROM table_12976038_1 WHERE viewers__in_millions_ = "6.04"
Who directed the episode that had 6.04 million viewers?
CREATE TABLE table_12976038_1 ( director VARCHAR, viewers__in_millions_ VARCHAR )
SELECT COUNT(average_speed__mph_) FROM table_2268216_1 WHERE year = "2003"
How many average speeds are listed in the year 2003?
CREATE TABLE table_2268216_1 (average_speed__mph_ VARCHAR, year VARCHAR)
SELECT open_cup FROM table_1939214_1 WHERE league = "USISL D-3 Pro league" AND regular_season = "2nd, Northeast"
What did the team do in the Open Cup in the 2nd, Northeast season of the USISL D-3 Pro League?
CREATE TABLE table_1939214_1 (open_cup VARCHAR, league VARCHAR, regular_season VARCHAR)
SELECT COUNT(school) FROM table_11677100_17 WHERE player = "Bubba Starling"
How many schools did Bubba Starling attend?
CREATE TABLE table_11677100_17 ( school VARCHAR, player VARCHAR )
SELECT team FROM table_2268216_1 WHERE race_time = "2:53:57"
What team had a race time of 2:53:57?
CREATE TABLE table_2268216_1 (team VARCHAR, race_time VARCHAR)
SELECT year FROM table_1939214_1 WHERE league = "USISL Pro league"
In what year did the team compete in the USISL Pro League?
CREATE TABLE table_1939214_1 (year VARCHAR, league VARCHAR)
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hyp kid nos w cr kid v') AND DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN (SELECT patients.subject_id FROM patients WHERE patients.gender = 'f') AND admissions.age BETWEEN 20 AND 29 AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-4 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 3
what is the three most frequent drugs that were prescribed within 2 months to a female patient 20s after they have been diagnosed with hyp kid nos w cr kid v, since 4 years ago?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom 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 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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) 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 ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_diagnoses ( 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 )
SELECT sprint_classification FROM table_22713796_14 WHERE winner = "Alejandro Valverde"
Name the sprint classification being alejandro valverde
CREATE TABLE table_22713796_14 (sprint_classification VARCHAR, winner VARCHAR)
SELECT MIN(arabs_2001) FROM table_1939367_1 WHERE _percentage_2001 = "0.1%"
If %2001 is 0.1%, what is the minimum Arabs 2001 number?
CREATE TABLE table_1939367_1 (arabs_2001 INTEGER, _percentage_2001 VARCHAR)
SELECT "Event" FROM table_44577 WHERE "Time" = '0:49'
What event has a 0:49 time?
CREATE TABLE table_44577 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT stage FROM table_22713796_14 WHERE mountains_classification = "no award"
Name the stage for no award
CREATE TABLE table_22713796_14 (stage VARCHAR, mountains_classification VARCHAR)
SELECT MAX(arabs_2001) FROM table_1939367_1 WHERE province = "Manitoba"
If the province is Manitoba, what is the Arabs 2001 number?
CREATE TABLE table_1939367_1 (arabs_2001 INTEGER, province VARCHAR)
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'bystolic' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-2 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-2 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.startdate < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.startdate) AND DATETIME(t1.startdate, '+2 month') GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 5
what were the top five common drugs that patients were prescribed within 2 months after they had been prescribed with bystolic since 2 years ago?
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_labitems ( row_id number, itemid number, label 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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) 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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time )
SELECT COUNT(stage) FROM table_22713796_14 WHERE mountains_classification = "Lloyd Mondory"
Name the total number of stage for lloyd mondory
CREATE TABLE table_22713796_14 (stage VARCHAR, mountains_classification VARCHAR)
SELECT COUNT(province) FROM table_1939367_1 WHERE _percentage_2011 = "0.0%"
What is the province amount if the % 2011 is 0.0%
CREATE TABLE table_1939367_1 (province VARCHAR, _percentage_2011 VARCHAR)
SELECT COUNT(DISTINCT team) FROM match_season
Count the number of different teams involved in match season.
CREATE TABLE team ( team_id number, name text ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, draft_class text, college text ) CREATE TABLE player ( player_id number, player text, years_played text, total_wl text, singles_wl text, doubles_wl text, team number ) CREATE TABLE country ( country_id number, country_name text, capital text, official_native_language text )
SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = "Alejandro Valverde" AND team_classification = "Astana" AND winner = "Greg Henderson"
Name the most stage for alejandro valverde and astana greg henderson
CREATE TABLE table_22713796_14 (stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR)
SELECT COUNT(arabs_2001) FROM table_1939367_1 WHERE province = "British Columbia"
If the province is British Columbia, what is the Arabs 2001 total number?
CREATE TABLE table_1939367_1 (arabs_2001 VARCHAR, province VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dob_year < "1850"
how many patients whose admission location is emergency room admit and year of birth is less than 1850?
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 ) 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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT tournament_winner FROM table_22733636_1 WHERE conference = "Border conference"
When the Border Conference was held, who was the tournament winner?
CREATE TABLE table_22733636_1 (tournament_winner VARCHAR, conference VARCHAR)
SELECT arabs_2011 FROM table_1939367_1 WHERE province = "Nunavut"
If the province is Nunavut, what is the Arabs 2011 amount?
CREATE TABLE table_1939367_1 (arabs_2011 VARCHAR, province VARCHAR)
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN student_record AS STUDENT_RECORDalias1 ON STUDENT_RECORDalias1.course_id = PROGRAM_COURSEalias1.course_id WHERE STUDENT_RECORDalias1.student_id = 1) AND student_record.student_id = 1
Which of the courses I 've taken is considered the hardest ?
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 course_prerequisite ( pre_course_id int, course_id int ) 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 program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text 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 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE gsi ( course_offering_id int, student_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 requirement ( requirement_id int, requirement varchar, college 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 )
SELECT tournament_winner FROM table_22733636_1 WHERE regular_season_winner = "Princeton"
When Princeton was the regular season winner, who was the tournament winner?
CREATE TABLE table_22733636_1 (tournament_winner VARCHAR, regular_season_winner VARCHAR)
SELECT date FROM table_1940012_2 WHERE runner_s__up = "Song-Hee Kim"
When did the tournament, in which the runner-up was Song-Hee Kim, happen
CREATE TABLE table_1940012_2 (date VARCHAR, runner_s__up VARCHAR)
SELECT bronze FROM table_name_25 WHERE silver = 1
Name the bronze when silver is 1
CREATE TABLE table_name_25 ( bronze VARCHAR, silver VARCHAR )
SELECT experience FROM table_22719663_3 WHERE name = "Mel Daniels"
How long has Mel Daniels been playing?
CREATE TABLE table_22719663_3 (experience VARCHAR, name VARCHAR)
SELECT winners_share___$__ FROM table_1940012_2 WHERE margin_of_victory = "2 strokes"
What was the amount of winners share (in $) in the game with a margin victory of 2 strokes?
CREATE TABLE table_1940012_2 (winners_share___$__ VARCHAR, margin_of_victory VARCHAR)
SELECT date FROM table_name_92 WHERE week < 10 AND game_site = "texas stadium" AND opponent = "atlanta falcons"
What is the date of the game in a week earlier than 10 played in Texas stadium agains the Atlanta Falcons?
CREATE TABLE table_name_92 ( date VARCHAR, opponent VARCHAR, week VARCHAR, game_site VARCHAR )
SELECT position FROM table_22719663_3 WHERE college = "San Jose State"
What position did the player from San Jose State play?
CREATE TABLE table_22719663_3 (position VARCHAR, college VARCHAR)
SELECT winning_score FROM table_1940012_2 WHERE tournament = "Sybase Classic"
What was the winning score in the Sybase Classic tournament?
CREATE TABLE table_1940012_2 (winning_score VARCHAR, tournament VARCHAR)
SELECT "Operator" FROM table_22288 WHERE "Departure" = '11.02'
Who was the train operator when the train departed at 11.02 in 1922?
CREATE TABLE table_22288 ( "Departure" text, "Going to" text, "Calling at" text, "Arrival" text, "Operator" text )
SELECT number FROM table_22719663_3 WHERE height = "6-6"
What was the number of the player that was 6-6?
CREATE TABLE table_22719663_3 (number VARCHAR, height VARCHAR)
SELECT winning_score FROM table_1940012_2 WHERE runner_s__up = "Birdie Kim"
What was the winning score in the tournament, ending with Birdie Kim as a runner-up?
CREATE TABLE table_1940012_2 (winning_score VARCHAR, runner_s__up VARCHAR)
SELECT vacator FROM table_2147588_4 WHERE successor = "Nathaniel G. Taylor (U)"
When nathaniel g. taylor (u) is the successor what is the vacator?
CREATE TABLE table_2147588_4 ( vacator VARCHAR, successor VARCHAR )
SELECT result FROM table_22736523_1 WHERE order__number = "10" AND song_choice = "Coba"
If the song choice is Coba and the order number is 10, what is the result?
CREATE TABLE table_22736523_1 (result VARCHAR, order__number VARCHAR, song_choice VARCHAR)
SELECT MIN(latin_americans_2011) FROM table_1939405_2 WHERE province = "Northwest Territories"
How many Latin Americans were there in the Northwest Territories in 2011?
CREATE TABLE table_1939405_2 (latin_americans_2011 INTEGER, province VARCHAR)
SELECT "Location" FROM table_2013 WHERE "Frequency" = '92.3MHz'
Where is the frequency 92.3mhz?
CREATE TABLE table_2013 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
SELECT result FROM table_22736523_1 WHERE song_choice = "Coba"
What is the result if Coba is the song choice?
CREATE TABLE table_22736523_1 (result VARCHAR, song_choice VARCHAR)
SELECT COUNT(latin_americans_2001) FROM table_1939405_2 WHERE province = "Yukon"
How many results of the count of Latin Americans in Yukon in 2001 are there?
CREATE TABLE table_1939405_2 (latin_americans_2001 VARCHAR, province VARCHAR)