schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_27615896_20] { <col0>[status]:[VARCHAR] <col1>[points]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 3041 | What's the status of the player with 3041 points? |
<table0>[donors] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[donation] } | SELECT `<table0>`.name, ( ( donations2.total_donation - donations1.total_donation ) / donations1.total_donation ) * 100 as percentage_increase FROM `<table0>` JOIN ( SELECT donor_id, SUM( amount ) as total_donation FROM donations WHERE donation_date BETWEEN DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ) AND DATE_SUB( CURDATE(... | Identify the top 5 donors who have increased their donation amounts the most in the last year, and show the percentage increase in their donations. |
<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>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID... | SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table4>` WHERE `<col5>` < '2002-06-21' | For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time. |
<table0>[country] { <col0>[integer]:[country_name] } <table1>[ranking_system] { <col0>[integer]:[system_name] } <table2>[ranking_criteria] { <col0>[integer]:[ranking_system_id] <col1>[integer]:[criteria_name] } <table3>[university] { <col0>[integer]:[country_id] <col1>[integer]:[university_name] } <table4>[universi... | SELECT MAX( `<col3>` ) FROM `<table5>` ORDER BY `<col3>` DESC LIMIT 1 | What is the student staff ratio at the university with the greatest student staff ratio of all time? |
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT `<table7>`.age FROM `<table7>` WHERE `<table7>`.subject_id = 14671 AND `<table7>`.dischtime IS NULL | what the age of patient 14671 was on this hospital encounter? |
<table0>[jybgb] { <col0>[BBCJBW]:[text] <col1>[BBDM]:[text] <col2>[BBMC]:[text] <col3>[BBZT]:[number] <col4>[BGDH]:[text] <col5>[BGJGDM]:[text] <col6>[BGJGMC]:[text] <col7>[BGRGH]:[text] <col8>[BGRQ]:[time] <col9>[BGRXM]:[text] <col10>[BGSJ]:[time] <col11>[CJRQ]:[time] <col12>[JSBBRQSJ]:[time] <col13>[JSBBSJ]:[time] <c... | SELECT zyjzjlb.JZLSH FROM `<table4>` JOIN hz_info JOIN zyjzjlb ON `<table4>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE `<table4>`.XM = '沈清涵' AND NOT zyjzjlb.JZLSH IN ( SELECT `<table0>`.JZLSH FROM `<table0>` WHERE `<table0>`.BGRQ <= '2010-11-... | 名叫沈清涵的病患的检验报告单的报告日期在10年11月18日之后的是在哪些住院就诊的?列出流水号
|
<table0>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[address_details]:[VARCHAR] } <table1>[Product_Suppliers] { <col0>[product_id]:[INTEGER] <col1>[supplier_id]:[INTEGER] <col2>[date_supplied_from]:[DATETIME] <col3>[date_supplied_to]:[DATETIME] <col4>[total_amount_purchased]:[VARCHAR] <col5>[total_value_purchased... | SELECT payment_method_code, COUNT( * ) FROM `<table2>` GROUP BY `<col1>` ORDER BY COUNT( * ) DESC | Return a bar chart on how many customers use each payment method?, could you display by the total number in descending please? |
<table0>[table_14330] { <col0>[Nation]:[text] <col1>[Gold]:[real] <col2>[Silver]:[real] <col3>[Bronze]:[real] <col4>[Total]:[real] } | SELECT COUNT( "Total" ) FROM `<table0>` WHERE "Gold" = '0' AND "Bronze" > '1' AND "Silver" < '1' | How many totals have 0 as Gold, a bronze greater than 1, and a silver less than 1?
|
<table0>[table_name_54] { <col0>[winner]:[VARCHAR] <col1>[stage]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ss5" | What was the Winner of the SS5 Stage? |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[tim... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table4>`.drugstarttime FROM `<table4>` JOIN patient ON `<table4>`.patientunitstayid = patient.patientunitstayid WHERE `<table4>`.drugname = '2 ml vial: midazolam hcl 2 mg/2ml ij soln' A... | among patients that were prescribed with 2 ml vial: midazolam hcl 2 mg/2ml ij soln, what are the five most frequently prescribed drugs at the same time, since 2103.
|
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[va... | SELECT COUNT( * ) > 0 FROM `<table1>` WHERE `<table1>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 11779 ) ) AND `<table1>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>`.l... | does the temperature c (calc) of patient 11779 in 02/last year have been normal?
|
<table0>[Projects] { <col0>[Code]:[Char] <col1>[Char]:[Hours] } <table1>[Scientists] { <col0>[SSN]:[int] } <table2>[AssignedTo] { <col0>[Scientist]:[int] <col1>[Project]:[char] } | SELECT Name, COUNT( * ) FROM `<table0>` AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY COUNT( * ) DESC | Give me a histogram for what are the names of projects that require more than 300 hours, and how many scientists are assigned to each?, list from high to low by the the total number .
|
<table0>[table_1357052_6] { <col0>[distribution]:[VARCHAR] <col1>[rsbac]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Unknown" | what's the dbeingtribution with rsbac being unknown |
<table0>[table_23953] { <col0>[Position]:[real] <col1>[Race]:[number] <col2>[text]:[Sail] <col3>[number]:[text] <col4>[Yacht]:[text] <col5>[State]:[country] <col6>[text]:[Yacht] <col7>[type]:[text] <col8>[LOA]:[Metres] <col9>[text]:[Skipper] <col10>[text]:[Elapsed] <col11>[time]:[text] } | SELECT "Race number" FROM `<table0>` WHERE "Elapsed `<col11>` d:hh:mm:ss" = '1:23:19:31' | What is the race number with time 1:23:19:31? |
<table0>[table_name_12] { <col0>[pick]:[INTEGER] <col1>[name]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "adam gettis" | what is the pick for adam gettis?
|
<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 `<table2>`.short_title FROM `<table2>` WHERE `<table2>`.icd9_code = "4271" | what is the diagnosis short title of diagnosis icd9 code 4271?
|
<table0>[arctic_research] { <col0>[INTEGER]:[type] } | SELECT type, COUNT( * ) FROM `<table0>` WHERE type != 'climate change' GROUP BY type; | How many times was each type of research conducted in the 'arctic_research' table, excluding 'climate change' research? |
<table0>[farm_workers] { <col0>[INT]:[farm_id] <col1>[INT]:[workers] } | SELECT AVG( workers ) FROM farm_workers; | What is the average number of workers per farm in the farm_workers dataset? |
<table0>[table_name_91] { <col0>[finished]:[VARCHAR] <col1>[famous_for]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "singer in atomic kitten" | What place did the singer in atomic kitten finish?
|
<table0>[genre] { <col0>[integer]:[genre_name] } <table1>[game] { <col0>[integer]:[genre_id] <col1>[integer]:[game_name] } <table2>[platform] { <col0>[integer]:[platform_name] } <table3>[publisher] { <col0>[integer]:[publisher_name] } <table4>[game_publisher] { <col0>[integer]:[game_id] <col1>[integer]:[publisher_i... | SELECT SUM( T.num_sales ) * 100000 FROM `<table7>` AS T WHERE T.game_platform_id = 9658 | Sum the total game sales in every region for platform ID 9658. |
<table0>[table_1745843_8] { <col0>[class]:[VARCHAR] <col1>[part_4]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "giheizan" | What class in the word with part 4 'giheizan'?
|
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[Tar... | SELECT * FROM `<table19>` WHERE Id < 50000 | SELECT * FROM posts WHERE Id < 50000. |
<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 diagnoses.short_title, diagnoses.long_title FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.name = "Roxanna Weaver" | get me both the short title and long title of diagnoses for patient roxanna weaver.
|
<table0>[table_name_54] { <col0>[team]:[VARCHAR] <col1>[driver]:[VARCHAR] <col2>[rounds]:[VARCHAR] <col3>[engine]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "all" AND `<col3>` = "mercedes hwa" AND `<col1>` = "sam abay" | what is the team when the rounds is all engine is mercedes hwa and driver is sam abay? |
<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>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT `<table7>`.short_title FROM `<table7>` WHERE `<table7>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table10>`.charttime FROM `<table10>` JOIN admissions ON `<table10>`.hadm_id = admissions.hadm_id WHER... | since 2 years ago what were the top four most frequent diagnoses that patients were diagnosed with within 2 months after receiving insert intercostal cath?
|
<table0>[table_24856332_4] { <col0>[steals]:[INTEGER] <col1>[minutes]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 324 | What is the highest number of steals for a player with 324 minutes?
|
<table0>[table_name_49] { <col0>[place]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ben hogan" | What place is Ben Hogan?
|
<table0>[table_21808535_1] { <col0>[winner]:[VARCHAR] } | SELECT 4 AS th_placed FROM `<table0>` WHERE `<col0>` = "Greg Hancock" | Who placed fourth when the winner was Greg Hancock? |
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_... | SELECT PHONE_NUMBER, `<col0>` FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col0>` | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of phone_number and employee_id in a bar chart, and order by the Y in ascending please.
|
<table0>[diagnoses] { <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 `<table1>`.admission_type FROM `<table1>` WHERE `<table1>`.subject_id = "53707" | what is admission type of subject id 53707?
|
<table0>[table_4654] { <col0>[Race]:[text] <col1>[Circuit]:[text] <col2>[City]:[Location] <col3>[text]:[Date] <col4>[text]:[Pole] <col5>[position]:[text] <col6>[Winning]:[driver] <col7>[text]:[Winning] <col8>[team]:[text] <col9>[Report]:[text] } | SELECT "Winning team" FROM `<table0>` WHERE "Winning driver" = 'emerson fittipaldi' AND "Pole position" = 'michael andretti' AND "Circuit" = 'cleveland burke lakefront airport' | For the race held at the Cleveland Burke Lakefront Airport circuit, with winning driver Emerson Fittipaldi and pole position Michael Andretti, what was the winning team?
|
<table0>[table_21269441_4] { <col0>[tournament_venue__city]:[VARCHAR] <col1>[regular_season_winner]:[VARCHAR] } | SELECT tournament_venue__city_ FROM `<table0>` WHERE `<col1>` = "Louisville" | Where was the tourney when Louisville won the regular season?
|
<table0>[table_40437] { <col0>[Band]:[text] <col1>[Value]:[text] <col2>[Ratio]:[text] <col3>[Ratio]:[text] <col4>[Average]:[text] } | SELECT "Value" FROM `<table0>` WHERE "Ratio as %" = '100%' | Which Value has a Ratio as % of 100%?
|
<table0>[participates_in] { <col0>[stuid]:[number] <col1>[actid]:[number] } <table1>[activity] { <col0>[actid]:[number] <col1>[activity_name]:[text] } <table2>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advisor]:[nu... | SELECT T1.`<table1>`_name FROM `<table1>` AS T1 JOIN faculty_participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT( * ) DESC LIMIT 1 | Which activity has the most faculty members participating in? Find the activity name.
|
<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 `<table4>`.admission_location, diagnoses.short_title FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.name = "Dominga Garvin" | What is the admission location and diagnosis short title of Dominga Garvin?
|
<table0>[table_60609] { <col0>[Official]:[text] <col1>[Status]:[text] <col2>[Area]:[real] <col3>[Population]:[real] <col4>[Census]:[Ranking] } | SELECT "Census Ranking" FROM `<table0>` WHERE "Area km 2" > '753.06' AND "Official Name" = 'stanley' | Which Census Ranking has an Area km 2 larger than 753.06, and an Official Name of stanley?
|
<table0>[table_21220720_1] { <col0>[position]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "van den Brink, Bas" | Name the position for van den brink, bas |
<table0>[VirtualRealityGame] { <col0>[GameID]:[INT] <col1>[PlayerID]:[INT] <col2>[Score]:[INT] } <table1>[RacingGame] { <col0>[GameID]:[INT] <col1>[PlayerID]:[INT] <col2>[Score]:[INT] } | SELECT COUNT( * ) FROM VirtualRealityGame; SELECT COUNT( * ) FROM RacingGame; | What is the total number of games played in the 'VirtualRealityGame' and 'RacingGame' tables? |
<table0>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table1>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table2>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[... | SELECT DISTINCT flight.flight_id FROM `<table8>` AS AIRPORT_SERVICE_0, `<table8>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare, food_service WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_co... | list lowest cost flight from DALLAS to BALTIMORE that serves a meal |
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[v... | SELECT HIRE_DATE, SUM( `<col0>` ) FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table0>` ) | For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the sum of employee_id bin hire_date by weekday. |
<table0>[table_name_15] { <col0>[torque]:[VARCHAR] <col1>[engine]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5.8l v12" | What is the torque of the 5.8l v12 engine? |
<table0>[table_name_30] { <col0>[opponent]:[VARCHAR] <col1>[round]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 3 | Can you tell me the Opponent that has the Round of 3? |
<table0>[Order_Items] { <col0>[order_item_id]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[order_quantity]:[VARCHAR] } <table1>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[payment_method_code]:[VARCHAR] <col2>[customer_number]:[VARCHAR] <col3>[customer_name]:[VARCHAR] <col4>[customer_... | SELECT state_province_county, COUNT( * ) FROM `<table4>` GROUP BY `<col4>` ORDER BY COUNT( * ) | Show each state and the number of addresses in each state by a bar chart, and could you list in asc by the Y-axis please? |
<table0>[table_204_395] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT "competition" FROM `<table0>` ORDER BY "year" DESC LIMIT 1 | what is the name of the last competition ?
|
<table0>[table_15702] { <col0>[Place]:[real] <col1>[Team]:[text] <col2>[Played]:[real] <col3>[Draw]:[real] <col4>[Lost]:[real] <col5>[Goals]:[Scored] <col6>[real]:[Goals] <col7>[Conceded]:[real] <col8>[Points]:[real] } | SELECT COUNT( "Place" ) FROM `<table0>` WHERE "Draw" < '4' AND "Lost" < '6' | What was the total number of places in which the draw was less than 4 and the amount lost was less than 6?
|
<table0>[oceanography] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[average_depth]:[FLOAT] <col4>[area]:[FLOAT] <col5>[volume]:[FLOAT] } | WITH deleted_indian AS ( DELETE FROM `<table0>` WHERE name = 'Indian Ocean' ) SELECT * FROM deleted_indian; | Delete the 'Indian Ocean' record from the 'oceanography' table |
<table0>[Enrolled_in] { <col0>[StuID]:[INTEGER] <col1>[CID]:[VARCHAR] <col2>[Grade]:[VARCHAR] } <table1>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] <col6>[Room]:[VARCHAR] <col7>[Building]:[VARCHAR] } <table2>[... | SELECT Days, SUM( `<col3>` ) FROM `<table5>` GROUP BY `<col4>` ORDER BY `<col2>` | A bar chart shows the distribution of Days and the sum of Instructor , and group by attribute Days. |
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[microbiologyevents]... | SELECT COUNT( DISTINCT `<table8>`.subject_id ) FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.wardid = 48 AND DATETIME( `<table6>`.intime ) <= DATETIME( CURRENT_TIME( ), '-1 year' ) ) | count the number of patients who stayed until 1 year ago in ward 48. |
<table0>[table_name_26] { <col0>[title]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1996" | What was the title in 1996?
|
<table0>[Artifacts] { <col0>[ArtifactID]:[int] <col1>[SiteID]:[int] <col2>[varchar]:[Description] <col3>[text]:[DateFound] } | INSERT INTO Artifacts ( ArtifactID, SiteID, Name, Description, DateFound ) VALUES ( 1, 1, 'Artifact X', 'An interesting artifact', '2012-02-03' ); | Insert a new artifact into the Artifacts table |
<table0>[DonationAmounts] { <col0>[DonationID]:[INT] <col1>[DonationDate]:[DATE] <col2>[DonationAmount]:[DECIMAL] } | SELECT EXTRACT( MONTH FROM `<col1>` ) AS Month, SUM( `<col2>` ) OVER ( PARTITION BY EXTRACT( MONTH FROM `<col1>` ) ) AS TotalDonationAmount FROM `<table0>` WHERE EXTRACT( YEAR FROM `<col1>` ) = 2021 GROUP BY Month ORDER BY Month; | What is the total donation amount for each month, across all donors? |
<table0>[table_name_26] { <col0>[notes]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "denmark" | What is the notes for the rowers from denmark? |
<table0>[table_203_308] { <col0>[number]:[athlete] <col1>[text]:[nation] <col2>[text]:[olympics] <col3>[text]:[gold] <col4>[number]:[silver] <col5>[number]:[bronze] <col6>[number]:[total] } | SELECT "athlete" FROM `<table0>` WHERE "athlete" IN ( 'shaun white', 'kelly clark' ) ORDER BY "total" DESC LIMIT 1 | who has won more medals ? shaun white or kelly clark ? |
<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 flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.y... | please give all flights from DALLAS to OAKLAND california monday
|
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[tex... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table8>`.`<table8>`time FROM `<table8>` JOIN patient ON `<table8>`.patientunitstayid = patient.patientunitstayid WHERE `<table8>`.`<table8>`name = 'cardiac surgery consultation' ) AS t1 JOIN ( SELECT patient.uniquepid, `<table8>`.`<table8>`time FR... | count the number of patients who received normal saline administration procedure in the same month after having received cardiac surgery consultation procedure.
|
<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>[prescr... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.gender = "M" AND diagnoses.short_title = "Malig neo tongue NEC" | how many of the male patients were diagnosed with malig neo tongue nec?
|
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[va... | SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table1>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' | For all employees who have the letters D or S in their first name, give me the comparison about the sum of salary over the hire_date bin hire_date by weekday.
|
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[Department]:[VARCHAR] <col2>[Position]:[VARCHAR] <col3>[Age]:[INT] } <table1>[Department] { } | SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col1>` = 'Mining' AND `<col2>` = 'Engineer'; | What is the average age of engineers in the Mining department? |
<table0>[table_name_48] { <col0>[format]:[VARCHAR] <col1>[catalog_number]:[VARCHAR] <col2>[year]:[VARCHAR] <col3>[label]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 2000 AND `<col3>` = "myuzyk" AND `<col1>` = "mzykn08" | Tell me the format with year more than 2000 and label of myuzyk with catalog number of mzykn08 |
<table0>[Attorneys] { <col0>[AttorneyID]:[INT] <col1>[Age]:[INT] <col2>[Gender]:[VARCHAR] <col3>[Income]:[FLOAT] } <table1>[Cases] { <col0>[CaseID]:[INT] <col1>[AttorneyID]:[INT] <col2>[CaseStatus]:[VARCHAR] } | SELECT A.AttorneyID, A.Age, A.Gender, A.Income FROM `<table0>` A WHERE NOT EXISTS ( SELECT 1 FROM `<table1>` C WHERE A.AttorneyID = C.AttorneyID AND C.CaseStatus = 'Lost' ); | List all attorneys who have never lost a case, along with their demographic information. |
<table0>[CBSA] { } <table1>[state] { <col0>[abbreviation]:[text] <col1>[name]:[text] } <table2>[congress] { <col0>[cognress_rep_id]:[text] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[CID]:[text] <col4>[party]:[text] <col5>[state]:[text] <col6>[abbreviation]:[text] <col7>[House]:[text] <col8>[District]:[... | SELECT T2.city FROM `<table6>` AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.bad_alias ORDER BY COUNT( T1.zip_code ) DESC LIMIT 1 | Which city has the most bad aliases? |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col... | SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '012-40970' ) ) AND `<table4>`.respiratio... | had patient 012-40970's respiration levels been normal until 56 months ago? |
<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 course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND program_course.course_id = course.course_id AND program_course.workload < 3 ORDER BY program_course.workload | Show me easy 300 -level classes .
|
<table0>[table_203_676] { <col0>[number]:[pick] <col1>[number]:[cfl] <col2>[team]:[text] <col3>[player]:[text] <col4>[position]:[text] <col5>[college]:[text] } | SELECT "player" FROM `<table0>` WHERE "pick #" = 25 + 1 | shawn gifford was pick number 25 , who was picked next ?
|
<table0>[table_25277262_2] { <col0>[title]:[VARCHAR] <col1>[no_in_season]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 11 | What is the name of the episode # 11 in the season? |
<table0>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table1>[PostsWithDeleted] { <col0>[number]:[Pos... | SELECT DATEPART( dayofyear, ClosedDate ) AS "day", COUNT( * ) AS "number_of_closed_questions" FROM `<table28>` WHERE PostTypeId = 1 AND NOT ClosedDate IS NULL AND DATEDIFF( day, ClosedDate, GETDATE( ) ) < 90 GROUP BY DATEPART( dayofyear, ClosedDate ) ORDER BY DATEPART( dayofyear, ClosedDate ) | Number and ratio of closed questions per day for the last three month. |
<table0>[table_1949994_8] { <col0>[episodes]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` | What was the minimum number of episodes in any of the series? |
<table0>[table_204_495] { <col0>[number]:[date] <col1>[text]:[opponent] <col2>[text]:[venue] <col3>[text]:[result] <col4>[text]:[attendance] <col5>[number]:[scorers] } | SELECT COUNT( * ) FROM `<table0>` WHERE "date" = 1987 | how many games happened in 1987 ?
|
<table0>[SpaceMissions] { <col0>[INT]:[mission] <col1>[VARCHAR]:[year] <col2>[INT]:[country] <col3>[VARCHAR]:[spacecraft] <col4>[INT]:[INSERT] } | SELECT country, AVG( spacecraft ) AS avg_spacecraft_per_mission FROM `<table0>` GROUP BY country; | What is the average number of spacecraft per mission for each country in the SpaceMissions table? |
<table0>[aircraft] { <col0>[Aircraft_ID]:[int] <col1>[Aircraft]:[varchar] <col2>[Description]:[varchar] <col3>[Max_Gross_Weight]:[varchar] <col4>[Total_disk_area]:[varchar] <col5>[Max_disk_Loading]:[varchar] } <table1>[airport_aircraft] { <col0>[int]:[Airport_ID] <col1>[int]:[Aircraft_ID] } <table2>[airport] { <col0>... | SELECT Aircraft, COUNT( * ) FROM `<table0>` AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY `<col1>` | List the names of aircrafts and the number of times it won matches Plot them as bar chart, and list x axis in asc order please. |
<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>[checkin] { <col0>[cid]:[int] <col1>[business_id]:[varchar] <col2>[count]:[int] <col3>[day]:[varchar] } <table2>[category] { ... | SELECT COUNT( DISTINCT ( tip.text ) ) FROM tip, user WHERE tip.month = 'April' AND user.name = 'Michelle' AND user.user_id = tip.user_id | How many tips has Michelle written in April
|
<table0>[table_27713030_3] { <col0>[team]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 6 | Who was the opposing team in game 6? |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[tex... | SELECT COUNT( * ) > 0 FROM `<table6>` WHERE `<table6>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '017-20711' ) ) AND `<table6>`.cellpath L... | has pantoprazole ever been given to patient 017-20711 on last month/13? |
<table0>[table_name_40] { <col0>[total_goals]:[VARCHAR] <col1>[fa_cup_goals]:[VARCHAR] <col2>[total_apps]:[VARCHAR] <col3>[name]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "1" AND `<col3>` = "bob mountain" AND `<col1>` < 0 | how many times is the total apps 1 and the fa cup goals less than 0 for bob mountain?
|
<table0>[table_202365_2] { <col0>[VARCHAR]:[VARCHAR] <col1>[VARCHAR]:[VARCHAR] } | SELECT а_а_[a] FROM `<table0>` WHERE ҕь_ҕь_[ʁʲ_ɣʲ] = "Ш ш [ʂʃ]" | what is а а [a] when ҕь ҕь [ʁʲ/ɣʲ] is ш ш [ʂʃ]? |
<table0>[table_29261823_10] { <col0>[team]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Elfsborg" | what was the name of the team opponent to elfsborg |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadm... | SELECT SUM( `<table5>`.cellvaluenumeric ) FROM `<table5>` WHERE `<table5>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '002-34744' ) ) AND `... | what is the total amount of input that patient 002-34744 received on 05/05/last year.
|
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.expire_flag = "1" AND diagnoses.short_title = "Fall on stair/step NEC" | provide the number of patients who died primarily due to fall on stair/step nec. |
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table2>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1... | SELECT DISTINCT fare.fare_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | what is the cheapest round trip fare between BOSTON and SAN FRANCISCO |
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1... | SELECT All_Home, AVG( `<col1>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY `<col9>` DESC | A bar chart shows the distribution of All_Home and the average of School_ID , and group by attribute All_Home, and list in descending by the bars.
|
<table0>[Student_Course_Enrolment] { <col0>[registration_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[course_id]:[INTEGER] <col3>[date_of_enrolment]:[DATETIME] <col4>[date_of_completion]:[DATETIME] } <table1>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table2>[Course_Authors_and_Tu... | SELECT date_of_enrolment, COUNT( `<col3>` ) FROM `<table0>` AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" ORDER BY COUNT( `<col3>` ) DESC | What are the number of the enrollment dates of all the tests that have result 'Pass'?, and sort in descending by the y-axis.
|
<table0>[VesselMaintenance] { <col0>[INT]:[vessel_type] <col1>[VARCHAR]:[cost] <col2>[FLOAT]:[maintenance_date] <col3>[DATE]:[INSERT] } | SELECT vessel_type, SUM( cost ) FROM `<table0>` WHERE maintenance_date >= CURDATE( ) - INTERVAL 3 MONTH GROUP BY vessel_type; | Find the total maintenance cost for each naval vessel type in the last quarter |
<table0>[table_29785324_5] { <col0>[district]:[VARCHAR] <col1>[constituency_no]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 213 | What district has 213 constituents? |
<table0>[state] { <col0>[StateCode]:[text] <col1>[State]:[text] <col2>[Region]:[text] } <table1>[callcenterlogs] { <col0>[Date]:[received] <col1>[date]:[Complaint] <col2>[text]:[rand] <col3>[client]:[text] <col4>[phonefinal]:[text] <col5>[vru]:[line] <col6>[text]:[call_id] <col7>[integer]:[priority] <col8>[integer]:[t... | SELECT T2.district_id, T2.city FROM `<table5>` AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Date = '2018-09-11' | Which district did the review on 2018/9/11 come from? Give the name of the city. |
<table0>[table_26351] { <col0>[equation]:[text] <col1>[mathrm]:[frac] <col2>[mathrm]:[text] <col3>[mathrm]:[frac] <col4>[mathrm]:[text] <col5>[mathrm]:[frac] <col6>[text]:[mathrm] <col7>[frac]:[mathrm] <col8>[mathrm]:[gas] } | SELECT "equation:" FROM `<table0>` WHERE "k_{\\mathrm{H,pc}} = \\frac{p}{c_\\mathrm{aq}}" = '2222.22' | What was the equation if k_{\mathrm{h,pc}} = \frac{p}{c_\mathrm{aq}} is 2222.22?
|
<table0>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table1>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table2>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table3... | SELECT meter_700, meter_100 FROM `<table3>` | Find meter_700 and meter_100 , and visualize them by a bar chart.
|
<table0>[table_22855] { <col0>[Year]:[real] <col1>[Worldwide]:[real] <col2>[Africa]:[real] <col3>[America]:[real] <col4>[Asia]:[real] <col5>[Australia]:[real] <col6>[Europe]:[real] } | SELECT MAX( "Europe" ) FROM `<table0>` WHERE "Australia" = '94615' | What is the most members Europe had when Australia had 94615?
|
<table0>[Organizations] { <col0>[organization_id]:[INTEGER] <col1>[parent_organization_id]:[INTEGER] <col2>[organization_details]:[VARCHAR] } <table1>[Residents_Services] { <col0>[resident_id]:[INTEGER] <col1>[service_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[property_id]:[INTEGER] <col4>[date_requested]:[... | SELECT Type_of_Thing_Code, COUNT( `<col2>` ) FROM `<table5>` AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details, `<col2>` ORDER BY `<col2>` | Give me a stacked bar chart to show how many things in different types of each thing, and the details of the organization that owns it, list from low to high by the x axis please.
|
<table0>[table_73415] { <col0>[Season]:[real] <col1>[Series]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] <col8>[real]:[Viewers] <col9>[millions]:[text] } | SELECT MAX( "Production code" ) FROM `<table0>` | which is the biggest production code?
|
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admissi... | SELECT COUNT( * ) > 0 FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 52604 AND NOT `<table1>`.dischtime IS NULL ORDER BY `<table1>`.admittime LIMIT 1 ) | patient 52604 got any sort of diagnosis in the first hospital encounter?
|
<table0>[table_34933] { <col0>[Outcome]:[text] <col1>[Date]:[text] <col2>[Tournament]:[text] <col3>[Surface]:[text] <col4>[Opponent]:[text] <col5>[Score]:[text] } | SELECT "Surface" FROM `<table0>` WHERE "Opponent" = 'chris evert-lloyd' | Which Surface had an Opponent of chris evert-lloyd?
|
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT COUNT( DISTINCT t2.uniquepid ) FROM ( SELECT t1.uniquepid, t1.`<table2>`time FROM ( SELECT `<table0>`.uniquepid, `<table2>`.`<table2>`time FROM `<table2>` JOIN `<table0>` ON `<table2>`.`<table0>`unitstayid = `<table0>`.`<table0>`unitstayid WHERE `<table2>`.`<table2>`name = 'hypocalcemia' ) AS t1 GROUP BY t1.uniq... | how many patients died after being diagnosed with hypocalcemia during the same month? |
<table0>[table_name_38] { <col0>[date]:[VARCHAR] <col1>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "utah" | When did they play Utah at home? |
<table0>[dispensary_sales] { <col0>[INT]:[customer_name] <col1>[VARCHAR]:[state] <col2>[VARCHAR]:[purchase_date] <col3>[DATE]:[INSERT] } | UPDATE dispensary_sales SET state = 'Nevada' WHERE id = 2; | Update the 'state' of the record with id 2 in the 'dispensary_sales' table to 'Nevada' |
<table0>[table_name_55] { <col0>[appointed_by]:[VARCHAR] <col1>[title]:[VARCHAR] <col2>[representative]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ambassador extraordinary and plenipotentiary" AND `<col2>` = "spruille braden" | What is the Appointed by that has the Title of Ambassador Extraordinary and Plenipotentiary and has a Representative of Spruille Braden? |
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[applicati... | SELECT DISTINCT flight.flight_id FROM `<table22>` AS AIRPORT_SERVICE_0, `<table22>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_... | give me the flights and fares on 12 27 from INDIANAPOLIS to ORLANDO |
<table0>[table_68559] { <col0>[Season]:[text] <col1>[Competition]:[text] <col2>[Round]:[text] <col3>[Opponents]:[text] <col4>[Home]:[leg] <col5>[text]:[Away] <col6>[leg]:[text] <col7>[Aggregate]:[text] } | SELECT "Home leg" FROM `<table0>` WHERE "Competition" = 'uefa europa league' AND "Round" = 'q1' AND "Opponents" = 'motherwell' | Name the home leg for uefa europa league and round of q1 with opponents of motherwell
|
<table0>[table_name_55] { <col0>[surface]:[VARCHAR] <col1>[partner]:[VARCHAR] <col2>[score_in_the_final]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "julie halard" AND `<col2>` = "6–3, 6–2" | What was the surface for Julie Halard when the final score was 6–3, 6–2? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careu... | SELECT AVG( t1.c1 ) FROM ( SELECT COUNT( DISTINCT `<table0>`.hadm_id ) AS c1 FROM `<table0>` WHERE `<table0>`.icd9_code = ( SELECT `<table4>`.icd9_code FROM `<table4>` WHERE `<table4>`.short_title = 'cirrhosis of liver nos' ) AND STRFTIME( '%y', `<table0>`.charttime ) = '2104' GROUP BY STRFTIME( '%y-%m', `<table0>`.cha... | what was the average monthly number of patients diagnosed with cirrhosis of liver nos in 2104? |
<table0>[table_201_39] { <col0>[number]:[number] <col1>[title]:[text] <col2>[directed]:[text] <col3>[released]:[number] } | SELECT "released" FROM `<table0>` GROUP BY "released" ORDER BY COUNT( "title" ) DESC LIMIT 1 | which year is the year with the most titles ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.