schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_name_18] { <col0>[krypton]:[VARCHAR] <col1>[argon]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "20.85" | What krypton has an argon of 20.85?
|
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti... | SELECT t1.`<table1>`name FROM ( SELECT `<table1>`.`<table1>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table1>` WHERE STRFTIME( '%y', `<table1>`.`<table1>`time ) <= '2103' GROUP BY `<table1>`.`<table1>`name ) AS t1 WHERE t1.c1 <= 4 | show me the top four most common diagnoses until 2103?
|
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOn... | SELECT T.TagName, COUNT( * ) AS "total", SUM( CASE WHEN NOT P.AcceptedAnswerId IS NULL THEN 1 ELSE 0 END ) AS "answered", SUM( CASE WHEN NOT p.ClosedDate IS NULL THEN 1 ELSE 0 END ) AS "closed", AVG( CAST( p.Score AS FLOAT ) ) AS "average_score", STDEV( CAST( p.Score AS FLOAT ) ) AS "std._dev" FROM `<table3>` AS P INNE... | (fork) Post Count by Tag. |
<table0>[table_name_23] { <col0>[attendance]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "october 7, 1990" | What is the attandance figure on October 7, 1990? |
<table0>[table_19450] { <col0>[Virtual]:[real] <col1>[Physical]:[real] <col2>[sign]:[text] <col3>[Branding]:[text] <col4>[Network]:[text] <col5>[Owner]:[text] } | SELECT "Call sign" FROM `<table0>` WHERE "Physical" = '17' | Name the call sign for the 17 physical
|
<table0>[table_name_10] { <col0>[opponent]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3-9" | What was the Opponent when the Cavaliers had a Record of 3-9? |
<table0>[runs] { <col0>[run_at]:[text] <col1>[max_rowid]:[integer] <col2>[reviews_added]:[integer] } <table1>[podcasts] { <col0>[podcast_id]:[text] <col1>[itunes_id]:[integer] <col2>[slug]:[text] <col3>[itunes_url]:[text] <col4>[title]:[text] } <table2>[reviews] { <col0>[podcast_id]:[text] <col1>[title]:[text] <col2>... | SELECT T2.title FROM `<table3>` AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' ORDER BY LENGTH( T2.title ) DESC LIMIT 1 | Which "music" podcast has the longest title? |
<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 MIN( t1.c1 ) FROM ( SELECT SUM( `<table4>`.`<table4>` ) AS c1 FROM `<table4>` WHERE `<table4>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.`<table0>`unitstayid IN ( SELECT `<table1>`.`<table0>`unitstayid FROM `<table1>` WHERE `<table1>`.`<tabl... | what is the minimum hospital cost that includes a procedure known as hormonal therapy (for varices) since 3 years ago?
|
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.dod_year <= "2115.0" AND lab.itemid = "50824" | what is the number of patients whose year of death is less than or equal to 2115 and item id is 50824?
|
<table0>[table_name_11] { <col0>[result]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "september 24, 1995" | What was the results on September 24, 1995?
|
<table0>[premises] { <col0>[premises_type]:[VARCHAR] } | SELECT `<table0>`_type, COUNT( * ) FROM `<table0>` GROUP BY `<table0>`_type | Show each premise type and the number of premises in that type.
|
<table0>[table_5906] { <col0>[Date]:[text] <col1>[Time]:[text] <col2>[Score]:[text] <col3>[Set]:[text] <col4>[Set]:[text] <col5>[Set]:[text] <col6>[Total]:[text] } | SELECT "Time" FROM `<table0>` WHERE "Set 3" = '24–26' AND "Score" = '0–3' | Which Time has a Set 3 of 24 26, and a Score of 0 3?
|
<table0>[VRHardware] { <col0>[HardwareID]:[INT] <col1>[HardwareName]:[VARCHAR] <col2>[100]:[AdoptionRevenue] <col3>[DECIMAL]:[Country] <col4>[VARCHAR]:[INSERT] } | SELECT SUM( AdoptionRevenue ) FROM `<table0>` WHERE Country = 'Asia'; | What is the sum of virtual reality adoption revenues in Asia? |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[... | SELECT `<table4>`.short_title FROM `<table4>` WHERE `<table4>`.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... | during the previous year what were the three most common diagnoses that patients were given in the same month after receiving insert endotracheal tube?
|
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[diagnoses_icd] { <... | SELECT COUNT( * ) FROM `<table16>` WHERE `<table16>`.drug = 'clotrimazole' AND STRFTIME( '%y', `<table16>`.startdate ) = '2104' | how many clotrimazole prescriptions have been given in 2104? |
<table0>[Investors] { <col0>[investor_id]:[INTEGER] <col1>[Investor_details]:[VARCHAR] } <table1>[Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[transaction_type_code]:[VARCHAR] <col3>[date_of_transaction]:[DATETIME] <col4>[amount_of_transaction]:[DECIMAL] <col5>[share_count]:[VA... | SELECT T1.Investor_details, T1.investor_id FROM `<table0>` AS T1 JOIN Transactions AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" ORDER BY T1.Investor_details | Show the ids and details of the investors who have at least two transactions with type code 'SALE' Plot them as bar chart, I want to rank by the bar in ascending please.
|
<table0>[table_name_20] { <col0>[total]:[VARCHAR] <col1>[year_s__won]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1987" | What was the total for the golfer who had a year won of 1987? |
<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 diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.admityear < "2184" AND diagnoses.long_title = "Thrombocytopenia, unspecified" | provide the nuber of patients whose admission year is before 2184 and diagnosis long title is thrombocytopenia, unspecified. |
<table0>[table_79981] { <col0>[Date]:[text] <col1>[Winning]:[Team] <col2>[text]:[Score] <col3>[text]:[Winning] <col4>[Pitcher]:[text] <col5>[Losing]:[Pitcher] <col6>[text]:[Attendance] <col7>[real]:[Location] } | SELECT "Location" FROM `<table0>` WHERE "Date" = 'may 21' | Which location has a date of may 21?
|
<table0>[ethical_ai] { <col0>[country]:[VARCHAR] <col1>[sector]:[VARCHAR] <col2>[year]:[INT] <col3>[score]:[INT] } | SELECT country, sector, AVG( `<col3>` ) as avg_score FROM `<table0>` WHERE `<col2>` = 2022 AND region = 'Latin America' GROUP BY country, sector; | What is the average ethical AI score for Latin American countries, for each technology sector, in the year 2022? |
<table0>[table_22986] { <col0>[text]:[Completions] <col1>[real]:[Attempts] <col2>[real]:[Completion] <col3>[text]:[Yards] <col4>[real]:[Touchdowns] <col5>[real]:[Interceptions] <col6>[real]:[Rating] } | SELECT MAX( "Yards" ) FROM `<table0>` WHERE "Name" = 'Bobby Layne' | How many total yards for Bobby Layne?
|
<table0>[north_pacific_vessels] { <col0>[vessel_id]:[TEXT] <col1>[year]:[INTEGER] <col2>[violation]:[BOOLEAN] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 2019 AND `<col2>` = TRUE; | What is the total number of vessels that violated maritime law in the North Pacific in 2019? |
<table0>[table_name_5] { <col0>[loser]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "december 12" AND `<col2>` = 1971 | Who was the loser on December 12, 1971? |
<table0>[fan_wellbeing] { <col0>[fan_id]:[INT] <col1>[first_name]:[VARCHAR] <col2>[last_name]:[VARCHAR] <col3>[dob]:[DATE] <col4>[joined_wellbeing_program]:[DATE] } | INSERT INTO fan_wellbeing ( fan_id, first_name, last_name, dob, joined_wellbeing_program ) VALUES ( 3, 'Emma', 'Wang', '2000-04-20', '2022-03-01' ); | Insert a new record for a fan who wants to join the wellbeing program |
<table0>[table_9602] { <col0>[Round]:[real] <col1>[Pick]:[real] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[School]:[Club] <col5>[Team]:[text] } | SELECT "School/Club Team" FROM `<table0>` WHERE "Round" > '12' AND "Pick" < '342' | What was the school/club after round 12, and picked smaller than 342?
|
<table0>[table_name_73] { <col0>[spans]:[VARCHAR] <col1>[built]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1896" | What spans were built in 1896? |
<table0>[ExcavationRecords] { <col0>[RecordID]:[INT] <col1>[SiteID]:[INT] <col2>[Date]:[DATE] } | DELETE FROM `<table0>` WHERE `<col1>` = 2; | Delete any excavation records from site 2? |
<table0>[Course] { <col0>[CID]:[VARCHAR] <col1>[CName]:[VARCHAR] <col2>[Credits]:[INTEGER] <col3>[Instructor]:[INTEGER] <col4>[Days]:[VARCHAR] <col5>[Hours]:[VARCHAR] <col6>[DNO]:[INTEGER] } <table1>[Minor_in] { <col0>[StuID]:[INTEGER] <col1>[DNO]:[INTEGER] } <table2>[Gradeconversion] { <col0>[lettergrade]:[VARCHAR] ... | SELECT Instructor, `<col6>` FROM `<table0>` ORDER BY `<col2>` | Visualize the relationship between Instructor and DNO .
|
<table0>[energy_storage] { <col0>[country]:[VARCHAR] <col1>[energy_storage_capacity]:[NUMERIC] } | SELECT country, MAX( energy_storage_capacity ) OVER ( PARTITION BY country ) FROM energy_storage; | What is the maximum energy storage capacity for the 'energy_storage' table for each country? |
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[diagnoses_icd] { <co... | SELECT `<table13>`.valuenum FROM `<table13>` WHERE `<table13>`.icustay_id IN ( SELECT `<table16>`.icustay_id FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 28443 ) ) AND `<table13>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE `<tabl... | what the first height of patient 28443 during this month.
|
<table0>[table_22669816_1] { <col0>[length]:[VARCHAR] <col1>[track]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Pocono International Raceway" | What are the lengths hosted by Pocono International Raceway? |
<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 DISTINCT T.game_id FROM `<table4>` AS T WHERE T.publisher_id = 352 | Tell the number of games whose publisher id is 352. |
<table0>[table_name_93] { <col0>[opponent]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "april 21" | what team played on april 21
|
<table0>[user_regions] { <col0>[INT]:[user_id] <col1>[INT]:[region] <col2>[VARCHAR]:[INSERT] } <table1>[workout_types_count] { <col0>[INT]:[user_id] <col1>[INT]:[workout_type] <col2>[VARCHAR]:[total] <col3>[INT]:[INSERT] } | SELECT workout_type, SUM( total ) FROM ( SELECT user_id, workout_type, total FROM `<table1>` WHERE user_id IN ( SELECT user_id FROM `<table0>` WHERE region IN ( 'Asian', 'African' ) ) GROUP BY user_id, workout_type ) subquery GROUP BY workout_type ORDER BY SUM( total ) DESC LIMIT 2; | Identify the top 2 most popular workout types in 'Asian' and 'African' regions. |
<table0>[table_1221] { <col0>[Year]:[real] <col1>[Class]:[text] <col2>[Team]:[name] <col3>[text]:[Bike] <col4>[text]:[Riders] <col5>[text]:[Races] <col6>[text]:[Wins] <col7>[real]:[Podiums] <col8>[real]:[Poles] <col9>[real]:[laps] <col10>[real]:[Points] <col11>[text]:[Pos] } | SELECT "Class" FROM `<table0>` WHERE "Riders" = 'Makoto Tamada' AND "Races" = '17' | Name the class for makoto tamada and races is 17
|
<table0>[table_name_35] { <col0>[surface]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "26 february 2006" | For the tournament played on 26 February 2006, what surface was used? |
<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 t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table0>`.startdate FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.drug = 'dexmedetomidine hcl' AND STRFTIME( '%y', `<table0>`.startdate ) = '210... | what are the five most frequently prescribed drugs in 2101 for patients prescribed with dexmedetomidine hcl at the same time?
|
<table0>[Donors] { <col0>[DonorID]:[INT] <col1>[DonorName]:[VARCHAR] } <table1>[Donations] { <col0>[DonationID]:[INT] <col1>[DonorID]:[INT] <col2>[DonationDate]:[DATE] <col3>[DECIMAL]:[INSERT] } | SELECT DonorName, SUM( Amount ) as TotalDonation FROM `<table0>` INNER JOIN Donations ON `<table0>`.DonorID = Donations.DonorID WHERE YEAR( DonationDate ) = 2022 GROUP BY `<col1>` ORDER BY TotalDonation DESC LIMIT 5; | Who are the top 5 donors by total donation amount in 2022? |
<table0>[table_name_64] { <col0>[sort_restore]:[VARCHAR] <col1>[deaths]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "71" | What is the sort value that had deaths of 71? |
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>... | SELECT t.TagName, COUNT( DISTINCT ( p.Id ) ) FROM `<table12>` AS t INNER JOIN Post`<table12>` AS pt ON t.Id = pt.TagId INNER JOIN Posts AS p ON p.Id = pt.PostId AND p.PostTypeId = 1 GROUP BY t.TagName ORDER BY COUNT( DISTINCT ( p.Id ) ) DESC | Tags by # of unanswered count. |
<table0>[exists] { <col0>[AvCount]:[state] <col1>[CHAR]:[count] <col2>[INT]:[INSERT] <col3>[AvCount]:[state] <col4>[count]:[VALUES] <col5>[1200]:[1250] <col6>[1500]:[1450] } | SELECT COUNT( * ) FROM AvCount WHERE state IN ( 'TX', 'FL' ) GROUP BY state; | Compare the number of autonomous vehicles in Texas and Florida. |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[l... | SELECT DISTINCT `<table5>`.`<table5>` FROM `<table5>` WHERE `<table5>`.event_type = '`<table0>`' AND `<table5>`.event_id IN ( SELECT `<table0>`.row_id FROM `<table0>` WHERE `<table0>`.icd9_code = ( SELECT `<table4>`.icd9_code FROM `<table4>` WHERE `<table4>`.short_title = 'poisoning-barbiturates' ) ) | what is the diagnosis cost of poisoning-barbiturates?
|
<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 COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.age < "56" AND diagnoses.short_title = "Poison-psychotropic agt" | how many of the patients aged below 56 were diagnosed with poison-psychotropic agt? |
<table0>[table_name_85] { <col0>[wins]:[INTEGER] <col1>[goals_for]:[VARCHAR] <col2>[losses]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 18 AND `<col2>` < 5 | What team has the most wins with at least 18 goals and less than 5 losses?
|
<table0>[table_name_55] { <col0>[result]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "celtic" | What was the result when the opponent was Celtic? |
<table0>[table_name_3] { <col0>[opponent_in_the_final]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "august 14, 2006" | Who is the opponent in the final on August 14, 2006? |
<table0>[table_name_15] { <col0>[tonnage__grt]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT tonnage__grt_ FROM `<table0>` WHERE `<col1>` = "eldena" | What is the tonnage of the Eldena? |
<table0>[table_name_31] { <col0>[goals_scored]:[INTEGER] <col1>[club]:[VARCHAR] <col2>[wins]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "utenis utena" AND `<col2>` < 8 | How many goals scored have utenis utena as the club, with wins less than 8? |
<table0>[table_40839] { <col0>[Western]:[Title] <col1>[text]:[Chinese] <col2>[Title]:[text] <col3>[Pinyin]:[text] <col4>[Released]:[Date] <col5>[text]:[Genre] <col6>[text]:[Game] <col7>[Modes]:[text] } | SELECT "Western Title" FROM `<table0>` WHERE "Pinyin" = 'new chāojí mǎlìōu xiōngdì' | What is the western title of the pinyin new ch oj m l u xi ngd ? |
<table0>[carbon_offset_programs] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[project]:[VARCHAR] <col3>[255]:[carbon_offsets] <col4>[INT]:[INSERT] } | SELECT MAX( carbon_offsets ) FROM `<table0>` WHERE country = 'Canada'; | What is the maximum carbon offset per project in the carbon offset program in Canada? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.dod_year <= "2183.0" AND lab.itemid = "51351" | what is the number of patients whose year of death is less than or equal to 2183 and item id is 51351?
|
<table0>[table_35571] { <col0>[Version]:[text] <col1>[Length]:[text] <col2>[Album]:[text] <col3>[Remixed]:[text] <col4>[Year]:[real] } | SELECT "Album" FROM `<table0>` WHERE "Year" > '2001' | What Album has a Year that's larger than 2001?
|
<table0>[table_21711] { <col0>[Class]:[text] <col1>[text]:[text] <col2>[text]:[text] <col3>[Verb]:[meaning] } | SELECT "Class" FROM `<table0>` WHERE "Part 2" = 'laug' | What is the class of the word who's second participle is laug?
|
<table0>[startups] { <col0>[INT]:[name] <col1>[VARCHAR]:[sector] <col2>[VARCHAR]:[funding] <col3>[FLOAT]:[INSERT] } | SELECT MIN( funding ) FROM `<table0>` WHERE sector = 'genetic research'; | What is the minimum funding received by a startup in the 'genetic research' sector? |
<table0>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table1>[field] { <col0>[fieldid]:[int] } <table2>[venue] { <col0>[venueid]:[int] <col1>[venuename]:[varchar] } <table3>[writes] { <col0>[paperid]:[int] <col1>[authorid]:[int] } <table4>[cite] { <col0>[citingpaperid]:[int] <col1>[citedpaperid]:[in... | SELECT DISTINCT COUNT( DISTINCT paper.paperid ), writes.authorid FROM paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename = 'ACL' AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY COUNT( DISTINCT paper.paperid ) DESC | how is the most prolific author in ACL ? |
<table0>[table_38653] { <col0>[Discipline]:[text] <col1>[Peter]:[real] <col2>[Adam]:[real] <col3>[Jade]:[real] <col4>[Plat]:[num] } | SELECT MIN( "Plat'num" ) FROM `<table0>` WHERE "Adam" < '1' AND "Discipline" = 'cycling' AND "Jade" > '5' | Adam is less than 1 and Jade is greater than 5 in cycling, what's the plat'num? |
<table0>[defense_projects] { <col0>[project_name]:[VARCHAR] <col1>[255]:[start_date] <col2>[DATE]:[end_date] <col3>[DATE]:[INSERT] } | UPDATE defense_projects SET end_date = '2021-05-31' WHERE project_name = 'Project X'; | Update the defense projects table to reflect that project X was completed one month earlier than previously recorded |
<table0>[table_name_31] { <col0>[nation]:[VARCHAR] <col1>[gold]:[VARCHAR] <col2>[total]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 1 AND `<col2>` = 62 | What is the nation that had more than 1 gold medal and a total of 62 medals? |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heart... | SELECT COUNT( DISTINCT `<table4>`.`<table4>`unitstayid ) FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '027-91255' ) AND STRFTIME( '%y', `<table4>`.unitadmittime ) >= '2103' | how many visits did patient 027-91255 undergo at the icu since 2103?
|
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytim... | SELECT `<table9>`.`<table9>`result FROM `<table9>` WHERE `<table9>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '006-21388' ) ) AND `<table9... | until 12 months ago what was the first value of the total bilirubin-lab test of patient 006-21388? |
<table0>[cybersecurity_incidents] { <col0>[INT]:[incident_date] <col1>[DATE]:[category] <col2>[VARCHAR]:[255] <col3>[region]:[VARCHAR] <col4>[255]:[INSERT] } | SELECT COUNT( * ), category FROM `<table0>` WHERE `<col3>` = 'Europe' AND incident_date >= DATE_SUB( CURDATE( ), INTERVAL 5 YEAR ) GROUP BY category; | Identify the number of cybersecurity incidents and their categories in Europe over the last 5 years. |
<table0>[table_48830] { <col0>[Rank]:[real] <col1>[Location]:[text] <col2>[2008]:[real] <col3>[2009]:[real] <col4>[2010]:[real] <col5>[2011]:[real] <col6>[2012]:[real] } | SELECT AVG( "2010" ) FROM `<table0>` WHERE "Rank" = '1' AND "2009" > '17,233,000' | Which 2010 has a Rank of 1, and a 2009 larger than 17,233,000? |
<table0>[table_23064] { <col0>[Draw]:[real] <col1>[Artist]:[text] <col2>[Original]:[text] <col3>[English]:[Meaning] <col4>[text]:[Language] <col5>[text]:[Authors] } | SELECT "Draw" FROM `<table0>` WHERE "Language" = 'English' AND "English Meaning" = 'Eyes That Never Lie' | What was the draw for the english meaning Eyes that Never Lie?
|
<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 JOB_ID, SUM( `<col7>` ) FROM `<table0>` WHERE `<col5>` < '2002-06-21' GROUP BY `<col6>` | For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the sum of salary , and group by attribute job_id in a bar chart.
|
<table0>[seafood_export] { <col0>[product]:[VARCHAR] <col1>[255]:[quantity] <col2>[INT]:[year] <col3>[INT]:[country] <col4>[VARCHAR]:[255] <col5>[PRIMARY]:[KEY] <col6>[product]:[year] <col7>[country]:[INSERT] } | SELECT ( SUM( quantity ) * 100.0 / ( SELECT SUM( quantity ) FROM `<table0>` WHERE year = 2025 ) ) FROM `<table0>` WHERE year = 2025 AND `<col7>` = 'Antarctica' AND region = 'Asia'; | Find the percentage of seafood exported to Asia from Antarctica in 2025. |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <c... | SELECT LAST_NAME, `<col10>` FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col2>` | 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 last_name by a bar chart, I want to list by the LAST_NAME from low to high please. |
<table0>[table_name_55] { <col0>[player]:[VARCHAR] <col1>[to_par]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+11" | Which player had a To par of +11? |
<table0>[church] { <col0>[open_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` HAVING COUNT( * ) >= 2 | Show the opening year in whcih at least two churches opened.
|
<table0>[retailers] { <col0>[retailer_id]:[INT] <col1>[retailer_name]:[VARCHAR] } <table1>[inventory] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[retailer_id]:[INT] <col3>[is_organic]:[BOOLEAN] <col4>[is_gluten_free]:[BOOLEAN] } | SELECT DISTINCT r.retailer_name FROM `<table0>` r JOIN inventory i ON r.retailer_id = i.retailer_id WHERE i.is_organic = true AND i.is_gluten_free = true; | Show the names of all retailers carrying both "organic" and "gluten-free" products |
<table0>[table_22736523_1] { <col0>[result]:[VARCHAR] <col1>[week__number]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Top 40" | For week number of the top 40, what was the results?
|
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[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>[valuenum]:[number] <col7>[valueuom]:[tex... | SELECT COUNT( DISTINCT `<table15>`.hadm_id ) FROM `<table15>` WHERE `<table15>`.subject_id = 32755 AND DATETIME( `<table15>`.admittime ) >= DATETIME( CURRENT_TIME( ), '-4 year' ) | what is the number of times that patient 32755 visits the hospital since 4 years ago? |
<table0>[table_39837] { <col0>[Rank]:[text] <col1>[Wicket]:[text] <col2>[Player]:[text] <col3>[Matches]:[text] <col4>[Average]:[text] } | SELECT "Average" FROM `<table0>` WHERE "Rank" = '2' | What is the average that has 2 for the rank?
|
<table0>[ExcavationLeaders] { <col0>[LeaderID]:[int] <col1>[LeaderName]:[text] <col2>[Affiliation]:[text] } | SELECT `<col1>` FROM `<table0>` WHERE `<col2>` = 'Knossos Palace'; | Who has led excavations at the Knossos Palace? |
<table0>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Birth] <col3>[text]:[Height] <col4>[real]:[Weight] } <table1>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6... | SELECT Sex, COUNT( `<col1>` ) FROM `<table0>` GROUP BY `<col1>` | Find Sex and the amount of Sex , and group by attribute Sex, and visualize them by a bar chart. |
<table0>[exists] { <col0>[seoul_metro_trips]:[INT] <col1>[trip_id]:[INT] <col2>[fare]:[DECIMAL] <col3>[route_id]:[INT] <col4>[vehicle_id]:[INT] <col5>[timestamp]:[TIMESTAMP] } | SELECT COUNT( * ) FROM seoul_metro_trips WHERE EXTRACT( HOUR FROM timestamp ) BETWEEN 17 AND 19 AND EXTRACT( DAY FROM timestamp ) = 10 AND EXTRACT( MONTH FROM timestamp ) = 5 AND EXTRACT( YEAR FROM timestamp ) = 2021; | How many metro trips were taken in Seoul during evening rush hour on May 10th, 2021? |
<table0>[table_57262] { <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 "Home `<col2>` score" FROM `<table0>` WHERE "Crowd" > '12,000' AND "Venue" = 'brunswick street oval' | What is the score of the home team that played at brunswick street oval with a crowd larger than 12,000? |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.gender = "F" AND diagnoses.icd9_code = "4160" | count the number of patients whose gender is f and diagnoses icd9 code is 4160? |
<table0>[news_articles] { <col0>[INT]:[title] <col1>[TEXT]:[source] <col2>[TEXT]:[year] <col3>[INT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE source = 'The Guardian' AND year BETWEEN 2015 AND 2018; | How many news articles were published by 'The Guardian' between 2015 and 2018? |
<table0>[table_60579] { <col0>[Year]:[Ceremony] <col1>[text]:[Original] <col2>[title]:[text] <col3>[Film]:[title] <col4>[nomination]:[text] <col5>[Director]:[text] <col6>[Result]:[text] } | SELECT "Original title" FROM `<table0>` WHERE "Film `<col2>` used in nomination" = 'brecha en el silencio' | What's the original title of the nomination title, 'brecha en el silencio'? |
<table0>[table_name_17] { <col0>[date]:[VARCHAR] <col1>[opponent]:[VARCHAR] <col2>[result]:[VARCHAR] <col3>[attendance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "1–0" AND `<col3>` > 668 AND `<col1>` = "ayr united" | On what date was the opponent Ayr United, the result 1–0, and the attendance more than 668? |
<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 ACC_Road, AVG( `<col0>` ) FROM `<table0>` GROUP BY `<col6>` ORDER BY AVG( `<col0>` ) | Give me the comparison about the average of Team_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, and display by the y-axis in asc. |
<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 `<table0>`.admission_type = "URGENT" AND procedures.short_title = "Endosc sphincterotomy" | how many of the patients on urgent admission had endosc sphincterotomy? |
<table0>[table_204_225] { <col0>[number]:[rank] <col1>[number]:[country] <col2>[territory]:[text] <col3>[miss]:[supranational] <col4>[number]:[1st] <col5>[runner]:[number] <col6>[2nd]:[runner] <col7>[number]:[3rd] <col8>[runner]:[number] <col9>[4th]:[runner] <col10>[number]:[semifinalists] <col11>[number]:[total] } | SELECT "country/territory" FROM `<table0>` WHERE "1st runner-up" = 2 | who is the frist country to have a 1st runner up of 2 |
<table0>[tournament_2022] { <col0>[player_id]:[INT] <col1>[player_name]:[TEXT] <col2>[score]:[INT] <col3>[country]:[TEXT] } | SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col3>` = 'South America'; | What was the total score of players from South America in the 'tournament_2022' table? |
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <... | SELECT Nationality, AVG( meter_100 ) FROM `<table2>` GROUP BY Nationality ORDER BY AVG( meter_100 ) DESC | Visualize a bar chart about the distribution of Nationality and the average of meter_100 , and group by attribute Nationality, and order Y in desc order. |
<table0>[table_23511] { <col0>[real]:[Barangay] <col1>[text]:[Area] <col2>[text]:[Rank] <col3>[real]:[Population] <col4>[2000]:[real] <col5>[Population]:[2007] <col6>[real]:[Population] <col7>[2010]:[real] <col8>[Population]:[Density] <col9>[2010]:[text] } | SELECT MAX( "Population ( `<col4>` )" ) FROM `<table0>` WHERE "Area ( in km 2 )" = '1.2530' | How many people lived in the city which has 1.2530 km in the year 2000?
|
<table0>[employment] { <col0>[Company_ID]:[int] <col1>[People_ID]:[int] <col2>[Year_working]:[int] } <table1>[company] { <col0>[Company_ID]:[real] <col1>[text]:[Headquarters] <col2>[text]:[Industry] <col3>[text]:[Sales_in_Billion] <col4>[real]:[Profits_in_Billion] <col5>[real]:[Assets_in_Billion] <col6>[real]:[Market_... | SELECT Headquarters, COUNT( * ) FROM `<table1>` GROUP BY Headquarters ORDER BY Headquarters DESC | Show the different headquarters and number of companies at each headquarter, and list X-axis in descending order.
|
<table0>[table_name_79] { <col0>[bronze]:[INTEGER] <col1>[total]:[INTEGER] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1 | How many bronze medals for the nation with less than 1 total?
|
<table0>[civil_engineering_structures] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[type]:[VARCHAR] <col3>[255]:[location] <col4>[VARCHAR]:[255] } <table1>[structure_construction_dates] { <col0>[structure_id]:[INT] <col1>[year]:[INT] } | SELECT ce.type, MIN( scd.year ) as earliest_year, MAX( scd.year ) as latest_year FROM `<table0>` ce INNER JOIN structure_construction_dates scd ON ce.id = scd.structure_id GROUP BY ce.type; | What is the earliest and latest year of construction for each structure type ('dam', 'bridge', 'tunnel') in the 'civil_engineering_structures' and 'structure_construction_dates' tables? |
<table0>[crops] { <col0>[SERIAL]:[PRIMARY] <col1>[KEY]:[name] <col2>[TEXT]:[yield] <col3>[INT]:[region] } | INSERT INTO crops ( name, yield, region ) VALUES ( 'sorghum', 80, 'Africa' ); | Add a new entry to the "crops" table with the name "sorghum", a yield of 80, and region "Africa" |
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti... | SELECT MIN( `<table5>`.admissionweight ) FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '027-141930' ) AND NOT `<table5>`.admissionweight IS NULL AND STRFTIME( '%y', `<table5>`.unitadmittime ) <= '2101' GROUP... | what is the yearly minimum of patient 027-141930's weight until 2101?
|
<table0>[table_80270] { <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 MIN( "Year" ) FROM `<table0>` WHERE "Women's singles" = 'pi hongyan' | Give the earliest year that featured Pi Hongyan on women's singles.
|
<table0>[table_name_6] { <col0>[event]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "19 december 2009" | What is Event, when Date is '19 December 2009'? |
<table0>[sea_ice_extent] { <col0>[year]:[INT] <col1>[region]:[VARCHAR] <col2>[255]:[extent] } | SELECT MIN( extent ) FROM `<table0>` WHERE `<col1>` = 'Antarctic' AND `<col0>` = 2020; | What's the minimum sea ice extent in the Antarctic region in 2020? |
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_tit... | SELECT `<table13>`.label FROM `<table13>` WHERE `<table13>`.itemid IN ( SELECT `<table0>`.itemid FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 99647 ) AND DATETIME( `<table0>`.charttime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year... | what lab test in 12/this year was given to patient 99647 for the first time? |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[regions] { <col0>[REGION_ID]:[deci... | SELECT FIRST_NAME, `<col7>` FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table4>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col7>` DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about salary over the first_name by a bar chart, I want to list Y from high to low order. |
<table0>[countries] { <col0>[country_id]:[INT] <col1>[country_name]:[VARCHAR] <col2>[100]:[INSERT] } <table1>[protected_areas] { <col0>[area_id]:[INT] <col1>[country_id]:[INT] <col2>[year]:[INT] <col3>[sequestration_rate]:[DECIMAL] } | SELECT c.country_name, pa.year, SUM( pa.sequestration_rate ) as total_sequestration_rate FROM `<table1>` pa JOIN countries c ON pa.country_id = c.country_id GROUP BY c.country_name, pa.year ORDER BY total_sequestration_rate DESC; | Which countries have the highest carbon sequestration potential by protected areas and year? |
<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, T2.Revenue FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue DESC | For those records from the products and each product's manufacturer, give me the comparison about the average of revenue over the name , and group by attribute name by a bar chart, and show in descending by the Y. |
<table0>[table_test_24] { <col0>[int]:[history_of_bleeding_diathesis] <col1>[bool]:[bleeding] <col2>[int]:[systolic_blood_pressure_sbp] <col3>[int]:[hemoglobin_a1c_hba1c] <col4>[float]:[blood_draw] <col5>[bool]:[renal_disease] <col6>[bool]:[allergy_to_aspirin] <col7>[bool]:[allergy_to_clopidogrel] <col8>[bool]:[cardiog... | SELECT * FROM `<table0>` WHERE cardiogenic_shock = 1 OR symptomatic_hypotension = 1 OR systolic_blood_pressure_sbp < 95 | cardiogenic shock or symptomatic hypotension or sitting sbp < 95 mmhg |
<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 `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.ethnicity = "BLACK/AFRICAN AMERICAN" AND `<table2>`.dob_year < "2076" | provide the the number of black/african american patients born before 2076.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.