answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(*) AS counter, OwnerUserId FROM Posts GROUP BY OwnerUserId ORDER BY counter DESC
Users with most asked questions today.
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT bandwidth_included FROM table_name_45 WHERE price = "50 eur"
What is Bandwidth Included, when Price is "50 EUR"?
CREATE TABLE table_name_45 (bandwidth_included VARCHAR, price VARCHAR)
SELECT _percentage_change FROM table_1425958_1 WHERE population_rank = 34
When the population rank is 34, what the is % change?
CREATE TABLE table_1425958_1 (_percentage_change VARCHAR, population_rank VARCHAR)
SELECT "Result" FROM table_21667 WHERE "Date" = 'Nov. 26'
What was the result of the game that was played on Nov. 26, 1972?
CREATE TABLE table_21667 ( "Week" real, "Date" text, "Opponent" text, "Stadium" text, "Result" text, "Record" text, "Streak" text, "Attendance" real )
SELECT upstream FROM table_name_25 WHERE price = "14 eur"
What is Upstream, when Price is "14 EUR"?
CREATE TABLE table_name_25 (upstream VARCHAR, price VARCHAR)
SELECT COUNT(team) FROM table_14288212_1 WHERE points_for = 38
How many teams scored exactly 38 points
CREATE TABLE table_14288212_1 (team VARCHAR, points_for VARCHAR)
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'data cleaning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
Show me the papers on data cleaning
CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paper ( paperid int, title...
SELECT bandwidth_included FROM table_name_85 WHERE internet_plan = "8mb"
What is Bandwidth Included, when Internet Plan is "8mb"?
CREATE TABLE table_name_85 (bandwidth_included VARCHAR, internet_plan VARCHAR)
SELECT MIN(first_played) FROM table_14288212_1 WHERE team = "Italy"
In what year did Italy begin playing?
CREATE TABLE table_14288212_1 (first_played INTEGER, team VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "8321"
what is the number of patients whose admission location is trsf within this facility and procedure icd9 code is 8321?
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 prescription...
SELECT price FROM table_name_64 WHERE upstream = "256 kbit"
What is the Price, when Upstream is "256 kbit"?
CREATE TABLE table_name_64 (price VARCHAR, upstream VARCHAR)
SELECT MIN(win) FROM table_14288212_1 WHERE played = 5
For teams that played 5 games, what was the smallest number of wins?
CREATE TABLE table_14288212_1 (win INTEGER, played VARCHAR)
SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13536)) AND DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start o...
tell me the total amount of output that patient 13536 has had on 05/04/this year?
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 t...
SELECT semifinalists FROM table_name_23 WHERE finalist = "andre agassi"
Which Semifinalists has a Finalist of andre agassi?
CREATE TABLE table_name_23 (semifinalists VARCHAR, finalist VARCHAR)
SELECT COUNT(played) FROM table_14288212_1 WHERE first_played = 2011 AND points_for = 36
How many games did the team that began in 2011 and scored 36 points play?
CREATE TABLE table_14288212_1 (played VARCHAR, first_played VARCHAR, points_for VARCHAR)
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 54825 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ...
is the value of calcium, total in patient 54825 last measured on the first hospital visit less than that the first value measured on the first hospital visit?
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 prescriptions ( row_id number, subject_id number, hadm_id number, startdate ti...
SELECT tournament FROM table_name_31 WHERE finalist = "gustavo kuerten (4)"
WHich Tournament has a Finalist of gustavo kuerten (4)?
CREATE TABLE table_name_31 (tournament VARCHAR, finalist VARCHAR)
SELECT run_time FROM table_1429629_1 WHERE viewers__in_millions_ = "8.2"
What are all the run times with 8.2 million viewers?
CREATE TABLE table_1429629_1 (run_time VARCHAR, viewers__in_millions_ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2114" AND lab.itemid = "50949"
provide the number of patients whose admission year is less than 2114 and item id is 50949?
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 ( ...
SELECT finalist FROM table_name_3 WHERE semifinalists = "andre agassi (1) lleyton hewitt (14)"
Which finalist has Semifinalists of andre agassi (1) lleyton hewitt (14)?
CREATE TABLE table_name_3 (finalist VARCHAR, semifinalists VARCHAR)
SELECT episode FROM table_1429629_1 WHERE run_time = "24:01"
What are all the episodes with an episode run time of 24:01?
CREATE TABLE table_1429629_1 (episode VARCHAR, run_time VARCHAR)
SELECT "Doctor" FROM table_61120 WHERE "Published" = 'june 2003'
What doctor published on June 2003?
CREATE TABLE table_61120 ( "Title" text, "Author" text, "Doctor" text, "Companion(s)" text, "Published" text )
SELECT finalist FROM table_name_20 WHERE tournament = "monte carlo"
Which Finalist has a Tournament of monte carlo?
CREATE TABLE table_name_20 (finalist VARCHAR, tournament VARCHAR)
SELECT COUNT(broadcast_date) FROM table_1429629_1 WHERE run_time = "24:43"
How many episodes had a broadcast date and run time of 24:43?
CREATE TABLE table_1429629_1 (broadcast_date VARCHAR, run_time VARCHAR)
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 20898 AND STRFTIME('%y', admissions.admittime) = '2105' ORDER BY admissions.admittime LIMIT 1
how is patient 20898 first admitted to the hospital in 2105?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title 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 labevents ( r...
SELECT winner FROM table_name_97 WHERE finalist = "andre agassi"
WHo is the Winner of andre agassi Finalist?
CREATE TABLE table_name_97 (winner VARCHAR, finalist VARCHAR)
SELECT COUNT(research_funding__) AS £, 000 AS _ FROM table_142950_1 WHERE gained_university_status = 1900
How many members gained university status in 1900?
CREATE TABLE table_142950_1 (research_funding__ VARCHAR, gained_university_status VARCHAR)
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 90663 AND admissions.dischtime IS NULL)) AND transfers...
how many hours have passed since patient 90663's first stay in ward 12 during their current hospital encounter?
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 d_labitems ( row_id ...
SELECT tournament FROM table_name_47 WHERE finalist = "marat safin (12)"
WHich Tournament has a Finalist of marat safin (12)?
CREATE TABLE table_name_47 (tournament VARCHAR, finalist VARCHAR)
SELECT MAX(total_number_of_students) FROM table_142950_1
What is the largest number of students?
CREATE TABLE table_142950_1 (total_number_of_students INTEGER)
SELECT rounds FROM table_name_51 WHERE team = "avanzza rosso"
In what rounds was the featured team of Avanzza Rosso?
CREATE TABLE table_name_51 ( rounds VARCHAR, team VARCHAR )
SELECT date FROM table_name_40 WHERE circuit = "sepang international circuit" AND round = "3"
What was the date for the Sepang International circuit, round 3?
CREATE TABLE table_name_40 (date VARCHAR, circuit VARCHAR, round VARCHAR)
SELECT COUNT(total_number_of_students) FROM table_142950_1 WHERE vice_chancellor = "Professor Edward Acton"
How many members have professor edward acton as vice-chancellor?
CREATE TABLE table_142950_1 (total_number_of_students VARCHAR, vice_chancellor VARCHAR)
SELECT AVG(distance), AVG(price) FROM flight WHERE origin = "Los Angeles"
What is the average distance and price for all flights from LA?
CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number ) CREATE TABLE certificate ( eid number, aid number ) CREATE TABLE aircraft ( aid number, name text, distance number )...
SELECT round FROM table_name_80 WHERE winning_driver = "uwe alzen" AND circuit = "sepang international circuit"
Which round had a winning driver of Uwe Alzen, at the Sepang International circuit?
CREATE TABLE table_name_80 (round VARCHAR, winning_driver VARCHAR, circuit VARCHAR)
SELECT MAX(established) FROM table_142950_1 WHERE location = "Leicester"
What is the year leicester was established?
CREATE TABLE table_142950_1 (established INTEGER, location VARCHAR)
SELECT "Album" FROM table_46846 WHERE "Bass" = 'jay bentley' AND "Drums" = 'bobby schayer'
Which album had Jay Bentley on bass and Bobby Schayer on drums?
CREATE TABLE table_46846 ( "Year" real, "Album" text, "Vocals" text, "Bass" text, "Drums" text, "Label" text )
SELECT round FROM table_name_92 WHERE date = "march 22"
What was the round number for March 22?
CREATE TABLE table_name_92 (round VARCHAR, date VARCHAR)
SELECT country_territory FROM table_14308895_2 WHERE former_pageant = "Miss Universe Hungary"
which country has miss universe Hungary as former pageant?
CREATE TABLE table_14308895_2 (country_territory VARCHAR, former_pageant VARCHAR)
SELECT * FROM departments WHERE department_name = 'Marketing'
What is all the information about the Marketing department?
CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE departments ( department_id number, department_name text, manager_id number, location_id number ) CREATE TABLE employees ( employee_id number, first_name text, last_name tex...
SELECT high_points FROM table_name_98 WHERE team = "@ charlotte"
Who had the high points in the game @ Charlotte?
CREATE TABLE table_name_98 (high_points VARCHAR, team VARCHAR)
SELECT former_pageant FROM table_14308895_2 WHERE new_pageant = "Miss Bahamas"
which is the former pageant in the country where the new pageant is miss bahamas?
CREATE TABLE table_14308895_2 (former_pageant VARCHAR, new_pageant VARCHAR)
SELECT country FROM table_name_60 WHERE year_s__won = "1977"
Which Country has a Year(s) won of 1977?
CREATE TABLE table_name_60 ( country VARCHAR, year_s__won VARCHAR )
SELECT record FROM table_name_77 WHERE game = 70
What's the record of Game 70?
CREATE TABLE table_name_77 (record VARCHAR, game VARCHAR)
SELECT MAX(last_competed) FROM table_14308895_2 WHERE country_territory = "New Zealand"
when did new zealand last compete?
CREATE TABLE table_14308895_2 (last_competed INTEGER, country_territory VARCHAR)
SELECT town_city FROM table_name_39 WHERE name = "garfield county museum"
What city is Garfield County Museum located in?
CREATE TABLE table_name_39 ( town_city VARCHAR, name VARCHAR )
SELECT high_points FROM table_name_48 WHERE location_attendance = "philips arena 14,413"
Who had the high points when they played in Philips Arena 14,413?
CREATE TABLE table_name_48 (high_points VARCHAR, location_attendance VARCHAR)
SELECT COUNT(new_pageant) FROM table_14308895_2 WHERE country_territory = "Aruba"
How many new pageants does Aruba have?
CREATE TABLE table_14308895_2 (new_pageant VARCHAR, country_territory VARCHAR)
SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming"
Which city is the address of the store named 'FJA Filming' located in?
CREATE TABLE Addresses ( City_Town VARCHAR, Address_ID VARCHAR ) CREATE TABLE Stores ( Address_ID VARCHAR, Store_Name VARCHAR )
SELECT date FROM table_name_41 WHERE game_site = "resch center"
What is the date of the game that took place at the Resch Center?
CREATE TABLE table_name_41 (date VARCHAR, game_site VARCHAR)
SELECT new_pageant FROM table_14308895_2 WHERE country_territory = "Spain"
which is the new pageant from spain?
CREATE TABLE table_14308895_2 (new_pageant VARCHAR, country_territory VARCHAR)
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'
Find the name of amenities Smith Hall dorm have.
CREATE TABLE dorm_amenity ( amenity_name VARCHAR, amenid VARCHAR ) CREATE TABLE has_amenity ( dormid VARCHAR, amenid VARCHAR ) CREATE TABLE dorm ( dormid VARCHAR, dorm_name VARCHAR )
SELECT new_returning_same_network FROM table_name_35 WHERE returning = "april 3" AND show = "shop 'til you drop"
Which network returns april 3, and a Show of shop 'til you drop?
CREATE TABLE table_name_35 (new_returning_same_network VARCHAR, returning VARCHAR, show VARCHAR)
SELECT away_team FROM table_14312471_1 WHERE home_team = "Carlton"
Who was the away team when Carlton was the home team?
CREATE TABLE table_14312471_1 (away_team VARCHAR, home_team VARCHAR)
SELECT COUNT("model") FROM table_204_625 WHERE "availability" = 'discontinued'
how many products have been discontinued ?
CREATE TABLE table_204_625 ( id number, "model" text, "availability" text, "introduced" text, "length of use" text, "last of whiteness" text )
SELECT retitled_as_same FROM table_name_92 WHERE show = "supermarket sweep"
Which retitled network has a Show of supermarket sweep?
CREATE TABLE table_name_92 (retitled_as_same VARCHAR, show VARCHAR)
SELECT COUNT(team) FROM table_14310205_1 WHERE conmebol_1996 = "did not qualify"
what is the number of teams where conmebol 1996 did not qualify?
CREATE TABLE table_14310205_1 (team VARCHAR, conmebol_1996 VARCHAR)
SELECT "School/Club Team" FROM table_40971 WHERE "Player" = 'vince carter'
Which School/Club Team does Vince Carter Play for?
CREATE TABLE table_40971 ( "Player" text, "Nationality" text, "Position" text, "Years in Orlando" text, "School/Club Team" text )
SELECT retitled_as_same FROM table_name_44 WHERE returning = "april 3" AND previous_network = "lifetime"
Which show returns april 3 with a Previous Network of lifetime?
CREATE TABLE table_name_44 (retitled_as_same VARCHAR, returning VARCHAR, previous_network VARCHAR)
SELECT copa_libertadores_1997 FROM table_14310205_1 WHERE team = "Racing Club"
what is the racing club where copa libertadores 1997?
CREATE TABLE table_14310205_1 (copa_libertadores_1997 VARCHAR, team VARCHAR)
SELECT "Athlete" FROM table_61931 WHERE "Run 1" < '54.13' AND "Run 3" = '55.21'
Who is the athlete with a run 1 less than 54.13 and a 55.21 run 3?
CREATE TABLE table_61931 ( "Athlete" text, "Country" text, "Run 1" real, "Run 2" real, "Run 3" real )
SELECT MIN(grid) FROM table_name_3 WHERE manufacturer = "yamaha"
What is the lowest grid number for Yamaha?
CREATE TABLE table_name_3 (grid INTEGER, manufacturer VARCHAR)
SELECT copa_libertadores_1997 FROM table_14310205_1 WHERE supercopa_1996 = "QF"
what is th copa libertadores 1997 is qf?
CREATE TABLE table_14310205_1 (copa_libertadores_1997 VARCHAR, supercopa_1996 VARCHAR)
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'
What is the total number of professors with a Ph.D. ?
CREATE TABLE student ( stu_num number, stu_lname text, stu_fname text, stu_init text, stu_dob time, stu_hrs number, stu_class text, stu_gpa number, stu_transfer number, dept_code text, stu_phone text, prof_num number ) CREATE TABLE employee ( emp_num number, emp_...
SELECT laps FROM table_name_79 WHERE grid > 16 AND time = "+1:35.890"
How many laps had a grid over 16 and a Time of +1:35.890?
CREATE TABLE table_name_79 (laps VARCHAR, grid VARCHAR, time VARCHAR)
SELECT MAX(crowd) FROM table_14312471_4 WHERE ground = "SCG"
What's the maximum crowd when scg is the ground?
CREATE TABLE table_14312471_4 (crowd INTEGER, ground VARCHAR)
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE
For all employees who have the letters D or S in their first name, return a line chart about the change of employee_id over hire_date , and order by the X in ascending.
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT MIN(laps) FROM table_name_81 WHERE manufacturer = "gilera" AND grid < 12
What was the lowest lab for Gilera with a grid less than 12?
CREATE TABLE table_name_81 (laps INTEGER, manufacturer VARCHAR, grid VARCHAR)
SELECT ground FROM table_14312471_4 WHERE crowd = 19929
What are the ground where the crowd totals 19929?
CREATE TABLE table_14312471_4 (ground VARCHAR, crowd VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "CD4/CD8 Ratio"
provide the number of patients whose lab test name is cd4/cd8 ratio?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT MAX(grid) FROM table_name_22 WHERE time = "+1:19.905" AND laps < 20
What is the highest Grid with a time of +1:19.905, and less than 20 laps?
CREATE TABLE table_name_22 (grid INTEGER, time VARCHAR, laps VARCHAR)
SELECT home_team FROM table_14312471_3 WHERE ground = "Manuka Oval"
Name the home team for manuka oval
CREATE TABLE table_14312471_3 (home_team VARCHAR, ground VARCHAR)
SELECT 2004 FROM table_name_31 WHERE 2005 = "not tier i"
What is 2004, when 2005 is 'Not Tier I'?
CREATE TABLE table_name_31 ( Id VARCHAR )
SELECT rider FROM table_name_91 WHERE grid = 21
What Rider has a Grid of 21?
CREATE TABLE table_name_91 (rider VARCHAR, grid VARCHAR)
SELECT away_team AS score FROM table_14312471_3 WHERE away_team = "Richmond"
Name the away team score for richmond
CREATE TABLE table_14312471_3 (away_team VARCHAR)
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
For those employees who did not have any job in the past, find hire_date and the average of employee_id bin hire_date by time, and visualize them by a bar chart.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varc...
SELECT away_captain FROM table_name_68 WHERE result = "[[|]] by 7 wickets"
Who is the away captain when the game resulted in [[|]] by 7 wickets?
CREATE TABLE table_name_68 (away_captain VARCHAR, result VARCHAR)
SELECT report FROM table_14312471_7 WHERE home_team = "North Melbourne"
Who made the report when the home team is north Melbourne?
CREATE TABLE table_14312471_7 (report VARCHAR, home_team VARCHAR)
SELECT "Winner" FROM table_32695 WHERE "Year" = '1965'
Who won in 1965?
CREATE TABLE table_32695 ( "Year" text, "Date" text, "Stages" text, "Distance" text, "Winner" text )
SELECT home_captain FROM table_name_70 WHERE result = "[[|]] by 151 runs"
Who is the home captain of the match that resulted [[|]] by 151 runs?
CREATE TABLE table_name_70 (home_captain VARCHAR, result VARCHAR)
SELECT home_team FROM table_14312471_7 WHERE away_team = "Richmond"
Who played Richmond at home?
CREATE TABLE table_14312471_7 (home_team VARCHAR, away_team VARCHAR)
SELECT SUM("Crowd") FROM table_55190 WHERE "Home team" = 'essendon'
How big was the crowd for Essendon?
CREATE TABLE table_55190 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT SUM(total) FROM table_name_98 WHERE to_par = "–1"
How many totals have a To par of –1?
CREATE TABLE table_name_98 (total INTEGER, to_par VARCHAR)
SELECT home_team FROM table_14312471_7 WHERE ground = "AAMI Stadium"
Who has the home ground Aami stadium?
CREATE TABLE table_14312471_7 (home_team VARCHAR, ground VARCHAR)
SELECT COUNT("Grid") FROM table_56315 WHERE "Driver" = 'pedro de la rosa'
What is Pedro De La Rosa's total number of Grid?
CREATE TABLE table_56315 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT year_s__won FROM table_name_51 WHERE total < 285 AND player = "tom watson"
Which Year(s) won has a Total smaller than 285, and a Player of tom watson?
CREATE TABLE table_name_51 (year_s__won VARCHAR, total VARCHAR, player VARCHAR)
SELECT candidates FROM table_1431467_4 WHERE incumbent = "D. Wyatt Aiken"
Who were all candidate when incumbent was D. Wyatt Aiken?
CREATE TABLE table_1431467_4 (candidates VARCHAR, incumbent VARCHAR)
SELECT "driver" FROM table_203_76 WHERE "grid" = 2
which driver has his grid at 2 ?
CREATE TABLE table_203_76 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number, "points" number )
SELECT finish FROM table_name_12 WHERE total = 288
Which Finish has a Total of 288?
CREATE TABLE table_name_12 (finish VARCHAR, total VARCHAR)
SELECT COUNT(incumbent) FROM table_1431467_4 WHERE district = "South Carolina 5"
How many incumbents for the district of South Carolina 5?
CREATE TABLE table_1431467_4 (incumbent VARCHAR, district VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.short_title = "Temporary colostomy"
count the number of patients whose discharge location is disc-tran cancer/chldrn h and procedure short title is temporary colostomy?
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 te...
SELECT player FROM table_name_89 WHERE year_s__won = "1991"
Who won in 1991?
CREATE TABLE table_name_89 (player VARCHAR, year_s__won VARCHAR)
SELECT first_elected FROM table_1431467_4 WHERE incumbent = "John J. Hemphill"
Who was everyone first elected when incumbent was John J. Hemphill?
CREATE TABLE table_1431467_4 (first_elected VARCHAR, incumbent VARCHAR)
SELECT meter_400, meter_100 FROM swimmer
Return a bar chart about the distribution of meter_400 and meter_100 .
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 swimmer ( ID int, name text, Nationality text, meter_100 real, meter_20...
SELECT player FROM table_name_64 WHERE pick < 149 AND round = 9
Who was picked before 149 in round 9?
CREATE TABLE table_name_64 (player VARCHAR, pick VARCHAR, round VARCHAR)
SELECT mixed_doubles FROM table_14319023_2 WHERE girls_singles = "Lindaweni Fanetri"
When the girls singles is lindaweni fanetri what is the mixed doubled?
CREATE TABLE table_14319023_2 (mixed_doubles VARCHAR, girls_singles VARCHAR)
SELECT COUNT(*) FROM student
Find the number of students in total.
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE voting_record ( stuid number, registration_date text, election_cycle text, president_vote number, vice_president_vote number...
SELECT player FROM table_name_30 WHERE round < 10 AND pick = 16
Who was pick 16 and before round 10?
CREATE TABLE table_name_30 (player VARCHAR, round VARCHAR, pick VARCHAR)
SELECT boys_doubles FROM table_14319023_2 WHERE girls_doubles = "Ayu Pratiwi Anggi Widia"
When the girls doubles is ayu pratiwi anggi widia what is the boys doubles?
CREATE TABLE table_14319023_2 (boys_doubles VARCHAR, girls_doubles VARCHAR)
SELECT "nationality" FROM table_204_832 WHERE "name" = 'marc dos santos'
what same country did marc dos santos coach as colin miller ?
CREATE TABLE table_204_832 ( id number, "name" text, "nationality" text, "club" text, "from" number, "until" text )