schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_17060277_5] { <col0>[high_assists]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 12 | Who all had the most assists in game 12? |
<table0>[table_65863] { <col0>[Rank]:[real] <col1>[Player]:[text] <col2>[County]:[text] <col3>[Tally]:[text] <col4>[Total]:[real] <col5>[Opposition]:[text] } | SELECT COUNT( "Rank" ) FROM `<table0>` WHERE "Opposition" = 'tipperary' | What is the total rank of the match with tipperary as the opposition?
|
<table0>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table1>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table2>[Has_Allerg... | SELECT Fname, AVG( `<col3>` ) FROM `<table0>` WHERE `<col4>` = 'F' GROUP BY `<col2>` ORDER BY AVG( `<col3>` ) | Show the average age for all female students and group them by first name in a bar chart, and could you rank the average of age in asc order? |
<table0>[restaurant] { <col0>[int]:[name] <col1>[varchar]:[food_type] <col2>[varchar]:[city_name] <col3>[varchar]:[rating] } <table1>[geographic] { <col0>[city_name]:[varchar] <col1>[county]:[varchar] <col2>[region]:[varchar] } <table2>[location] { <col0>[restaurant_id]:[int] <col1>[house_number]:[int] <col2>[street_... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id | where can i eat french food in mountain view ? |
<table0>[Cases] { <col0>[CaseID]:[INT] <col1>[State]:[VARCHAR] <col2>[Region]:[VARCHAR] <col3>[BillingAmount]:[DECIMAL] } | SELECT Region, State, COUNT( * ) AS NumberOf`<table0>` FROM `<table0>` GROUP BY Region, State; | What is the number of cases in each state, grouped by region? |
<table0>[table_11886] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Director]:[text] <col4>[Writer]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] } | SELECT "Writer( s )" FROM `<table0>` WHERE "Title" = 'parting glances' | Who wrote the title 'Parting Glances' ? |
<table0>[table_2140071_7] { <col0>[episode]:[VARCHAR] <col1>[coach]:[VARCHAR] } | SELECT COUNT( `<col0>` ) AS Summary FROM `<table0>` WHERE `<col1>` = "Valerie" | How many episodes have Valerie? |
<table0>[table_47224] { <col0>[Player]:[text] <col1>[Nationality]:[text] <col2>[Jersey]:[Number] <col3>[text]:[Position] <col4>[text]:[Years] <col5>[text]:[text] } | SELECT "Years" FROM `<table0>` WHERE "From" = 'connecticut' | What years were from Connecticut?
|
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT MAX( `<table1>`.age ) FROM `<table1>` WHERE `<table1>`.admission_type = "EMERGENCY" AND `<table1>`.dod_year < "2173.0" | what is maximum age of patients whose admission type is emergency and year of death is less than 2173? |
<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 COUNT( * ) > 0 FROM `<table5>` WHERE `<table5>`.uniquepid = '002-62783' AND `<table5>`.hospitaladmitsource = 'emergency department' AND DATETIME( `<table5>`.unitadmittime ) <= DATETIME( CURRENT_TIME( ), '-4 year' ) | had patient 002-62783 until 4 years ago been admitted to an emergency room?
|
<table0>[table_71324] { <col0>[Club]:[text] <col1>[League]:[text] <col2>[Sport]:[text] <col3>[Venue]:[text] <col4>[Established]:[real] } | SELECT "Venue" FROM `<table0>` WHERE "Club" = 'spartak st. petersburg' | What Venue has Spartak St. Petersburg Club?
|
<table0>[table_66748] { <col0>[Season]:[text] <col1>[Champion]:[text] <col2>[Runner]:[text] <col3>[Israel]:[Bowl] <col4>[text]:[Venue] <col5>[text]:[Date] <col6>[text]:[Finals] <col7>[MVP]:[text] } | SELECT "Israel Bowl" FROM `<table0>` WHERE "Date" = 'march 30, 2012' | Name the Israel Bowl for march 30, 2012
|
<table0>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[... | SELECT * FROM `<table9>` WHERE `<col4>` = 1 | SO Users with Gold Badges Related to a Given Tag. Does what it says on the tin. Enter a valid Tag, and if there is anyone with a Gold badge for that tag, get all the available info for them. Change:
WHERE UPPER(b.name) LIKE UPPER('%' + ##Tag:string## + '%') AND b.TagBased = 1 AND b.Class = 1
to
WHERE UPPER(b.... |
<table0>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.`<table3>` < ( SELECT SEMESTERalias0.`<table3>`_id FROM `<table3>` AS SEMESTERalias0 WHERE SEMESTERalias0.`<table3>` = 'WN' AND SEMESTERalias0.year = 2016 ) AND course.course... | In the past , which classes has Dr. Kathleen Baker taught ? |
<table0>[table_name_52] { <col0>[date]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "north melbourne" | What day did North Melbourne play as the home team? |
<table0>[menu_items_r1] { <col0>[menu_item_id]:[INT] <col1>[menu_item_name]:[TEXT] } <table1>[menu_items_r3] { <col0>[menu_item_id]:[INT] <col1>[menu_item_name]:[TEXT] } | SELECT `<col1>` FROM `<table0>` WHERE `<col1>` IN ( SELECT `<col1>` FROM `<table1>` ); | Which menu items are served at both restaurant 1 and restaurant 3? Display the menu item name. |
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[jobs] { <col0>[JOB_ID]:[varchar] <... | SELECT JOB_ID, AVG( `<col7>` ) FROM `<table4>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 GROUP BY `<col6>` ORDER BY `<col6>` DESC | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, order from high to low by the x-axis.
|
<table0>[table_name_22] { <col0>[tries]:[INTEGER] <col1>[conversions]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 0 | What is the smallest number of tries with conversions more than 0? |
<table0>[table_name_38] { <col0>[week_12]:[VARCHAR] <col1>[week_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "magda tomek" | Who is the week 12 for the week 2 with Magda Tomek? |
<table0>[ALBUM] { <col0>[Title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY `<col0>` | Please list all album titles in alphabetical order. |
<table0>[table_name_87] { <col0>[score]:[VARCHAR] <col1>[team_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "usl dunkerque ( d2 )" | What was the Score of the match with USL Dunkerque (d2) as Team 2? |
<table0>[table_16113] { <col0>[Season]:[text] <col1>[Series]:[text] <col2>[Team]:[text] <col3>[Races]:[real] <col4>[Wins]:[real] <col5>[Poles]:[real] <col6>[Laps]:[real] <col7>[Podiums]:[real] <col8>[Points]:[real] <col9>[Position]:[text] } | SELECT COUNT( "Wins" ) FROM `<table0>` WHERE "Series" = 'GP2 Series' AND "Team" = 'Racing Engineering' | What is the number of wins for gp2 series for racing engineering?
|
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.admityear < "2139" AND prescriptions.route = "NU" | how many patients admitted before the year 2139 undertook drug route nu? |
<table0>[table_52811] { <col0>[Code]:[real] <col1>[Type]:[text] <col2>[text]:[Area] <col3>[real]:[Population] <col4>[real]:[Regional] <col5>[County]:[Municipality] <col6>[text]:[Region] } | SELECT COUNT( "Code" ) FROM `<table0>` WHERE "Type" = 'v' AND "Population" > '7,747' | When populatioin is greater than 7,747 and the type is V, what is the sum of code?
|
<table0>[table_name_25] { <col0>[attendance]:[VARCHAR] <col1>[week]:[VARCHAR] <col2>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 5 AND `<col2>` = "september 18, 1994" | What was the attendance for the game held on September 18, 1994, with a week less than 5? |
<table0>[table_17933600_2] { <col0>[outgoing_manage]:[VARCHAR] <col1>[incoming_manager]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "João Pereira" | Who was the outgoing manager when the incoming manager was joão pereira? |
<table0>[table_13241993_3] { <col0>[part_2]:[VARCHAR] <col1>[part_1]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "January 31, 2008" | What was the air date of part 2 of the episode whose part 1 was aired on January 31, 2008? |
<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_Neutral, `<col1>` FROM `<table0>` ORDER BY `<col1>` | Draw a bar chart about the distribution of All_Neutral and School_ID , and sort Y in asc order. |
<table0>[table_name_52] { <col0>[party]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "rodney alexander" | What is Party, when Incumbent is "Rodney Alexander"? |
<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 MIN( `<table1>`.age ) FROM `<table1>` WHERE `<table1>`.diagnosis = "HYPOXIA" AND `<table1>`.dod_year < "2155.0" | what is minimum age of patients whose primary disease is hypoxia and year of death is less than 2155?
|
<table0>[table_1197] { <col0>[Series]:[text] <col1>[Episode]:[real] <col2>[Netflix]:[text] <col3>[Segment]:[text] <col4>[Segment]:[text] <col5>[Segment]:[text] <col6>[Segment]:[text] } | SELECT COUNT( "Episode" ) FROM `<table0>` WHERE "Segment B" = 's Hacksaw' | Name the number of episodes for s hacksaw
|
<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_Neutral, `<col8>` FROM `<table0>` ORDER BY `<col8>` DESC | Create a bar chart showing all_games_percent across all neutral, sort by the y axis from high to low. |
<table0>[table_204_579] { <col0>[number]:[code] <col1>[text]:[district] <col2>[text]:[headquarters] <col3>[text]:[population] <col4>[2011]:[number] <col5>[area]:[km2] <col6>[number]:[density] <col7>[km2]:[number] } | SELECT "district" FROM `<table0>` WHERE "district" IN ( 'dehradun', 'nainital' ) ORDER BY "population ( as of `<col4>` )" DESC LIMIT 1 | which has a larger population , dehradun or nainital ? |
<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 prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug = "Chloraseptic Throat Spray" | how many patients of white-russian ethnicity used the drug chloraseptic throat spray? |
<table0>[table_71775] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Record]:[text] } | SELECT "Score" FROM `<table0>` WHERE "Record" = '59-65' | What was the score of the game when the record was 59-65?
|
<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 diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "80126" AND prescriptions.route = "INHALATION" | how many of the patients with icd9 code 80126 received inhalation therapy? |
<table0>[table_name_28] { <col0>[agg]:[VARCHAR] <col1>[team__number2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "estudiantes" | When Estudiantes was team #2, what was their agg. value?
|
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer... | SELECT * FROM `<table23>` WHERE Id BETWEEN 6000 AND 6500 | database schema for questions and answers. |
<table0>[movie] { <col0>[director]:[VARCHAR] <col1>[YEAR]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1999 OR `<col1>` = 2000 | Show all director names who have a movie in the year 1999 or 2000. |
<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>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE `<table2>`.expire_flag = "0" AND prescriptions.drug = "Nitroglycerin SL" | what is the number of patients whose death status is 0 and drug name is nitroglycerin sl? |
<table0>[awards_players] { <col0>[playerID]:[text] <col1>[award]:[text] <col2>[year]:[integer] <col3>[lgID]:[text] <col4>[note]:[text] <col5>[pos]:[text] } <table1>[coaches] { <col0>[coachID]:[text] <col1>[year]:[integer] <col2>[tmID]:[text] <col3>[lgID]:[text] <col4>[stint]:[integer] <col5>[won]:[integer] <col6>[lost... | SELECT COUNT( T1.id ) FROM `<table6>` AS T1 INNER JOIN teams AS T2 ON T1.year = T2.year WHERE T1.year BETWEEN 1971 AND 1975 AND T1.award = 'NBA Coach of the Year' AND T2.tmID = 'POR' | Among the coaches who won the 'NBA coach of the year' award from 1971 - 1975, how many of them were in 'POR' team? |
<table0>[projects] { <col0>[project_id]:[INT] <col1>[project_type]:[VARCHAR] <col2>[255]:[success_rate] <col3>[DECIMAL]:[completion_date] } | SELECT project_type, AVG( success_rate ) FROM `<table0>` WHERE completion_date >= DATE_SUB( CURRENT_DATE, INTERVAL 3 YEAR ) GROUP BY project_type; | What is the average success rate of rural infrastructure projects, broken down by the type of infrastructure, in the 'rural_development' schema's 'projects' table, completed in the last 3 years? |
<table0>[digital_divide_asia] { <col0>[country]:[VARCHAR] <col1>[population]:[INT] <col2>[affected]:[INT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Asia'; | What is the average number of people affected by the digital divide in Asia? |
<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>[Student_Tests_Taken] ... | SELECT family_name, `<col7>` FROM `<table4>` ORDER BY `<col4>` | Visualize a bar chart about the distribution of family_name and gender_mf . |
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[inputevents_cv] { <... | SELECT COUNT( * ) > 0 FROM `<table7>` WHERE `<table7>`.icd9_code = ( SELECT `<table12>`.icd9_code FROM `<table12>` WHERE `<table12>`.short_title = 'hyposmolality' ) AND `<table7>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 73913 ) | has patient 73913 been diagnosed with hyposmolality?
|
<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 | 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.
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admityear < "2177" AND lab.flag = "abnormal" | find the number of patients admitted before 2177 who have abnormal lab test status.
|
<table0>[table_name_77] { <col0>[VARCHAR]:[award] } | SELECT show FROM `<table0>` WHERE award = "indian television academy awards" | Which Show has an Award of indian television academy awards? |
<table0>[table_25244412_1] { <col0>[state]:[VARCHAR] <col1>[renewable_electricity__gw]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE renewable_electricity__gw•h_ = 9667 | Which states have renewable electricity equal to 9667 (gw×h)? |
<table0>[table_23551] { <col0>[text]:[Original] <col1>[title]:[text] <col2>[Directed]:[text] <col3>[Written]:[text] <col4>[Original]:[airdate] <col5>[text]:[Prod] <col6>[code]:[text] <col7>[Viewers]:[real] } | SELECT COUNT( "#" ) FROM `<table0>` WHERE "Original title" = 'Helpful Tracy' | When 'helpful tracy' is the original title how many numbers are there?
|
<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 INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Hypertrophy ( benign ) of prostate without urinary obstruction and other lower urinary tract symptom ( LUTS )" AN... | provide the number of patients whose diagnoses long title is hypertrophy (benign) of prostate without urinary obstruction and other lower urinary tract symptom (luts) and lab test abnormal status is delta?
|
<table0>[table_1341453_37] { <col0>[results]:[VARCHAR] <col1>[first_elected]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1984 | What was the result of the election in which the incumbent was first elected in 1984? |
<table0>[table_52678] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[High]:[points] <col5>[text]:[High] <col6>[rebounds]:[text] <col7>[High]:[assists] <col8>[text]:[Location] <col9>[Attendance]:[text] <col10>[Series]:[text] } | SELECT MAX( "Game" ) FROM `<table0>` WHERE "High rebounds" = 'evans ( 7 )' AND "High assists" = 'evans, ollie ( 3 )' | Which game has a high rebound of Evans (7) and a high assist of Evans, Ollie (3)?
|
<table0>[table_62393] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] <col5>[Money]:[real] } | SELECT "Place" FROM `<table0>` WHERE "Country" = 'united states' AND "To par" = '–5' | Name the Place which has To par of 5, in united states?
|
<table0>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table1>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter... | SELECT Time, ID FROM `<table1>` | Bar chart x axis time y axis id
|
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table2>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <... | SELECT B.Name, B.UserId AS "user_link" FROM `<table28>` AS B WHERE `<col3>` = 1 AND `<col4>` = 1 AND Id = ( SELECT MIN( B2.Id ) FROM `<table28>` AS B2 WHERE B2.Name = B.Name AND B2.Class = 1 AND B2.TagBased = 1 ) GROUP BY B.Name, B.UserId ORDER BY B.Name | First User to get a Gold Tag-Based Badge. |
<table0>[table_4927] { <col0>[Player]:[text] <col1>[Span]:[text] <col2>[Lost]:[text] <col3>[Draw]:[text] <col4>[Tries]:[text] <col5>[Conv]:[text] <col6>[Pens]:[text] <col7>[Drop]:[text] } | SELECT "Draw" FROM `<table0>` WHERE "Drop" = '0' AND "Pens" = '0' AND "Span" = '1995' | What is the draw with drop and pens 0 in 1995?
|
<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 `<table1>`.admission_type FROM `<table1>` WHERE `<table1>`.name = "Dona Cole" | find the admission type of dona cole.
|
<table0>[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]:[text] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] ... | SELECT MIN( `<table10>`.value ) FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table13>`.icustay_id FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 97121 ) ) AND `<table10>`.itemid IN ( SELECT `<table1>`.itemid FROM `<table1>` WHERE... | indicate the yearly minimum volume of r pleural ns irrig that patient 97121 has had since 06/2105. |
<table0>[production] { <col0>[item_name]:[VARCHAR] <col1>[255]:[material] <col2>[VARCHAR]:[255] <col3>[quantity]:[INT] <col4>[production_date]:[DATE] } | SELECT material, SUM( `<col3>` ), DATE_FORMAT( `<table0>`_date, '%Y-%m' ) as Month FROM `<table0>` GROUP BY material, Month ORDER BY Month ASC; | What is the total quantity of sustainable materials used in production by month? |
<table0>[table_name_22] { <col0>[tournament]:[VARCHAR] <col1>[opponent_in_the_final]:[VARCHAR] <col2>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nadia petrova" AND `<col2>` = "6–3, 4–6, 6–1" | Which tournament has an opponent in the final of nadia petrova and a score of 6 3, 4 6, 6 1??
|
<table0>[table_10725629_2] { <col0>[rnd]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "August 9" | Which rounds were held on August 9? |
<table0>[table_28138035_4] { <col0>[mens_singles]:[VARCHAR] <col1>[womens_doubles]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Lee Eun-Sil Moon Hyun-Jung" | Name the mens singles for lee eun-sil moon hyun-jung
|
<table0>[accommodations] { <col0>[INT]:[type] <col1>[VARCHAR]:[255] <col2>[description]:[VARCHAR] <col3>[255]:[INSERT] } | DELETE FROM `<table0>` WHERE type NOT IN ( 'Wheelchair Ramp', 'Elevator' ); | Delete all records from the accommodations table that are not wheelchair ramps or elevators. |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text... | SELECT t1.`<table3>`name FROM ( SELECT `<table3>`.`<table3>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table3>` WHERE STRFTIME( '%y', `<table3>`.`<table3>`resulttime ) >= '2103' GROUP BY `<table3>`.`<table3>`name ) AS t1 WHERE t1.c1 <= 5 | what are the five most frequent laboratory tests taken since 2103?
|
<table0>[football_season] { <col0>[player_id]:[INT] <col1>[player_name]:[VARCHAR] <col2>[team_id]:[INT] <col3>[team_name]:[VARCHAR] <col4>[position]:[VARCHAR] <col5>[games_played]:[INT] <col6>[points]:[INT] } | SELECT player_name, AVG( `<col6>` ) as avg_points FROM `<table0>` GROUP BY player_name; | What is the average points scored per game by each player in the 2020 football season? |
<table0>[table_name_47] { <col0>[week]:[VARCHAR] <col1>[theme]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "heroes" | Which week had a theme of Heroes? |
<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 `<table0>`.short_title, procedures.short_title FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.subject_id = "23602" | find out the short title of both diagnoses and procedure for patient with patient id 23602. |
<table0>[bool] { <col0>[name]:[text] } <table1>[person] { <col0>[name]:[text] } <table2>[disabled] { <col0>[name]:[text] } <table3>[enlist] { <col0>[name]:[text] <col1>[organ]:[text] } <table4>[filed_for_bankrupcy] { <col0>[name]:[text] } <table5>[longest_absense_from_school] { <col0>[name]:[text] <col1>[month]:[i... | SELECT CAST( ( SUM( IIF( T2.name IS NOT NULL AND T1.month = 0, 1, 0 ) ) - SUM( IIF( T2.name IS NULL AND T1.month = 0, 1, 0 ) ) ) AS REAL ) * 100 / COUNT( T1.name ), IIF( SUM( IIF( T2.name IS NOT NULL AND T1.month = 0, 1, 0 ) ) - SUM( IIF( T2.name IS NULL AND T1.month = 0, 1, 0 ) ) > 0, 'YES', 'NO' ) AS isHigh FROM `<ta... | What is the percentage difference between the attendence of disabled and non-disable students? Do the disable students show better attendance than non-disable students? |
<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>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diabetes with ketoacidosis, type I [juvenile type], not stated as uncontrolled" AND lab."CATEGORY" = "Chemistry" | How many patients diagnosed with diabetic ketoacidosis type i (juvenile type) and not stated as uncontrolled had clinical chemistry tests? |
<table0>[table_name_30] { <col0>[time_retired]:[VARCHAR] <col1>[driver]:[VARCHAR] <col2>[laps]:[VARCHAR] <col3>[grid]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` < 75 AND `<col3>` < 15 AND `<col1>` = "ronnie peterson" | What is the time/retired for ronnie peterson with under 75 laps and a grid under 15?
|
<table0>[table_name_26] { <col0>[fate]:[VARCHAR] <col1>[ship]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "bremen" | What is the fate for the Bremen ship?
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesi... | SELECT `<table3>`.`<table3>`resulttime FROM `<table3>` WHERE `<table3>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '021-49082' ) ) ORDER BY... | when did patient 021-49082 get a lab test for the first time? |
<table0>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table1>[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] <... | SELECT DISTINCT course.department, course.name, course.number, `<table0>`.workload, `<table0>`.workload FROM course, `<table0>` WHERE `<table0>`.category LIKE '%Core%' AND `<table0>`.course_id = course.course_id AND `<table0>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table0>` AS PROGRAM_COURSEali... | What class can I take to fulfill the Core requirement easily ? |
<table0>[table_2603017_2] { <col0>[ba___running_bear]:[VARCHAR] <col1>[ab___angry_boar]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "OS - Ox Soldier" | what is ba - running bear where ab - angry boar is os - ox soldier? |
<table0>[ticket_sales] { <col0>[team_id]:[INT] <col1>[team_name]:[VARCHAR] <col2>[total_sales]:[DECIMAL] } | SELECT team_name, `<col2>` FROM ( SELECT team_name, total_sales, ROW_NUMBER( ) OVER ( ORDER BY `<col2>` DESC ) AS rank FROM `<table0>` ) AS team_ranks WHERE rank <= 3; | List the top 3 teams with the highest total ticket sales, along with their total sales, in descending order. |
<table0>[table_name_84] { <col0>[capacity]:[VARCHAR] <col1>[founded]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1944 | How much capacity has 1944 as the founded? |
<table0>[table_70480] { <col0>[text]:[Years] <col1>[text]:[Gender] <col2>[text]:[Area] <col3>[text]:[Authority] <col4>[text]:[Decile] <col5>[real]:[Roll] } | SELECT "Years" FROM `<table0>` WHERE "Area" = 'porangahau' AND "Name" = 'porangahau school' | Name the years for porangahau school
|
<table0>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table1>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table2>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <ta... | SELECT DISTINCT flight.flight_id FROM `<table6>` AS AIRPORT_SERVICE_0, `<table6>` 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 = 'NASHVILLE' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_d... | i'd like to fly from COLUMBUS to NASHVILLE tomorrow morning
|
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[chartevents] { <col... | SELECT AVG( t1.c1 ) FROM ( SELECT SUM( `<table3>`.`<table3>` ) AS c1 FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.drug = 'heparin ( hemodialysis )' ) AND STRFTIME( '%y', `<table3>`.chargetime ) >= '2105' GROUP BY `<table3>`.hadm_id ) AS t1 | what is the average total cost of a hospital, which includes a drug called heparin (hemodialysis) since 2105? |
<table0>[diagnoses] { <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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.admission_type = "EMERGENCY" AND procedures.long_title = "Endoscopic sphincterotomy and papillotomy" | how many patients whose admission type is emergency and procedure long title is endoscopic sphincterotomy and papillotomy?
|
<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>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table2>[icustays] { ... | SELECT `<table3>`.gender FROM `<table3>` WHERE `<table3>`.subject_id = 57899 | tell me the sex of patient 57899. |
<table0>[table_name_46] { <col0>[constructor]:[VARCHAR] <col1>[winning_driver]:[VARCHAR] <col2>[race]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jack brabham" AND `<col2>` = "monaco grand prix" | What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix? |
<table0>[Lots] { <col0>[lot_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[lot_details]:[VARCHAR] } <table1>[Sales] { <col0>[sales_transaction_id]:[INTEGER] <col1>[sales_details]:[VARCHAR] } <table2>[Purchases] { <col0>[purchase_transaction_id]:[INTEGER] <col1>[purchase_details]:[VARCHAR] } <table3>[Investors] {... | SELECT date_of_transaction, COUNT( `<col3>` ) FROM `<table6>` WHERE `<col5>` > 100 OR `<col4>` > 1000 ORDER BY COUNT( `<col3>` ) | A bar chart for showing the number of the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000, and sort in asc by the Y please.
|
<table0>[table_27170987_5] { <col0>[league_apps]:[VARCHAR] <col1>[total_goals]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 11 | How many league apps did the player with 11 team goals have? |
<table0>[table_203_499] { <col0>[number]:[place] <col1>[text]:[player] <col2>[text]:[country] <col3>[text]:[score] <col4>[text]:[par] <col5>[number]:[money] } | SELECT ( SELECT "score" FROM `<table0>` WHERE "place" = 6 ) - ( SELECT "score" FROM `<table0>` WHERE "place" = 2 ) | what is the score difference between 6th place and 2nd place ? |
<table0>[orders] { <col0>[order_id]:[INT] <col1>[order_date]:[DATETIME] <col2>[customer_id]:[INT] } <table1>[order_items] { <col0>[item_id]:[INT] <col1>[order_id]:[INT] <col2>[menu_id]:[INT] <col3>[quantity]:[INT] <col4>[INSERT]:[menus] <col5>[menu_id]:[name] <col6>[category]:[is_vegetarian] <col7>[price]:[quantity] <... | SELECT menu_id, name, `<col3>` FROM menus LEFT JOIN ( SELECT menu_id, SUM( `<col3>` ) as total_quantity FROM `<table1>` JOIN orders ON `<table1>`.order_id = orders.order_id WHERE DATE_SUB( CURRENT_DATE( ), INTERVAL 1 MONTH ) <= order_date GROUP BY `<col2>` ) x ON menus.menu_id = x.menu_id WHERE x.menu_id IS NULL; | Which menu items have not been ordered in the past month? |
<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>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>... | SELECT t1.drug FROM ( SELECT `<table14>`.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table14>` GROUP BY `<table14>`.drug ) AS t1 WHERE t1.c1 <= 5 | what were the top five medicines that were frequently prescribed?
|
<table0>[table_name_94] { <col0>[attendance]:[VARCHAR] <col1>[week]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 3 | What was the attendance for the game in Week 3? |
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.diagnosis = "COPD EXACERBATION" AND `<table3>`.age < "56" | how many patients less than 56 years have copd exacerbation primary disease?
|
<table0>[table_19179465_1] { <col0>[lost]:[INTEGER] <col1>[points]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 34 | How many games were lost when the club got 34 points |
<table0>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table2>[days] { <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 ( ( ( flight.departure_time <= 1200 AND flight.departure_time >= 1400 ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_ai... | does EA have an early afternoon flight from BOSTON to SAN FRANCISCO |
<table0>[table_64818] { <col0>[Ref]:[real] <col1>[text]:[Built] <col2>[real]:[Location] <col3>[text]:[Construction] } | SELECT "Location" FROM `<table0>` WHERE "Built" < '1872' AND "Name" = 'durfee mill no. 1' | What is the location of the Durfee Mill No. 1, built before 1872 ?
|
<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 `<table3>`.language, `<table3>`.admittime FROM `<table3>` WHERE `<table3>`.name = "Jesse Ran" | find out the preferred language and time of admission of the patient jesse ran.
|
<table0>[entrepreneur] { <col0>[Entrepreneur_ID]:[int] <col1>[People_ID]:[int] <col2>[Company]:[text] <col3>[Money_Requested]:[real] <col4>[Investor]:[text] } <table1>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Date_of_Birth] } | SELECT Date_of_Birth, COUNT( Date_of_Birth ) FROM `<table0>` AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" ORDER BY COUNT( Date_of_Birth ) DESC | Return the number of the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones, and order by the Y in desc.
|
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.marital_status = "MARRIED" AND lab.itemid = "51438" | give me the number of patients whose marital status is married and item id is 51438?
|
<table0>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table1>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table2>[management] { <col0>[department_ID]:[int]... | SELECT Name, Budget_in_Billions FROM `<table0>` ORDER BY Budget_in_Billions DESC | List the budget of each department in a bar chart, sort by the Y-axis from high to low please.
|
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[... | SELECT T1.ProductName FROM `<table5>` AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Heli Swaren GmbH & Co. KG' ORDER BY T1.ReorderLevel DESC LIMIT 2 | Please name any two products that have the highest satisfaction levels among users of Heli Swaren GmbH & Co. KG. |
<table0>[absences] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[employee_id] <col2>[INT]:[absence_date] } | DELETE FROM `<table0>` WHERE employee_id = 456 AND absence_date = '2022-06-15'; | Delete an absence record from the "absences" table |
<table0>[Lots] { <col0>[lot_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[lot_details]:[VARCHAR] } <table1>[Purchases] { <col0>[purchase_transaction_id]:[INTEGER] <col1>[purchase_details]:[VARCHAR] } <table2>[Sales] { <col0>[sales_transaction_id]:[INTEGER] <col1>[sales_details]:[VARCHAR] } <table3>[Ref_Transact... | SELECT date_of_transaction, COUNT( `<col3>` ) FROM `<table5>` WHERE `<col5>` > 100 OR `<col4>` > 1000 ORDER BY `<col3>` DESC | Show the number of the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000, and list by the date_of_transaction in desc. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.