schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[review] { <col0>[rid]:[int] <col1>[business_id]:[varchar] <col2>[user_id]:[varchar] <col3>[rating]:[float] <col4>[text]:[longtext] <col5>[year]:[int] <col6>[month]:[varchar] } <table1>[business] { <col0>[bid]:[int] <col1>[business_id]:[varchar] <col2>[name]:[varchar] <col3>[full_address]:[varchar] <col4>[city...
SELECT `<col2>` FROM `<table1>` WHERE `<col9>` = 3.5
List all businesses with rating 3.5
<table0>[table_12161822_5] { <col0>[grand_prix]:[VARCHAR] <col1>[winning_driver]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jenson Button"
what's the grand prix with winning driver being jenson button
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } ...
SELECT `<table13>`.charttime FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 20332 ) AND STRFTIME( '%y', `<table13>`.charttime ) = '2102' ORDER BY `<table13>`.charttime DESC LIMIT 1
when was the last time in 2102 that patient 20332 had a procedure?
<table0>[table_56615] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Away `<col2>` score" = '11.14 ( 80 )'
When was the game played where the away team scored 11.14 (80)?
<table0>[table_name_31] { <col0>[area__km_2]:[INTEGER] <col1>[most_spoken_language]:[VARCHAR] <col2>[place]:[VARCHAR] }
SELECT MIN( area__km_2__ ) FROM `<table0>` WHERE `<col1>` = "afrikaans" AND `<col2>` = "cannonvale"
What is the lowest area for cannonvale that speaks afrikaans?
<table0>[table_name_56] { <col0>[result]:[VARCHAR] <col1>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1999
What is the result for the year 1999?
<table0>[table_20098479_1] { <col0>[written_by]:[VARCHAR] <col1>[no_in_series]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 48
Who wrote episode number 48
<table0>[Catalogs] { <col0>[catalog_id]:[INTEGER] <col1>[catalog_name]:[VARCHAR] <col2>[catalog_publisher]:[VARCHAR] <col3>[date_of_publication]:[DATETIME] <col4>[date_of_latest_revision]:[DATETIME] } <table1>[Attribute_Definitions] { <col0>[attribute_id]:[INTEGER] <col1>[attribute_name]:[VARCHAR] <col2>[attribute_dat...
SELECT attribute_name, COUNT( `<col1>` ) FROM `<table1>` AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 GROUP BY `<col1>` ORDER BY COUNT( `<col1>` ) DESC
Compute how many attributes in each name of the attribute definitions with attribute value 0 Show the result with a bar chart, I want to display the number of attribute name in descending order.
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[E...
SELECT HIRE_DATE, AVG( `<col10>` ) FROM `<table1>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' ORDER BY AVG( `<col10>` ) DESC
For all employees who have the letters D or S in their first name, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart, sort from high to low by the y-axis.
<table0>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col2>[stop_days]:[text] <col3>[stop_airport]:[text] <col4>[arrival_time]:[int] <col5>[arrival_airline]:[text] <col6>[arrival_flight_number]:[int] <col7>[departure_time]:[int] <col8>[departure_airline]:[text] <col9>[departure_flight_number]:[int]...
SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` AS AIRPORT_SERVICE_1, `<table10>` AS AIRPORT_SERVICE_2, `<table10>` AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fa...
what is the cheapest flight from DENVER to PITTSBURGH leaving on 9 28
<table0>[table_name_82] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "hawthorn"
What team played Hawthorn?
<table0>[countries] { <col0>[INT]:[name] <col1>[TEXT]:[continent] <col2>[TEXT]:[life_expectancy] <col3>[FLOAT]:[INSERT] }
SELECT continent, AVG( life_expectancy ) as avg_life_expectancy, COUNT( name ) as num_`<table0>` FROM `<table0>` WHERE continent IN ( 'Asia', 'Africa' ) GROUP BY continent;
What is the average life expectancy for each country in Asia and Africa, along with the number of countries?
<table0>[companies] { <col0>[company_id]:[INT] <col1>[company_name]:[TEXT] <col2>[sector]:[TEXT] } <table1>[esg_scores] { <col0>[company_id]:[INT] <col1>[esg_score]:[INT] }
SELECT AVG( esg_score ) FROM `<table0>` c JOIN esg_scores s ON c.company_id = s.company_id WHERE c.sector = 'renewable energy';
What is the average ESG score for companies in the renewable energy sector?
<table0>[landfill_capacity] { <col0>[location]:[TEXT] <col1>[current_capacity]:[INTEGER] <col2>[total_capacity]:[INTEGER] }
UPDATE landfill_capacity SET current_capacity = current_capacity - 2000 WHERE location = 'site3';
Update the current capacity of landfill 'site3' by a specified amount.
<table0>[table_80368] { <col0>[Date]:[text] <col1>[Round]:[text] <col2>[Opponent]:[text] <col3>[Venue]:[text] <col4>[Result]:[text] <col5>[Attendance]:[real] <col6>[Scorers]:[text] }
SELECT "Scorers" FROM `<table0>` WHERE "Venue" = 'a' AND "Opponent" = 'st. johnstone'
Who was in a with opponent St. Johnstone?
<table0>[table_name_94] { <col0>[us_cham_rank]:[INTEGER] <col1>[next_highest_spender]:[VARCHAR] <col2>[year]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "national assn of realtors" AND `<col2>` < 2012
Which US Cham Rank is the lowest one that has a Next Highest Spender of national assn of realtors, and a Year smaller than 2012?
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table2>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table3>[requirement] { <col...
SELECT DISTINCT `<table10>`.department, `<table10>`.name, `<table10>`.number, semester.semester FROM `<table10>` INNER JOIN `<table10>`_offering ON `<table10>`.`<table10>`_id = `<table10>`_offering.`<table10>`_id INNER JOIN semester ON semester.semester_id = `<table10>`_offering.semester INNER JOIN program_`<table10>` ...
What available course can be taken in the Fall or Winter for the Other requirement ?
<table0>[table_64595] { <col0>[Version]:[text] <col1>[Standard]:[name] <col2>[text]:[Common] <col3>[name]:[text] <col4>[Downstream]:[rate] <col5>[text]:[Upstream] <col6>[rate]:[text] }
SELECT "Standard name" FROM `<table0>` WHERE "Version" = 'adsl' AND "Common name" = 'adsl over pots'
What's the standard name that has a common name of ADSL Over Pots and ADSL version?
<table0>[table_28798161_3] { <col0>[average]:[VARCHAR] <col1>[bbi]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "4/39"
if the bbi is 4/39 what is the average
<table0>[table_name_77] { <col0>[year]:[VARCHAR] <col1>[venue]:[VARCHAR] <col2>[event]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "los angeles" AND `<col2>` = "foil team"
What is the number of years that the event was foil team and took place in Los Angeles?
<table0>[table_25518547_4] { <col0>[affiliation]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Kwaku Nyamekye"
What university is kwaku nyamekye affiliated with?
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Old FB in soft tissue" AND lab.flag = "delta"
how many patients whose diagnoses short title is old fb in soft tissue and lab test abnormal status is delta?
<table0>[rural_clinics] { <col0>[INT]:[name] <col1>[TEXT]:[age] <col2>[INT]:[gender] <col3>[TEXT]:[INSERT] }
SELECT ROUND( COUNT( CASE WHEN gender = 'Male' THEN 1 END )/COUNT( CASE WHEN gender = 'Female' THEN 1 END ), 2 ) FROM rural_clinics;
What is the ratio of male to female healthcare providers in the "rural_clinics" table?
<table0>[CountryCybersecurity] { <col0>[Country]:[VARCHAR] <col1>[PRIMARY]:[KEY] <col2>[Strategy]:[VARCHAR] <col3>[SuccessRate]:[DECIMAL] }
SELECT `<col0>` FROM `<table0>` WHERE `<col3>` < 0.3 GROUP BY `<col0>` HAVING COUNT( * ) > 1;
Reveal countries with cybersecurity strategies having a lower success rate than 30%
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text]...
SELECT DISTINCT `<table6>`.route FROM `<table6>` WHERE `<table6>`.drug = 'oxycodone'
what are the ways to consume oxycodone?
<table0>[table_38210] { <col0>[Character]:[text] <col1>[Voice]:[Actor] <col2>[Japanese]:[text] <col3>[Voice]:[Actor] <col4>[English]:[1997] <col5>[Saban]:[text] <col6>[Voice]:[Actor] <col7>[English]:[1998] <col8>[Pioneer]:[text] <col9>[Voice]:[Actor] <col10>[English]:[2006] <col11>[FUNimation]:[text] }
SELECT "Character Name" FROM `<table0>` WHERE "Voice Actor ( `<col2>` )" = 'masaharu satou'
what character did Masaharu satou play
<table0>[table_76117] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] }
SELECT "Home team" FROM `<table0>` WHERE "Score" = '0–1' AND "Away team" = 'tottenham hotspur'
Which Home team has a Score of 0 1, and an Away team of tottenham hotspur?
<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 MAX( `<table3>`.days_stay ) FROM `<table3>` WHERE `<table3>`.dob_year > "2060"
what is maximum days of hospital stay of patients whose year of birth is greater than 2060?
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[job_history] { <col0>[EMPLO...
SELECT JOB_ID, `<col10>` FROM `<table3>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col10>` DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about department_id over the job_id by a bar chart, and rank by the DEPARTMENT_ID in descending.
<table0>[table_name_65] { <col0>[opponents_in_the_final]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[tournament]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1998 AND `<col2>` = "bucharest, romania"
Who are the Opponents in the final prior to 1998 in the Bucharest, Romania Tournament?
<table0>[table_78225] { <col0>[Tie]:[real] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Attendance]:[real] }
SELECT SUM( "Attendance" ) FROM `<table0>` WHERE "Tie no" = '19'
How many attended tie number 19?
<table0>[table_name_3] { <col0>[player]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 68 - 70 - 68 - 66 = 272
Which golfer had a score of 68-70-68-66=272?
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[ge...
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '004-34650' ) ) AND STRFTIME( '%y', `<tab...
had patient 004-34650 had any allergies since 2104?
<table0>[Project_Staff] { <col0>[staff_id]:[DOUBLE] <col1>[project_id]:[INTEGER] <col2>[role_code]:[VARCHAR] <col3>[date_from]:[DATETIME] <col4>[date_to]:[DATETIME] <col5>[other_details]:[VARCHAR] } <table1>[Document_Types] { <col0>[document_type_code]:[VARCHAR] <col1>[document_description]:[VARCHAR] } <table2>[Resea...
SELECT date_to, COUNT( `<col4>` ) FROM `<table0>` ORDER BY `<col4>` DESC
Give me the trend about the date_to attributes of all researchers, and bin the date_to into Year interval, I want to rank in descending by the X.
<table0>[routes] { <col0>[rid]:[number] <col1>[dst_apid]:[number] <col2>[dst_ap]:[text] <col3>[src_apid]:[number] <col4>[src_ap]:[text] <col5>[alid]:[number] <col6>[airline]:[text] <col7>[codeshare]:[text] } <table1>[airlines] { <col0>[alid]:[number] <col1>[name]:[text] <col2>[iata]:[text] <col3>[icao]:[text] <col4>[c...
SELECT T1.name FROM `<table1>` AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT( * ) DESC LIMIT 1
What is the name of the airline with the most routes?
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[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_fare] { <col0>...
SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TAMPA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND fl...
what flights from TAMPA to CINCINNATI
<table0>[table_name_90] { <col0>[rank]:[VARCHAR] <col1>[height_ft__m]:[VARCHAR] <col2>[year]:[VARCHAR] <col3>[floors]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 1971 AND `<col3>` < 35 AND height_ft__m_ = "19.0 477 ( 145 )"
After 1971, what is the Rank with a Height ft (m) of 19.0 477 (145) and less than 35 Floors?
<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 T1.Name, T1.Manufacturer FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of manufacturer , and group by attribute name, show in ascending by the y-axis.
<table0>[Artworks] { <col0>[INT]:[artist] <col1>[VARCHAR]:[title] <col2>[VARCHAR]:[year] <col3>[INT]:[type] <col4>[VARCHAR]:[INSERT] }
SELECT artist, COUNT( * ) AS artworks_count FROM `<table0>` GROUP BY artist ORDER BY artworks_count DESC LIMIT 3;
Who are the top 3 artists with the most artworks in the collection?
<table0>[football_data] { <col0>[season]:[text] <col1>[datetime]:[time] <col2>[div]:[text] <col3>[country]:[text] <col4>[league]:[text] <col5>[referee]:[text] <col6>[hometeam]:[text] <col7>[awayteam]:[text] <col8>[fthg]:[number] <col9>[ftag]:[number] <col10>[ftr]:[text] <col11>[hthg]:[number] <col12>[htag]:[number] <co...
SELECT * FROM `<table0>` WHERE `<col3>` = "Spain" AND `<col10>` = "A"
Which matches in Spain did the away team win?
<table0>[table_59515] { <col0>[Opposing]:[Teams] <col1>[text]:[real] <col2>[Date]:[text] <col3>[Venue]:[text] <col4>[Status]:[text] }
SELECT AVG( "Against" ) FROM `<table0>` WHERE "Venue" = 'murrayfield, edinburgh'
What is the average against of Murrayfield, Edinburgh?
<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 DISTINCT T1.Title, T1.GenreType FROM `<table3>` AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1
What are the titles and genres of the one-act works of Shakespeare?
<table0>[table_203_630] { <col0>[number]:[rank] <col1>[number]:[nation] <col2>[text]:[gold] <col3>[number]:[silver] <col4>[number]:[bronze] <col5>[number]:[total] }
SELECT "nation" FROM `<table0>` WHERE "silver" = 13
who only won 13 silver medals ?
<table0>[CREATE] { <col0>[VIEW]:[TOTAL_PRODUCTION] <col1>[SELECT]:[SUM] <col2>[PRODUCTION_QTY]:[GAS_WELLS] }
SELECT SUM( PRODUCTION_QTY ) FROM TOTAL_PRODUCTION;
What is the total production quantity for all wells in the 'TOTAL_PRODUCTION' view?
<table0>[table_5213] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Record]:[text] <col5>[Venue]:[text] <col6>[Attendance]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Attendance" = '35,842'
Attendance of 35,842 had what date?
<table0>[table_74244] { <col0>[series]:[text] <col1>[season]:[text] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] }
SELECT "No. in season" FROM `<table0>` WHERE "Title" = 'Adventures in Babysitting'
the episode 'adventures in babysitting' had what number in the season?
<table0>[table_name_21] { <col0>[city]:[VARCHAR] <col1>[oil_pattern]:[VARCHAR] <col2>[event]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "chameleon" AND `<col2>` = "go rv'ing classic"
What city had the chameleon oil pattern at the Go RV'ing Classic?
<table0>[table_name_8] { <col0>[category]:[VARCHAR] <col1>[established]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1990
Which is the category of the group was establishe in 1990?
<table0>[table_70382] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Record]:[text] }
SELECT "Score" FROM `<table0>` WHERE "Date" = 'june 15'
On the date of June 15 what was the score?
<table0>[table_12828723_5] { <col0>[tries_for]:[VARCHAR] <col1>[tries_against]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "33"
What was the tries for with tries against at 33?
<table0>[founders] { <col0>[INT]:[name] <col1>[TEXT]:[gender] <col2>[TEXT]:[company_id] <col3>[INT]:[INSERT] } <table1>[companies] { <col0>[INT]:[name] <col1>[TEXT]:[INSERT] }
SELECT name FROM `<table0>` WHERE company_id IS NULL;
List all the founders who have not yet founded a company.
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT ACC_Percent, `<col8>` FROM `<table1>` GROUP BY `<col7>`
Draw a scatter chart about the correlation between ACC_Percent and All_Games_Percent , and group by attribute All_Games.
<table0>[football_matches] { <col0>[match_id]:[INT] <col1>[team]:[VARCHAR] <col2>[player]:[VARCHAR] <col3>[matches_played]:[INT] }
SELECT SUM( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'Lionel Messi';
How many matches did Messi play in the 'football_matches' table?
<table0>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degr...
SELECT DISTINCT `<table14>`.department, `<table14>`.name, `<table14>`.number FROM `<table14>` INNER JOIN `<table14>`_offering ON `<table14>`.`<table14>`_id = `<table14>`_offering.`<table14>`_id INNER JOIN semester ON semester.semester_id = `<table14>`_offering.semester INNER JOIN program_`<table14>` ON program_`<table1...
What classes during the Spring and Summer terms are upper-level electives ?
<table0>[suppliers] { <col0>[supplier_id]:[INT] <col1>[supplier_name]:[TEXT] <col2>[country]:[TEXT] <col3>[product_category]:[TEXT] }
SELECT COUNT( DISTINCT `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'India';
Show the number of unique product categories for suppliers in India.
<table0>[BudgetAllocations] { <col0>[INT]:[PoliceStationID] <col1>[INT]:[FiscalYear] <col2>[INT]:[DECIMAL] } <table1>[PoliceStations] { <col0>[INT]:[TEXT] <col1>[City]:[TEXT] <col2>[State]:[TEXT] <col3>[County]:[TEXT] }
WITH updated_allocation AS ( UPDATE BudgetAllocations SET Amount = Amount + 10000 WHERE PoliceStationID = 5001 AND FiscalYear = 2023 RETURNING ID, PoliceStationID, Amount ) SELECT * FROM updated_allocation;
Update the "BudgetAllocations" table to reflect an increase in funding for the specified police station
<table0>[table_name_51] { <col0>[driver]:[VARCHAR] <col1>[laps]:[VARCHAR] <col2>[constructor]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 35 AND `<col2>` = "ferrari"
who is the driver that has laps more than 35 and the constructor is ferrari?
<table0>[table_name_60] { <col0>[round]:[INTEGER] <col1>[college]:[VARCHAR] <col2>[overall]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "idaho" AND `<col2>` < 141
College of idaho, and an Overall smaller than 141 is what average round?
<table0>[table_204_940] { <col0>[number]:[year] <col1>[number]:[tournaments] <col2>[nplayed]:[number] <col3>[cuts]:[nmade] <col4>[number]:[wins] <col5>[number]:[2nd] <col6>[number]:[3rd] <col7>[number]:[10s] <col8>[number]:[best] <col9>[nfinish]:[text] <col10>[earnings]:[u20ac] <col11>[number]:[money] <col12>[nlist]:[r...
SELECT "year" FROM `<table0>` ORDER BY "2nd" DESC LIMIT 1
which year in this golfer 's career saw her have the most 2nd place finishes ?
<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 `<table2>`.admittime, diagnoses.short_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.name = "Josette Orr"
Specify time of admission and icd9 code for patient Josette Orr
<table0>[table_2409041_3] { <col0>[written_by]:[VARCHAR] <col1>[no_in_season]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 23
Who wrote season 23?
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.marital_status = "SINGLE" AND `<table3>`.diagnosis = "ANGIOEDEMA"
What is the number of unmarried patients with angioedema as their primary disease?
<table0>[table_name_36] { <col0>[home_team]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "windy hill"
What was the home team when the game was at Windy Hill?
<table0>[table_203_802] { <col0>[number]:[persian] <col1>[unit]:[text] <col2>[persian]:[name] <col3>[text]:[relation] <col4>[previous]:[unit] <col5>[text]:[metric] <col6>[value]:[text] <col7>[imperial]:[value] }
SELECT "persian unit" FROM `<table0>` WHERE id = 1
what unit is listed first ?
<table0>[table_name_45] { <col0>[tier]:[INTEGER] <col1>[postseason]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "semifinalist"
What is the total number of tiers for the postseason of semifinalist?
<table0>[satellite_deployment] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[country]:[VARCHAR] <col4>[255]:[launch_date] }
DROP TABLE satellite_deployment;
Drop the 'satellite_deployment' table
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]...
SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND...
give me morning flights from ATLANTA to BALTIMORE
<table0>[Policyholder] { <col0>[PolicyholderID]:[INT] <col1>[VARCHAR]:[PolicyType] } <table1>[Claim] { <col0>[ClaimID]:[INT] <col1>[PolicyholderID]:[INT] <col2>[ClaimDate]:[DATE] }
SELECT `<table0>`ID, Name, PolicyType, COUNT( * ) OVER ( PARTITION BY `<table0>`ID ) AS ClaimCount FROM ( SELECT `<table0>`ID, Name, PolicyType, YEAR( ClaimDate ) AS ClaimYear, ROW_NUMBER( ) OVER ( PARTITION BY `<table0>`ID, YEAR( ClaimDate ) ORDER BY ClaimDate DESC ) AS RankClaimDate FROM `<table0>` JOIN Claim ON `<ta...
Which policyholders have had multiple claims within a year?
<table0>[donations] { <col0>[INT]:[donor_id] <col1>[INT]:[region] <col2>[TEXT]:[donation_amount] <col3>[FLOAT]:[INSERT] }
SELECT region, AVG( donation_amount ) FROM `<table0>` GROUP BY region;
What's the average donation amount for each region?
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>...
SELECT SUM( t_kc24.PER_ACC_PAY ) FROM `<table1>` JOIN t_kc24 JOIN `<table1>`_t_kc24 ON `<table1>`.MED_CLINIC_ID = `<table1>`_t_kc24.MED_CLINIC_ID AND `<table1>`_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE `<table1>`.PERSON_NM = '章安澜' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-06-12' AND '2021-06-04'
把2005年6月12日到2021年6月4日期间患者章安澜总共花了多少医保个人账户金额查看一下
<table0>[table_name_23] { <col0>[loss]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "june 13"
Which loss was on June 13?
<table0>[games] { <col0>[game_id]:[INT] <col1>[game_genre]:[VARCHAR] <col2>[255]:[player_id] <col3>[INT]:[playtime_mins] } <table1>[players] { <col0>[player_id]:[INT] <col1>[player_country]:[VARCHAR] }
SELECT MIN( playtime_mins / 60 ) FROM `<table0>` JOIN players ON `<table0>`.player_id = players.player_id WHERE players.player_country = 'India' AND `<col1>` = 'Puzzle';
What is the minimum playtime, in hours, for players from India, for games in the 'Puzzle' genre?
<table0>[table_name_47] { <col0>[player]:[VARCHAR] <col1>[place]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "t5" AND `<col2>` = 75 - 70 = 145
Who is the player with a t5 place and a 75-70=145 score?
<table0>[MobilityTrips] { <col0>[trip_id]:[INT] <col1>[trip_date]:[DATE] <col2>[trip_type]:[TEXT] <col3>[city]:[TEXT] } <table1>[SharedMobility] { <col0>[trip_id]:[INT] <col1>[trip_type]:[TEXT] }
SELECT city, COUNT( * ) AS total_trips FROM `<table0>` mp INNER JOIN SharedMobility sm ON mp.trip_id = sm.trip_id WHERE `<col1>` >= DATE_SUB( CURDATE( ), INTERVAL 3 MONTH ) GROUP BY city;
What is the total number of shared mobility trips in the last quarter, broken down by city?
<table0>[marine_species] { <col0>[INT]:[species_name] <col1>[VARCHAR]:[255] <col2>[ocean]:[VARCHAR] <col3>[255]:[depth] <col4>[INT]:[INSERT] }
UPDATE marine_species SET depth = 3500 WHERE species_name = 'Southern Ocean Squid';
Update the depth of the 'Southern Ocean Squid' to 3500 meters in the marine_species table.
<table0>[procedures] { <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>[la...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.discharge_location = "HOME" AND procedures.short_title = "Cardiopulm resuscita NOS"
How many patients are discharged to home health care and underwent the procedure cardiopulm resuscitate nos?
<table0>[table_name_87] { <col0>[silver]:[INTEGER] <col1>[nation]:[VARCHAR] <col2>[total]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "canada" AND `<col2>` < 3
What is the fewest number of silver medals won by Canada with fewer than 3 total medals?
<table0>[HotelBookings] { <col0>[booking_id]:[INT] <col1>[hotel_id]:[INT] <col2>[guest_name]:[VARCHAR] <col3>[checkin_date]:[DATE] <col4>[checkout_date]:[DATE] } <table1>[VirtualTours] { <col0>[tour_id]:[INT] <col1>[location]:[VARCHAR] <col2>[tour_name]:[VARCHAR] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] } <t...
SELECT DISTINCT hb.hotel_id FROM `<table0>` hb JOIN ( SELECT `<col1>` FROM `<table1>` UNION SELECT `<col1>` FROM `<table2>` ) AS vfl ON hb.guest_name = vfl.location;
Which hotels have guests that have participated in virtual tours or local festivals?
<table0>[FinancialWellbeingPrograms] { <col0>[INT]:[program_name] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[income] <col3>[FLOAT]:[expenses] <col4>[FLOAT]:[INSERT] }
SELECT country, AVG( income ) as avg_income, AVG( expenses ) as avg_expenses FROM `<table0>` WHERE country = 'UK';
What is the average income and expenses for financial wellbeing programs in the United Kingdom?
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.age < "77" AND diagnoses.icd9_code = "5570"
give me the number of patients who have diagnoses icd9 code 5570 and are less than 77 years.
<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>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.diagnosis = "GASTROINTESTINAL BLEED" AND prescriptions.route = "TP"
count the number of patients whose primary disease is gastrointestinal bleed and drug route is tp?
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in...
SELECT DISTINCT `<table1>`.name FROM `<table1>` INNER JOIN offering_`<table1>` ON offering_`<table1>`.`<table1>`_id = `<table1>`.`<table1>`_id INNER JOIN course_offering ON offering_`<table1>`.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id INNER JOIN semester...
Do you know who teaches History of Decor this semester ?
<table0>[table_9034] { <col0>[Outcome]:[text] <col1>[Date]:[text] <col2>[Tournament]:[text] <col3>[Surface]:[text] <col4>[Opponent]:[text] <col5>[Score]:[text] }
SELECT "Outcome" FROM `<table0>` WHERE "Date" = '01/07/2007'
What was the outcome of the match on 01/07/2007?
<table0>[clinical_trials] { <col0>[region]:[VARCHAR] <col1>[trial_status]:[VARCHAR] <col2>[year]:[INT] }
SELECT region, COUNT( * ) as total_trials, ( COUNT( * ) FILTER ( WHERE `<col1>` = 'Success' ) ) * 100.0 / COUNT( * ) as success_percentage FROM `<table0>` WHERE `<col2>` = 2020 GROUP BY region;
Find the number of clinical trials conducted in each region and the percentage of successful trials in 2020.
<table0>[festival_detail] { <col0>[festival_id]:[number] <col1>[festival_name]:[text] <col2>[chair_name]:[text] <col3>[location]:[text] <col4>[year]:[number] <col5>[num_of_audience]:[number] } <table1>[artwork] { <col0>[artwork_id]:[number] <col1>[type]:[text] <col2>[name]:[text] } <table2>[nomination] { <col0>[artwo...
SELECT T2.name FROM `<table2>` AS T1 JOIN artwork AS T2 ON T1.artwork_id = T2.artwork_id JOIN festival_detail AS T3 ON T1.festival_id = T3.festival_id ORDER BY T3.year
Show the names of artworks in ascending order of the year they are nominated in.
<table0>[table_203_593] { <col0>[number]:[tenure] <col1>[text]:[coach] <col2>[text]:[years] <col3>[number]:[record] <col4>[text]:[pct] <col5>[number]:[ncaa] <col6>[tournament]:[number] }
SELECT "coach" FROM `<table0>` WHERE "tenure" > ( SELECT "tenure" FROM `<table0>` WHERE "coach" = 'joe connally' ) ORDER BY "tenure" LIMIT 1
who was the coach after joe connally ?
<table0>[table_name_50] { <col0>[time]:[VARCHAR] <col1>[nation]:[VARCHAR] <col2>[athlete]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "kenya" AND `<col2>` = "lineth chepkurui"
What is the time when the race was in Kenya and Lineth Chepkurui was the athlete?
<table0>[Ingredient] { <col0>[ingredient_id]:[integer] <col1>[category]:[text] <col2>[name]:[text] <col3>[plural]:[text] } <table1>[Recipe] { <col0>[recipe_id]:[integer] <col1>[title]:[text] <col2>[subtitle]:[text] <col3>[servings]:[integer] <col4>[yield_unit]:[text] <col5>[prep_min]:[integer] <col6>[cook_min]:[intege...
SELECT T3.name FROM `<table1>` AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Warm Chinese Chicken Salad' AND T2.optional = 'TRUE'
What are the optional ingredients for Warm Chinese Chicken Salad?
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.days_stay > "15" AND diagnoses.long_title = "Respiratory distress syndrome in newborn"
how many patients stayed in hospital for more than 15 days and diagnosed with respiratory distress syndrome in newborn?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.days_stay > "15" AND lab.label = "Homocysteine"
Among patients who stayed in the hospital for more than 15 days, how many of them had a lab test for homocysteine?
<table0>[Warehouse] { <col0>[INT]:[city] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[quantity] <col3>[INT]:[INSERT] }
SELECT * FROM `<table0>` WHERE country = 'India' AND quantity > 300;
Which warehouses are located in India and have more than 300 items in stock?
<table0>[person_info] { <col0>[CSD]:[text] <col1>[CSRQ]:[time] <col2>[GJDM]:[text] <col3>[GJMC]:[text] <col4>[JGDM]:[text] <col5>[JGMC]:[text] <col6>[MZDM]:[text] <col7>[MZMC]:[text] <col8>[RYBH]:[text] <col9>[XBDM]:[number] <col10>[XBMC]:[text] <col11>[XLDM]:[text] <col12>[XLMC]:[text] <col13>[text]:[ZYLBDM] <col14>[t...
SELECT `<table2>`.SHRGH, `<table2>`.SHRXM FROM `<table2>` WHERE `<table2>`.JZLSH = '47040795195'
看一下在医疗就诊47040795195中给患者任施诗做检验报告的审核人员有哪些?查一下他们的工号
<table0>[table_name_89] { <col0>[losing_bonus]:[VARCHAR] <col1>[try_bonus]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "try bonus"
What is the Losing bonus with an extra try bonus?
<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 COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "59080" AND prescriptions.route = "NEB"
how many patients whose diagnoses icd9 code is 59080 and drug route is neb?
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstay...
SELECT t1.`<table8>`name FROM ( SELECT `<table8>`.`<table8>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table8>` WHERE `<table8>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.age >= 60 ) AND DATETIME( `<table8>`.`<table8>`time, 'start of year' ...
what were the four most frequent procedures for patients of 60 or above during this year?
<table0>[table_name_47] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] }
SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "collingwood"
What did the away team score when they were playing collingwood?
<table0>[table_name_14] { <col0>[date]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "tigers"
Which date has tigers as the opponent?
<table0>[table_15352382_1] { <col0>[drawn]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Portuguesa Santista"
How many Drawn does the team Portuguesa Santista have?
<table0>[browser] { <col0>[VARCHAR]:[market_share] <col1>[VARCHAR]:[name] }
SELECT id, market_share FROM `<table0>` WHERE name = 'Safari'
What is the id and market share of the browser Safari?
<table0>[table_name_48] { <col0>[results]:[VARCHAR] <col1>[first_elected]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1982
What are the results of a first elected prior to year 1982?