schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Opn/oth rep mtrl vlv-tis"
provide the number of patients whose procedure short title is opn/oth rep mtrl vlv-tis?
<table0>[injury_accident] { <col0>[game_id]:[int] <col1>[int]:[Player] <col2>[text]:[Injury] <col3>[text]:[Number_of_matches] <col4>[text]:[Source] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Home_Games] <col2>[int]:[Average_Attendance] <col3>[real]:[Total_Attendance] <col4>[real]:[Capacity_Percentage] } <...
SELECT Season, COUNT( Season ) FROM `<table2>` GROUP BY Season
I want to see trend of the number of season by season
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Manufacturer, Revenue FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder
For those records from the products and each product's manufacturer, visualize the relationship between manufacturer and revenue , and group by attribute founder.
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:...
SELECT `<table2>`.admittime FROM `<table2>` WHERE `<table2>`.subject_id = "17787"
for id 17787, specify the time of admission
<table0>[table_27107] { <col0>[Episode]:[Number] <col1>[real]:[Location] <col2>[text]:[Original] <col3>[Airdate]:[text] <col4>[Challenge]:[Winner] <col5>[text]:[Challenge] }
SELECT COUNT( "Original Airdate" ) FROM `<table0>` WHERE "Location" = 'Philadelphia, Pennsylvania'
How many dates originally aired episodes located in Philadelphia, pennsylvania?
<table0>[donations] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[donor_id] <col2>[INT]:[organization_id] <col3>[INT]:[donation_date] <col4>[DATE]:[donation_amount] <col5>[DECIMAL]:[INSERT] }
SELECT d.city, AVG( d.donation_amount ) as avg_donation FROM `<table0>` d JOIN organizations o ON d.organization_id = o.id WHERE o.cause = 'Climate Change' GROUP BY d.city ORDER BY avg_donation DESC LIMIT 3;
Who are the top 3 cities with the highest average donation amount in the Climate Change focus area?
<table0>[table_name_37] { <col0>[bronze]:[INTEGER] <col1>[silver]:[INTEGER] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 0
How many Bronze medals did the Nation with 0 Silver receive?
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table2>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premi...
SELECT DISTINCT advance_purchase, application, maximum_stay, minimum_stay, no_discounts, `<table20>`_code, saturday_stay_required, `<col2>` FROM `<table20>` WHERE `<table20>`_code = 'AP/80'
what is the meaning of restriction ap80
<table0>[drugs] { <col0>[drug_id]:[INT] <col1>[name]:[VARCHAR] <col2>[255]:[approval_date] } <table1>[rd_expenditures] { <col0>[expenditure_id]:[INT] <col1>[drug_id]:[INT] <col2>[INT]:[year] }
SELECT d.name, d.approval_date, STDDEV( re.amount ) as stddev_expenditures FROM `<table0>` d JOIN rd_expenditures re ON d.drug_id = re.drug_id GROUP BY d.name, d.approval_date;
What is the standard deviation of R&D expenditures for each drug that has been approved by the FDA, including the drug name and approval date?
<table0>[chapters] { <col0>[integer]:[Act] <col1>[integer]:[Scene] <col2>[integer]:[Description] <col3>[text]:[work_id] } <table1>[characters] { <col0>[integer]:[CharName] <col1>[text]:[Abbrev] <col2>[text]:[Description] } <table2>[paragraphs] { <col0>[integer]:[ParagraphNum] <col1>[integer]:[PlainText] <col2>[text]:...
SELECT COUNT( id ) FROM `<table3>` WHERE Date < 1602
How many of Shakespeare's works were finished before the year 1602?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.age < "56" AND lab.itemid = "51484"
how many patients aged below 56 years had the item id 51484?
<table0>[Tunnels] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[length] <col3>[FLOAT]:[INSERT] }
SELECT name FROM `<table0>` WHERE location = 'New York' AND length <= 2 * 5280;
Show the tunnels in New York with a length less than or equal to 2 miles.
<table0>[table_name_29] { <col0>[loss]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "54-61"
Who took the loss in the game that ended with a 54-61 record?
<table0>[table_79026] { <col0>[Position]:[real] <col1>[Club]:[text] <col2>[Played]:[real] <col3>[Points]:[real] <col4>[Wins]:[real] <col5>[Draws]:[real] <col6>[Losses]:[real] <col7>[Goals]:[real] <col8>[Goals]:[real] <col9>[Goal]:[Difference] }
SELECT MIN( "Goals for" ) FROM `<table0>` WHERE "Played" > '30'
What is the goals for when played is larger than 30?
<table0>[table_name_62] { <col0>[tournament]:[VARCHAR] }
SELECT 2011 FROM `<table0>` WHERE `<col0>` = "tokyo"
Name the 2011 for tokyo tournament
<table0>[table_10376] { <col0>[Rank]:[text] <col1>[text]:[Height] <col2>[text]:[Floors] <col3>[real]:[Year] }
SELECT "Name" FROM `<table0>` WHERE "Rank" = '27=' AND "Year" < '1964'
Tell me the name for rank of 27= and years before 1964
<table0>[table_name_55] { <col0>[series_ep]:[VARCHAR] <col1>[netflix]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "s03e16"
Which series episode has a Netflix episode of S03E16?
<table0>[VolunteerHours] { <col0>[HourID]:[INT] <col1>[VolunteerName]:[TEXT] <col2>[Region]:[TEXT] <col3>[HoursSpent]:[DECIMAL] <col4>[HourDate]:[DATE] }
SELECT MAX( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'Chicago' GROUP BY HourDate;
What is the maximum number of volunteer hours spent in a single day in the Chicago region?
<table0>[Student] { <col0>[LName]:[VARCHAR] <col1>[age]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = ( SELECT MIN( `<col1>` ) FROM `<table0>` )
What is the last name of the youngest student?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] {...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.days_stay > "4" AND lab.itemid = "51347"
what is the number of patients whose days of hospital stay is greater than 4 and item id is 51347?
<table0>[table_name_37] { <col0>[score]:[VARCHAR] <col1>[attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1,125"
What is the score of the game with 1,125 people in attendance?
<table0>[routes] { <col0>[INT]:[distance] <col1>[FLOAT]:[start_location] <col2>[VARCHAR]:[end_location] }
INSERT INTO routes ( id, distance, start_location, end_location ) VALUES ( 4, 850, 'Sydney', 'Melbourne' );
Insert a new record into the "routes" table with the following data: "id" = 4, "distance" = 850km, "start_location" = "Sydney", "end_location" = "Melbourne"
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[...
SELECT JOB_ID, `<col7>` FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col6>`
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and salary , and sort by the x-axis in ascending.
<table0>[states] { <col0>[INT]:[name] } <table1>[charging_stations] { <col0>[INT]:[state_id] <col1>[INT]:[station_count] <col2>[INT]:[INSERT] <col3>[states]:[name] <col4>[VALUES]:[California] <col5>[Texas]:[Florida] }
SELECT s.name, SUM( cs.station_count ) FROM `<table0>` s JOIN charging_stations cs ON s.id = cs.state_id GROUP BY s.name;
How many electric vehicle charging stations are in each state?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.days_stay > "3" AND diagnoses.long_title = "Ulcer of other part of foot"
give me the number of patients whose days of hospital stay is greater than 3 and diagnoses long title is ulcer of other part of foot?
<table0>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table2>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline...
SELECT DISTINCT fare.fare_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PI...
i'd like to book the cheapest one way flight from DENVER to PITTSBURGH
<table0>[ATT_CLASSES] { <col0>[ATT_CLASS_ID]:[integer] <col1>[ATT_CLASS]:[text] } <table1>[OBJ_CLASSES] { <col0>[OBJ_CLASS_ID]:[integer] <col1>[OBJ_CLASS]:[text] } <table2>[IMG_OBJ] { <col0>[IMG_ID]:[integer] <col1>[OBJ_SAMPLE_ID]:[integer] <col2>[OBJ_CLASS_ID]:[integer] <col3>[integer]:[integer] <col4>[integer]:[int...
SELECT CAST( COUNT( `<col1>` ) AS REAL ) / COUNT( DISTINCT `<col0>` ) FROM `<table2>`
Calculate the average of object samples for the image.
<table0>[table_203_117] { <col0>[number]:[region] <col1>[country]:[text] <col2>[1882]:[n1918] <col3>[number]:[1919] <col4>[n1948]:[number] <col5>[1948]:[n1951] <col6>[number]:[1952] <col7>[n1960]:[number] <col8>[1961]:[n1971] <col9>[number]:[1972] <col10>[n1979]:[number] <col11>[1980]:[n1989] <col12>[number]:[1990] <co...
SELECT "1972-\n1979" FROM `<table0>` WHERE "region/country" = 'cuba'
how many immigrants came from cuba in the period 1972-1979 ?
<table0>[rooms] { <col0>[roomid]:[text] <col1>[roomname]:[text] <col2>[beds]:[number] <col3>[bedtype]:[text] <col4>[maxoccupancy]:[number] <col5>[baseprice]:[number] <col6>[decor]:[text] } <table1>[reservations] { <col0>[code]:[number] <col1>[room]:[text] <col2>[checkin]:[text] <col3>[checkout]:[text] <col4>[rate]:[nu...
SELECT `<col6>` FROM `<table0>` WHERE `<col1>` = "Recluse and defiance"
Return the decor of the room named 'Recluse and defiance'.
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmentt...
SELECT DISTINCT `<table7>`.gender FROM `<table7>` WHERE `<table7>`.uniquepid = '006-97726'
what is patient 006-97726's sex?
<table0>[table_43572] { <col0>[Result]:[text] <col1>[TUF]:[Competitor] <col2>[text]:[Opponent] <col3>[text]:[Method] <col4>[text]:[Event] <col5>[text]:[Date] }
SELECT "Date" FROM `<table0>` WHERE "Opponent" = 'lyoto machida'
when is the opponent lyoto machida?
<table0>[Articles] { <col0>[ArticleID]:[int] <col1>[Title]:[varchar] <col2>[100]:[PubDate] <col3>[date]:[Likes] <col4>[int]:[INSERT] }
SELECT AVG( Likes ) as AvgLikes FROM `<table0>` WHERE YEAR( PubDate ) = 2021;
What is the average number of likes per article for articles published in 2021?
<table0>[table_name_43] { <col0>[tournament]:[VARCHAR] <col1>[score_in_final]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5–7, 4–6"
What Tournament had a Score in Final of 5–7, 4–6?
<table0>[table_name_20] { <col0>[position]:[INTEGER] <col1>[goals_against]:[VARCHAR] <col2>[lost]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 63 AND `<col2>` < 6
What position was the team who had less then 63 goals against and less than 6 losses?
<table0>[table_name_99] { <col0>[winning_team]:[VARCHAR] <col1>[usa_captain]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "beth daniel"
When the USA's captain was Beth Daniel, who was the winning team?
<table0>[table_name_55] { }
SELECT 2004 FROM `<table0>` WHERE 2005 = "a" AND 2008 = "a" AND 2009 = "lq"
What is the 2004 value with A in 2005, A in 2008, and lq in 2009?
<table0>[Artists] { <col0>[ArtistID]:[INT] <col1>[ArtistName]:[VARCHAR] <col2>[Nationality]:[VARCHAR] <col3>[ActiveYears]:[INT] } <table1>[Paintings] { <col0>[PaintingID]:[INT] <col1>[PaintingName]:[VARCHAR] <col2>[ArtistID]:[INT] <col3>[DisplayStart]:[DATE] <col4>[DisplayEnd]:[DATE] } <table2>[Gallery] { <col0>[Gall...
SELECT ArtistName, AVG( DATEDIFF( DisplayEnd, `<col3>` ) ) AS AvgDisplayDays FROM `<table1>` JOIN Artists ON `<table1>`.ArtistID = Artists.ArtistID WHERE GalleryName = 'Artistic Wonders' GROUP BY ArtistName ORDER BY AvgDisplayDays DESC;
What is the average length of time a painting is on display, per artist, at the 'Artistic Wonders' gallery, ordered from longest to shortest display time?
<table0>[table_name_83] { <col0>[rank]:[VARCHAR] <col1>[year_opened]:[VARCHAR] <col2>[state]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1959" AND `<col2>` = "pennsylvania"
What is the rank for the year opened in 1959 in Pennsylvania?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT Headquarter, COUNT( Headquarter ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
For those records from the products and each product's manufacturer, give me the comparison about the amount of headquarter over the headquarter , and group by attribute headquarter by a bar chart.
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]...
SELECT COUNT( DISTINCT `<table9>`.icustay_id ) FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 59707 )
count the number of icu visits from patient 59707.
<table0>[patients] { <col0>[patient_id]:[INT] <col1>[condition]:[VARCHAR] } <table1>[conditions] { <col0>[condition_id]:[INT] <col1>[condition]:[VARCHAR] }
SELECT COUNT( DISTINCT `<table0>`.patient_id ) AS total_`<table0>` FROM `<table0>` INNER JOIN conditions ON `<table0>`.condition = conditions.condition WHERE conditions.condition IN ( 'Depression', 'Anxiety' ) AND `<table0>`.condition IS NOT NULL AND `<table0>`.condition <> '';
What is the total number of patients with depression or anxiety in Colombia?
<table0>[table_name_4] { <col0>[home_team]:[VARCHAR] }
SELECT `<col0>` AS score FROM `<table0>` WHERE `<col0>` = "st kilda"
What is the home team score of St Kilda?
<table0>[table_name_84] { <col0>[format]:[VARCHAR] <col1>[catalog]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "887 847-1" AND `<col2>` = "september 1990"
What was the format in September 1990 for Catalog 887 847-1?
<table0>[table_name_81] { <col0>[erp_w]:[VARCHAR] <col1>[call_sign]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "w242ak"
What is the total number of the ERP W with a call sign of w242ak?
<table0>[table_name_64] { <col0>[high_assists]:[VARCHAR] <col1>[high_points]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "tayshaun prince ( 23 )"
What is High Assists, when High Points is "Tayshaun Prince (23)"?
<table0>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table1>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[VARCHAR] } <table2>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[...
SELECT Budget_Type_Description, COUNT( Budget_Type_Description ) FROM `<table5>` AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY Budget_Type_Description ORDER BY COUNT( Budget_Type_Description )
Return a bar chart to show how many documents for different budget type description, and list the number of budget type description in asc order.
<table0>[Events] { <col0>[EventID]:[INT] <col1>[VARCHAR]:[Country] <col2>[VARCHAR]:[StartDate] <col3>[DATE]:[EndDate] <col4>[DATE]:[Attendance] <col5>[INT]:[INSERT] }
SELECT Name, Attendance FROM `<table0>` ORDER BY Attendance DESC LIMIT 1;
What is the most popular eSports event by attendance?
<table0>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]:[Location] } <table1>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_per_day]:[int] <col4>[Price]:[float] } <table2>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_...
SELECT Title, MAX( T1.Price ) FROM `<table1>` AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title
Give me the title and highest price for each film Show bar chart, could you display in ascending by the x-axis?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]...
SELECT MAX( `<table1>`.age ) FROM `<table1>` WHERE `<table1>`.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND `<table1>`.admityear >= "2151"
Find out the maximum age of patients who were admitted in or after 2151 and have aortic valve insufficiency/aortic valve replacement/sda as their primary disease.
<table0>[table_9223] { <col0>[Event]:[text] <col1>[Time]:[text] <col2>[text]:[Nation] <col3>[text]:[Games] <col4>[text]:[Date] }
SELECT "Name" FROM `<table0>` WHERE "Event" = '500 metres'
Who set the record in the 500 metres event?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admission_type = "EMERGENCY" AND lab.itemid = "51269"
provide the number of patients whose admission type is emergency and item id is 51269?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.insurance = "Medicaid" AND `<table4>`.admityear < "2103"
provide the number of patients whose insurance is medicaid and admission year is less than 2103?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T2.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
For those records from the products and each product's manufacturer, give me the comparison about the average of price over the name , and group by attribute name by a bar chart, could you list by the bars in desc?
<table0>[table_38321] { <col0>[Game]:[real] <col1>[October]:[real] <col2>[Opponent]:[text] <col3>[Score]:[text] <col4>[Record]:[text] <col5>[Points]:[real] }
SELECT "Score" FROM `<table0>` WHERE "Points" > '8'
What was the score of the game that had more than 8 points?
<table0>[artist] { <col0>[artist_name]:[varchar2] <col1>[country]:[varchar2] <col2>[gender]:[varchar2] <col3>[preferred_genre]:[varchar2] } <table1>[genre] { <col0>[g_name]:[varchar2] <col1>[rating]:[varchar2] <col2>[most_popular_in]:[varchar2] } <table2>[song] { <col0>[song_name]:[varchar2] <col1>[artist_name]:[varc...
SELECT formats, COUNT( * ) FROM `<table3>` GROUP BY `<col4>`
How many songs were released for each format. Show bar chart.
<table0>[table_40535] { <col0>[Date]:[text] <col1>[Cover]:[model] <col2>[text]:[Centerfold] <col3>[model]:[text] <col4>[Interview]:[subject] <col5>[text]:[Questions] }
SELECT "Cover model" FROM `<table0>` WHERE "20 Questions" = 'christina applegate'
Which Cover model has a 20 Questions of christina applegate?
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[n...
SELECT COUNT( * ) > 0 FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 27242 ) AND `<table16>`.drug IN ( 'hydralazine', '0.9% sodium chloride', 'insulin' )
hydralazine, 0.9% sodium chloride or insulin had been prescribed to patient 27242?
<table0>[table_40013] { <col0>[Date]:[text] <col1>[Score]:[text] <col2>[Set]:[text] <col3>[Set]:[text] <col4>[Set]:[text] <col5>[Set]:[text] <col6>[Set]:[text] <col7>[Total]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Set 3" = '18-25'
When was set 3 of 18-25?
<table0>[financial_wellbeing] { <col0>[individual_id]:[INT] <col1>[country]:[VARCHAR] }
SELECT country, AVG( `<table0>` ) * 100.0 AS percentage FROM `<table0>` GROUP BY `<col1>` ORDER BY percentage DESC;
Calculate the percentage of individuals who have achieved financial wellbeing in each country, and order the results by the percentage in descending order.
<table0>[savings] { <col0>[balance]:[VARCHAR] <col1>[custid]:[VARCHAR] } <table1>[accounts] { <col0>[name]:[VARCHAR] <col1>[custid]:[VARCHAR] } <table2>[checking] { <col0>[balance]:[VARCHAR] <col1>[custid]:[VARCHAR] }
SELECT T2.balance, T3.balance, T1.name FROM `<table1>` AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid
Find the name, checking balance and saving balance of all accounts in the bank.
<table0>[table_name_71] { <col0>[second_party]:[VARCHAR] <col1>[first_party]:[VARCHAR] <col2>[election]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "conservative" AND `<col2>` = "1834"
What is the second party that has a conservative first party in the 1834 election?
<table0>[table_name_98] { <col0>[opponent]:[VARCHAR] <col1>[attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "628"
Who was the opponent with an attendance of 628?
<table0>[Part_Faults] { <col0>[part_fault_id]:[INTEGER] <col1>[part_id]:[INTEGER] <col2>[fault_short_name]:[VARCHAR] <col3>[fault_description]:[VARCHAR] <col4>[255]:[other_fault_details] <col5>[VARCHAR]:[255] } <table1>[Fault_Log] { <col0>[fault_log_entry_id]:[INTEGER] <col1>[asset_id]:[INTEGER] <col2>[recorded_by_sta...
SELECT fault_short_name, COUNT( `<col2>` ) FROM `<table0>` AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC
A bar chart about the number of faults for different fault short name, show in descending by the total number.
<table0>[table_62905] { <col0>[Rank]:[real] <col1>[Actor]:[text] <col2>[Character]:[text] <col3>[Soap]:[Opera] <col4>[text]:[Years] <col5>[text]:[Duration] }
SELECT MAX( "Rank" ) FROM `<table0>` WHERE "Years" = '1960—'
What is the highest Rank 1960 ?
<table0>[table_80374] { <col0>[2002]:[text] <col1>[2004]:[text] <col2>[2006]:[text] <col3>[2007]:[text] <col4>[2008]:[text] <col5>[2009]:[text] <col6>[2010]:[text] <col7>[2011]:[text] <col8>[2012]:[text] }
SELECT "2011/ 12" FROM `<table0>` WHERE "2008/ 09" = 'not held' AND "2010/ 11" = 'not held'
Name the 2011/12 with 2008/09 of not held with 2010/11 of not held
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab...
SELECT `<table2>`.gender, prescriptions.drug FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.subject_id = "2560"
what is the gender and drug name of the patient id 2560?
<table0>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[Accepted...
SELECT * FROM `<table1>` WHERE PostTypeId = 1 AND NOT ClosedDate IS NULL AND Score >= 250 OR ViewCount >= 150000 AND CreationDate BETWEEN '2008-01-01' AND '2009-01-01' LIMIT 100
Week 1 Homework 1A 2008.
<table0>[Statements] { <col0>[Statement_ID]:[INTEGER] <col1>[Statement_Details]:[VARCHAR] } <table1>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table2>[Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Document_Type_Code]:[CHAR] <col2>[Project_ID]:[INTEGER] <col3>...
SELECT Document_Name, COUNT( `<col4>` ) FROM `<table2>` GROUP BY `<col4>`
How many documents for different document name? Draw a bar chart.
<table0>[table_15703] { <col0>[Rank]:[real] <col1>[Lane]:[real] <col2>[text]:[Nationality] <col3>[text]:[Time] }
SELECT MIN( "Rank" ) FROM `<table0>` WHERE "Nationality" = 'poland' AND "Time" > '55.34'
What is the lowest rank with poland as the nationality and a time greater than 55.34?
<table0>[table_name_46] { <col0>[country]:[VARCHAR] <col1>[place]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "t4" AND `<col2>` = 66 - 71 - 72 = 209
What country is in T4 place having a score of 66-71-72=209?
<table0>[table_69551] { <col0>[Year]:[real] <col1>[Men]:[singles] <col2>[text]:[Women] <col3>[singles]:[text] <col4>[Men]:[doubles] <col5>[text]:[Women] <col6>[doubles]:[text] <col7>[Mixed]:[doubles] }
SELECT "Women's doubles" FROM `<table0>` WHERE "Mixed doubles" = 'lee jae-jin lee eun-woo'
What player played women's doubles when lee jae-jin lee eun-woo played mixed doubles?
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[Badg...
SELECT Id, Reputation, CreationDate, DisplayName, LastAccessDate, WebsiteUrl, Location, AboutMe, Views, UpVotes, DownVotes, ProfileImageUrl, Age, AccountId FROM `<table15>` WHERE Id = '##UserId##'
Show User Details (Beginners Query).
<table0>[table_name_54] { <col0>[level]:[VARCHAR] <col1>[season]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 2010
What Level has a Season larger than 2010?
<table0>[film_text] { <col0>[film_id]:[integer] <col1>[title]:[text] <col2>[description]:[text] } <table1>[actor] { <col0>[actor_id]:[integer] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[last_update]:[datetime] } <table2>[address] { <col0>[address_id]:[integer] } <table3>[category] { <col0>[category_id...
SELECT T1.description FROM `<table7>` AS T1 INNER JOIN `<table7>`_category AS T2 ON T1.`<table7>`_id = T2.`<table7>`_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.`name` = 'Travel'
List the descriptions of movies under the category Travel.
<table0>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MATSCIE' AND course.number = 360 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offerin...
Who is the instructor for course MATSCIE 360 ?
<table0>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table2>[airport_service] { <col0>[city_code]...
SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE ( ( ( flight.arrival_time <= 2230 AND flight.arrival_time >= 2130 ) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN JOSE' AND flight.to_airport = airport_service.airport_code ) AND airport.airport_code = 'LGA' AN...
what flights on UA leave LGA for SAN JOSE and arrive around 10pm
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>...
SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "REPLACE"
how many patients whose ethnicity is black/haitian and drug route is replace?
<table0>[table_4217] { <col0>[Skip]:[Club] <col1>[text]:[real] <col2>[real]:[real] <col3>[real]:[Ends] <col4>[Won]:[real] <col5>[Ends]:[Lost] <col6>[real]:[Blank] <col7>[Ends]:[real] <col8>[Stolen]:[Ends] }
SELECT MIN( "Stolen Ends" ) FROM `<table0>` WHERE "Skip ( Club )" = 'Jeff Currie ( Port Arthur )'
When jeff currie (port arthur) is the skip (club) what is the lowest amount of stolen ends?
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden...
SELECT RANK( ) OVER ( ORDER BY Score DESC, ViewCount DESC ), Title, b.DisplayName AS UserName, Score, ViewCount, CAST( TIME_TO_STR( a.CreationDate, '%d/%m/%Y' ) AS TEXT( 30 ) ) AS Date, Tags FROM `<table21>` AS a INNER JOIN Users AS b ON a.OwnerUserId = b.Id WHERE a.CreationDate BETWEEN '03-09-2015' AND '03-22-2015' AN...
Display Posts By Votes For Tag in Timerange.
<table0>[Elimination] { <col0>[Elimination_ID]:[text] <col1>[Wrestler_ID]:[text] <col2>[Team]:[text] <col3>[Eliminated_By]:[text] <col4>[Elimination_Move]:[text] <col5>[Time]:[text] } <table1>[wrestler] { <col0>[Wrestler_ID]:[int] <col1>[text]:[Reign] <col2>[text]:[Days_held] <col3>[text]:[Location] <col4>[text]:[Even...
SELECT Team, COUNT( * ) FROM `<table0>` GROUP BY `<col2>` ORDER BY `<col2>`
A bar chart about how many eliminations did each team have?, and sort by the bar in asc.
<table0>[user_interactions] { <col0>[INT]:[user_id] <col1>[INT]:[content_type] <col2>[VARCHAR]:[interaction_date] } <table1>[content] { <col0>[INT]:[content_type] <col1>[VARCHAR]:[tags] <col2>[VARCHAR]:[500] <col3>[country]:[VARCHAR] }
SELECT COUNT( DISTINCT ui.user_id ) as total_users FROM `<table0>` ui JOIN content c ON ui.content_type = c.content_type WHERE c.tags LIKE '%indigenous rights%' AND c.country = 'Canada' AND interaction_date >= '2021-01-01' AND interaction_date <= '2021-12-31';
Show the total number of users who have engaged with content related to indigenous rights in Canada, for the year 2021.
<table0>[journal_committee] { <col0>[Editor_ID]:[int] <col1>[Journal_ID]:[int] <col2>[Work_Type]:[text] } <table1>[journal] { <col0>[Journal_ID]:[int] <col1>[Date]:[text] <col2>[Theme]:[text] <col3>[Sales]:[int] } <table2>[editor] { <col0>[Editor_ID]:[int] <col1>[text]:[Age] }
SELECT Name, COUNT( Name ) FROM `<table2>` GROUP BY Name ORDER BY COUNT( Name )
Group and count the name attribute for visualizing a bar chart, and display total number in asc order.
<table0>[table_34230] { <col0>[Player]:[text] <col1>[Rec]:[real] <col2>[Yards]:[real] <col3>[Avg]:[real] <col4>[Long]:[real] }
SELECT SUM( "Yards" ) FROM `<table0>` WHERE "Player" = 'davin meggett' AND "Rec." > '9'
How many yards did Davin Meggett have with more than 9 Rec.?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT t1.`<table3>`name FROM ( SELECT `<table3>`.`<table3>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table3>` WHERE STRFTIME( '%y', `<table3>`.`<table3>`resulttime ) >= '2101' GROUP BY `<table3>`.`<table3>`name ) AS t1 WHERE t1.c1 <= 4
what was the four most frequently performed lab tests since 2101?
<table0>[drugs] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[manufacturer]:[VARCHAR] <col4>[255]:[category] <col5>[VARCHAR]:[255] } <table1>[clinical_trials] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[drug_id]:[INT] <col4>[phase]:[VARCHAR] <col5>[start_date]:[DAT...
SELECT `<table0>`.name FROM `<table0>` LEFT JOIN market_access ON `<table0>`.id = market_access.drug_id WHERE `<table0>`.id IN ( SELECT `<table1>`.drug_id FROM `<table1>` WHERE `<table1>`.phase = 'Phase III' ) AND market_access.id IS NULL;
Which drugs have been tested in Phase III clinical trials but not yet approved in any country?
<table0>[esports_tournaments] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[game_name] <col3>[VARCHAR]:[location] <col4>[VARCHAR]:[start_date] <col5>[DATE]:[end_date] }
INSERT INTO esports_tournaments ( id, name, game_name, location, start_date, end_date ) VALUES ( 1, 'Tournament A', 'Game X', 'USA', '2023-01-01', '2023-01-03' );
Insert new eSports tournament data
<table0>[course] { <col0>[title]:[VARCHAR] <col1>[course_id]:[VARCHAR] } <table1>[teaches] { <col0>[course_id]:[VARCHAR] } <table2>[instructor] { <col0>[name]:[VARCHAR] }
SELECT T1.title, T3.name FROM `<table0>` AS T1 JOIN teaches AS T2 ON T1.`<table0>`_id = T2.`<table0>`_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title
list in alphabetic order all course names and their instructors' names in year 2008.
<table0>[table_name_33] { <col0>[year]:[INTEGER] <col1>[category]:[VARCHAR] <col2>[stage]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1" AND `<col2>` = 12
What is the lowest year for stage 12, category 1?
<table0>[table_20903658_1] { <col0>[title_subject]:[VARCHAR] <col1>[medium]:[VARCHAR] <col2>[public_office]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Bronze" AND `<col2>` = "colonist and soldier in Ville Marie, New France"
Who was the subject of the bronze sculpture who was a colonist and soldier in Ville Marie, New France?
<table0>[military_innovation] { <col0>[country]:[VARCHAR] <col1>[year]:[INT] <col2>[budget]:[FLOAT] }
SELECT SUM( `<col2>` ) FROM `<table0>` WHERE region = 'Asia-Pacific' AND `<col1>` = 2022;
What is the total budget allocated for military innovation by countries in the Asia-Pacific region for the year 2022?
<table0>[TrafficViolations] { <col0>[INT]:[Driver] <col1>[VARCHAR]:[255] <col2>[Violation]:[VARCHAR] }
SELECT COUNT( * ) OVER ( PARTITION BY Driver ) AS ViolationCount, RANK( ) OVER ( PARTITION BY NULL ORDER BY COUNT( * ) DESC ) AS OffenderRank FROM `<table0>` GROUP BY Driver HAVING COUNT( * ) > 1;
How many traffic violations were committed by repeat offenders?
<table0>[table_70672] { <col0>[Volume]:[Issue] <col1>[text]:[Issue] <col2>[Date]:[text] <col3>[Weeks]:[real] <col4>[Song]:[text] <col5>[Artist]:[text] }
SELECT "Issue Date( s )" FROM `<table0>` WHERE "Volume:Issue" = '32:18-19'
What is the Issue Date(s) of Volume:Issue of 32:18-19?
<table0>[table_name_39] { <col0>[city]:[VARCHAR] <col1>[region]:[VARCHAR] <col2>[host]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mideast" AND `<col2>` = "temple university"
Which city in the mideast region is the hot of Temple University?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND `<table3>`.age < "58"
how many patients admitted and transferred from hosp/extram are below 58 years of age?
<table0>[table_name_15] { <col0>[run_1]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "italy ( ita ) italy i"
What is Run 1, when Team is "Italy (ITA) Italy I"?
<table0>[table_25143] { <col0>[Position]:[real] <col1>[2005]:[u20132006] <col2>[text]:[2006] <col3>[u20132007]:[text] <col4>[2007]:[u20132008] <col5>[text]:[2008] <col6>[u20132009]:[text] <col7>[2009]:[u20132010] }
SELECT "Position" FROM `<table0>` WHERE "2006\u20132007" = 'Chris Crowther'
what is the position for chris crowther in 2006-2007?
<table0>[table_name_21] { <col0>[tournament]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "april 20, 1987"
Which tournament has a Date of april 20, 1987?
<table0>[regulatory_frameworks] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[country]:[VARCHAR] <col3>[255]:[implementation_date] <col4>[DATE]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` IN ( 'Australia', 'New Zealand' ) AND implementation_date BETWEEN '2018-01-01' AND '2021-12-31';
Summarize the number of regulatory frameworks implemented in Oceania between 2018 and 2021.
<table0>[table_54620] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Decision]:[text] <col5>[Attendance]:[real] <col6>[Record]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Visitor" = 'atlanta' AND "Home" = 'ottawa'
What was the date of the game where Ottawa was the home team and Atlanta is the visiting team?
<table0>[cargo_handling] { <col0>[INT]:[vessel_name] <col1>[VARCHAR]:[port] <col2>[VARCHAR]:[handling_time] <col3>[INT]:[INSERT] }
SELECT AVG( handling_time ) FROM `<table0>` WHERE port = 'Seattle';
What is the average cargo handling time for vessels in port 'Seattle'?