schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <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>[application]:[text] <col7>[... | SELECT DISTINCT flight.flight_id FROM `<table7>` AS AIRPORT_SERVICE_0, `<table7>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'FORT WORTH' AND f... | do you have a flight from BOSTON to FORT WORTH |
<table0>[height_info] { <col0>[height_id]:[integer] <col1>[height_in_cm]:[integer] <col2>[height_in_inch]:[text] } <table1>[weight_info] { <col0>[weight_id]:[integer] <col1>[weight_in_kg]:[integer] <col2>[weight_in_lbs]:[integer] } <table2>[PlayerInfo] { <col0>[ELITEID]:[integer] <col1>[PlayerName]:[text] <col2>[birt... | SELECT T3.height_in_cm FROM `<table3>` AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T2.height = T3.height_id WHERE T1.SEASON = '2005-2006' AND T1.TEAM = 'Yale Univ.' AND T1.PIM = 28 | How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season? |
<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 MIN( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "M" AND `<table3>`.age >= "50" | what is minimum age of patients whose gender is m and age is greater than or equal to 50? |
<table0>[safety_test] { <col0>[vehicle_type]:[VARCHAR] <col1>[safety_rating]:[INT] } | SELECT vehicle_type, `<col1>` FROM `<table0>` WHERE `<col0>` LIKE '%Electric%' ORDER BY `<col1>` ASC; | List the safety ratings for electric vehicles in the 'safety_test' table, in ascending order. |
<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 procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.expire_flag = "0" AND procedures.short_title = "Regional lymph node exc" | provide the number of patients whose death status is 0 and procedure short title is regional lymph node exc? |
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[departments] { <col0>[DEPAR... | SELECT FIRST_NAME, COUNT( `<col1>` ) FROM `<table4>` WHERE `<col1>` LIKE '%m' GROUP BY `<col1>` | For those employees whose first name is ending with the letter m, show the proportion of the first name using a pie chart.
|
<table0>[programs] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[volunteer_hours] { <col0>[INT]:[program_id] <col1>[INT]:[volunteer_id] <col2>[INT]:[hours] <col3>[INT]:[INSERT] } | SELECT program_id, COUNT( DISTINCT volunteer_id ) as num_volunteers FROM `<table1>` GROUP BY program_id; | How many volunteers have contributed to each program in 2022? |
<table0>[table_178389_1] { <col0>[location_of_the_church]:[VARCHAR] <col1>[church_name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Ortnevik kyrkje" | What is the location of the church when the church name is Ortnevik Kyrkje? |
<table0>[table_name_20] { <col0>[rank]:[INTEGER] <col1>[name]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "sun yang" | What is sun yang's lowest rank?
|
<table0>[victim_services] { <col0>[INT]:[case_number] <col1>[INT]:[victim_name] <col2>[VARCHAR]:[255] <col3>[service_type]:[VARCHAR] <col4>[255]:[INSERT] } | SELECT victim_name, `<col3>` FROM `<table0>` WHERE case_number = 1234; | What is the name of the victim and type of service for case number 1234? |
<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 DISTINCT `<table0>`.gender FROM `<table0>` WHERE `<table0>`.uniquepid = '032-2747' | what are the genders of patient 032-2747?
|
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate... | SELECT Q.Id, Q.AcceptedAnswerId, Q.CreationDate, Q.Score, Q.Body AS "Question Body", Q.Title AS "Question Title", A.Body AS "Answer Body", Q.Tags FROM `<table8>` AS Q INNER JOIN `<table8>` AS A ON Q.AcceptedAnswerId = A.Id INNER JOIN PostTags AS PT ON PT.PostId = Q.Id WHERE PT.TagId = 17 AND Q.CreationDate BETWEEN '201... | Retrieve Answered Posts Tagged as 'Java' (and may contain othe) Created In The Month of January 2018.
|
<table0>[table_9781] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] } | SELECT MAX( "Attendance" ) FROM `<table0>` WHERE "Week" > '8' AND "Result" = 'w 42–0' | What is the Attendance after Week 8 with a Result of W 42 0? |
<table0>[table_197446_1] { <col0>[location]:[VARCHAR] <col1>[term_ended]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "January 3, 2011" | What location was the congressional service of which the term ended in January 3, 2011?
|
<table0>[member] { <col0>[Member_ID]:[int] <col1>[Card_Number]:[text] <col2>[text]:[Hometown] <col3>[text]:[Level] } <table1>[purchase] { <col0>[Member_ID]:[int] <col1>[Branch_ID]:[text] <col2>[Year]:[text] <col3>[Total_pounds]:[real] } <table2>[branch] { <col0>[Branch_ID]:[int] <col1>[text]:[Open_year] <col2>[text]:... | SELECT Hometown, COUNT( Hometown ) FROM `<table0>` GROUP BY Hometown ORDER BY COUNT( Hometown ) | Bar chart of the number of hometown from each hometown, order Y-axis in asc order.
|
<table0>[all_prevalences] { <col0>[ITEM]:[text] <col1>[POPULATION]:[TYPE] <col2>[text]:[OCCURRENCES] <col3>[integer]:[POPULATION] <col4>[COUNT]:[integer] <col5>[PREVALENCE]:[RATE] <col6>[real]:[PREVALENCE] <col7>[PERCENTAGE]:[real] } <table1>[patients] { <col0>[patient]:[text] <col1>[birthdate]:[date] <col2>[deathdate... | SELECT COUNT( DISTINCT T2.patient ) FROM `<table7>` AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'oxaliplatin 5 MG/ML [Eloxatin]' AND T2.race = 'asian' AND T2.gender = 'F' | How many Asian female patients take oxaliplatin 5 MG/ML [Eloxatin]? |
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[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] <... | SELECT `<table8>`.label FROM `<table8>` WHERE `<table8>`.itemid IN ( SELECT `<table14>`.itemid FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 26886 ) AND DATETIME( `<table14>`.charttime ) <= DATETIME( CURRENT_TIME( ), '-36 month' ) ORDER BY `<tabl... | what test has patient 26886 been given for the first time until 36 months ago?
|
<table0>[CREATE] { <col0>[SCHEMA]:[community_development] <col1>[Use]:[community_development] } <table1>[comm_dev_initiatives] { <col0>[initiative_code]:[VARCHAR] <col1>[start_date]:[DATE] } | SELECT DISTINCT initiative_code, start_date FROM community_development.comm_dev_initiatives ORDER BY start_date ASC; | List all unique community development initiative codes and their corresponding start dates in the 'community_development' schema, sorted by start date in ascending order. |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Badges] { <col0>[number]:[UserId] <col1>[numb... | SELECT YEAR( CreationDate ), AVG( Score ) FROM `<table15>` WHERE PostTypeId = 2 AND Score >= 0 GROUP BY YEAR( CreationDate ) | Trend of average score of positively received answers with [tag] by year of creation. |
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[procedures_icd] { <col0>[row_id]:[number]... | SELECT t1.startdate FROM ( SELECT admissions.subject_id, `<table13>`.startdate FROM `<table13>` JOIN admissions ON `<table13>`.hadm_id = admissions.hadm_id WHERE `<table13>`.drug = 'docusate sodium' AND admissions.subject_id = 73423 AND DATETIME( `<table13>`.startdate ) >= DATETIME( CURRENT_TIME( ), '-162 month' ) ) AS... | when was patient 73423 prescribed the drug docusate sodium and hydrocortisone na succ. at the same time for the last time since 162 months ago?
|
<table0>[players] { <col0>[INT]:[platform] } <table1>[games] { <col0>[INT]:[player_id] <col1>[INT]:[game_type] } <table2>[vr_games] { <col0>[INT]:[player_id] <col1>[INT]:[last_played] } | SELECT p.platform, COUNT( DISTINCT p.id ) AS `<table0>`, 100.0 * COUNT( DISTINCT v.player_id ) / COUNT( DISTINCT g.player_id ) AS vr_`<table0>`_percentage FROM `<table0>` p LEFT JOIN games g ON p.id = g.player_id LEFT JOIN vr_games v ON p.id = v.player_id GROUP BY p.platform; | What is the number of unique players who have played on each gaming platform, and the percentage of players who have played VR games? |
<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 T1.Code, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code | For those records from the products and each product's manufacturer, return a scatter chart about the correlation between code and code . |
<table0>[table_1015521_2] { <col0>[commonwealth_equivalent]:[VARCHAR] <col1>[us_air_force_equivalent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Major General" | If you're a major general in the US air force then what ranking will you receive in the commonwealth's air force? |
<table0>[financial_capability_programs] { <col0>[program_id]:[INT] <col1>[program_name]:[TEXT] <col2>[duration]:[INT] } <table1>[participants] { <col0>[participant_id]:[INT] <col1>[program_id]:[INT] <col2>[participant_name]:[TEXT] <col3>[INSERT]:[financial_capability_programs] <col4>[program_id]:[program_name] <col5>[... | SELECT `<table0>`.program_name, `<table0>`.duration, COUNT( participants.participant_id ) FROM `<table0>` JOIN participants ON `<table0>`.program_id = participants.program_id GROUP BY `<table0>`.program_id; | List all financial capability programs with their duration and number of participants. |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugst... | SELECT COUNT( * ) > 0 FROM `<table3>` WHERE `<table3>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '010-20205' ) ) AND `<table3>`.cellpath L... | has patient 010-20205 been getting any med ct x2 output? |
<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, `<col0>` FROM `<table0>` ORDER BY `<col11>` | Visualize a bar chart about the distribution of All_Neutral and Team_ID , rank by the bar in asc. |
<table0>[table_1342379_45] { <col0>[first_elected]:[INTEGER] <col1>[incumbent]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Joseph T. Deal" | What was the last year that incumbent joseph t. deal was first elected? |
<table0>[Exhibition1] { <col0>[exhibition_id]:[INT] <col1>[visitor_id]:[INT] <col2>[primary]:[key] <col3>[exhibition_id]:[visitor_id] } <table1>[Visitor] { <col0>[visitor_id]:[INT] <col1>[age]:[INT] <col2>[primary]:[key] <col3>[visitor_id]:[INSERT] } <table2>[DigitalActivity] { <col0>[visitor_id]:[INT] <col1>[primary... | SELECT `<table0>`.exhibition_id, AVG( Visitor.age ) FROM `<table0>` INNER JOIN Visitor ON `<table0>`.visitor_id = Visitor.visitor_id INNER JOIN DigitalActivity ON Visitor.visitor_id = DigitalActivity.visitor_id GROUP BY `<table0>`.exhibition_id; | What is the age distribution of visitors who engaged in digital activities, grouped by exhibition? |
<table0>[table_name_73] { <col0>[homeport__as_of_july_2013]:[VARCHAR] <col1>[laid_down]:[VARCHAR] } | SELECT homeport__as_of_july_2013_ FROM `<table0>` WHERE `<col1>` = "14 december 1985" | What is the Homeport that has a Laid down on 14 december 1985? |
<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 procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.admityear < "2170" AND procedures.icd9_code = "8854" | get me the number of patients with procedure icd9 code 8854 who were admitted before the year 2170. |
<table0>[community_development] { <col0>[INT]:[community_name] <col1>[VARCHAR]:[255] <col2>[region]:[VARCHAR] <col3>[255]:[year] } | SELECT community_name FROM `<table0>` WHERE community_name NOT IN ( SELECT community_name FROM `<table0>` GROUP BY community_name HAVING COUNT( * ) > 1 ); | Display the names of communities that have not participated in any community development initiatives from the "community_development" table |
<table0>[table_10190] { <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 "Venue" FROM `<table0>` WHERE "Away `<col2>` score" = '15.6 ( 96 )' | If the away teams score was 15.6 (96), what venue did they play at?
|
<table0>[Inventory] { <col0>[garment_type]:[VARCHAR] <col1>[color]:[VARCHAR] <col2>[quantity]:[INT] } | SELECT color, SUM( `<col2>` ) AS total_quantity FROM `<table0>` GROUP BY `<col1>` ORDER BY total_quantity DESC LIMIT 3; | Display the top three most common colors in the 'Inventory' table, across all garment types. |
<table0>[train] { <col0>[Train_ID]:[int] <col1>[text]:[Time] <col2>[text]:[Service] } <table1>[station] { <col0>[Station_ID]:[int] <col1>[text]:[Annual_entry_exit] <col2>[real]:[Annual_interchanges] <col3>[real]:[Total_Passengers] <col4>[real]:[Location] <col5>[text]:[Main_Services] <col6>[text]:[Number_of_Platforms] ... | SELECT Name, Total_Passengers FROM `<table1>` WHERE Location <> 'London' ORDER BY Total_Passengers | Show the names and total passengers for all train stations not in London Visualize by bar chart, I want to list in asc by the y-axis please. |
<table0>[Assessment_Notes] { <col0>[notes_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[teacher_id]:[INTEGER] <col3>[date_of_notes]:[DATETIME] <col4>[text_of_notes]:[VARCHAR] <col5>[255]:[other_details] <col6>[VARCHAR]:[255] } <table1>[Ref_Address_Types] { <col0>[address_type_code]:[VARCHAR] <col1>[address_type_de... | SELECT date_address_from, COUNT( `<col2>` ) FROM `<table4>` ORDER BY `<col4>` DESC | Show me about the distribution of date_address_from and the amount of date_address_from bin date_address_from by time in a bar chart. |
<table0>[table_name_33] { <col0>[VARCHAR]:[team] <col1>[VARCHAR]:[points] } | SELECT COUNT( against ) FROM `<table0>` WHERE team = "hespanha" AND points < 30 | How many Against have a Team of hespanha, and Points smaller than 30? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperatu... | SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '022-199074' ) ) AND `<table4>`.drugname ... | enoxaparin 40 mg/0.4 ml syr, prinivil, or famotidine 20 mg po tabs had been ordered for patient 022-199074 since 10/2104?
|
<table0>[Has_amenity] { <col0>[dormid]:[INTEGER] <col1>[amenid]:[INTEGER] } <table1>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } <table2>[Dorm] { <col0>[dormid]:[INTEGER] <col1>[dorm_name]:[VARCHAR] <col2>[student_capacity]:[INTEGER] <col3>[gender]:[VARCHAR] } <table3... | SELECT Sex, COUNT( * ) FROM `<table3>` WHERE `<col3>` > ( SELECT AVG( `<col3>` ) FROM `<table3>` ) GROUP BY `<col4>` | Return a pie on how many students are older than average for each gender?
|
<table0>[table_42947] { <col0>[Federal]:[State] <col1>[text]:[Number] <col2>[Members]:[real] <col3>[total]:[Members] <col4>[text]:[Population] <col5>[census]:[called] <col6>[Censo]:[2010] <col7>[text]:[population] <col8>[Censo]:[2010] <col9>[text]:[Representativeness] <col10>[Inhabitants]:[text] <col11>[Representatives... | SELECT "Federal State" FROM `<table0>` WHERE "Representatives of national average" = '6' | Which federal state has 6 representatives of national average?
|
<table0>[table_41026] { <col0>[Date]:[text] <col1>[Time]:[text] <col2>[Score]:[text] <col3>[Set]:[text] <col4>[Set]:[text] <col5>[Set]:[text] <col6>[Total]:[text] <col7>[Report]:[text] } | SELECT "Report" FROM `<table0>` WHERE "Time" = '12:30' | What is the report in the tournament that started at 12:30?
|
<table0>[properties_inclusive_ny] { <col0>[INT]:[price] <col1>[FLOAT]:[INSERT] } | SELECT AVG( price ) FROM `<table0>` WHERE id IN ( SELECT property_id FROM inclusive_housing WHERE city = 'New York' ); | Calculate the average property price for properties with inclusive housing policies in New York. |
<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>`.admityear < "2114" AND lab.label = "Quantitative G6PD" | provide the number of patients whose admission year is less than 2114 and lab test name is quantitative g6pd?
|
<table0>[LOTS] { <col0>[lot_details]:[VARCHAR] <col1>[investor_id]:[VARCHAR] } <table1>[INVESTORS] { <col0>[investor_id]:[VARCHAR] <col1>[Investor_details]:[VARCHAR] } | SELECT T2.lot_details FROM `<table1>` AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" | Return the lot details of lots that belong to investors with details "l"? |
<table0>[CREATE] { <col0>[SCHEMA]:[rural] } | SELECT COUNT( * ) FROM rural.hospitals; | What is the total number of hospitals in the 'rural' schema? |
<table0>[Part_Faults] { <col0>[part_fault_id]:[INTEGER] <col1>[part_id]:[INTEGER] <col2>[fault_short_name]:[VARCHAR] <col3>[fault_description]:[VARCHAR] <col4>[255]:[other_fault_details] <col5>[VARCHAR]:[255] } <table1>[Maintenance_Engineers] { <col0>[engineer_id]:[INTEGER] <col1>[company_id]:[INTEGER] <col2>[first_na... | SELECT part_name, COUNT( * ) FROM `<table6>` AS T1 JOIN Asset_`<table6>` AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT( * ) | How many assets can each parts be used in? List the part name and the number with a bar chart, and show by the y axis from low to high.
|
<table0>[table_name_35] { <col0>[year]:[VARCHAR] <col1>[runner_up]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jane geddes" | When was the runner-up Jane Geddes? |
<table0>[household_water_consumption] { <col0>[INT]:[state] <col1>[VARCHAR]:[water_consumption] <col2>[FLOAT]:[INSERT] } | SELECT state, MIN( water_consumption ) FROM `<table0>` WHERE state = 'New York'; | What is the minimum water consumption per household in the state of New York? |
<table0>[table_49342] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] } | SELECT "Attendance" FROM `<table0>` WHERE "Opponent" = 'new york giants' | Can you tell me the Attendance that has the Opponent of new york giants?
|
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table2>[Tags] { <col0>[number]:[TagNam... | SELECT TOP( 10 ) AS Reputation, DisplayName, Location FROM `<table10>` WHERE Location LIKE '%Cyprus%' AND Reputation > 0 ORDER BY Reputation DESC | Top 10 users by reputation in Cyprus. |
<table0>[table_name_98] { <col0>[fa_trophy]:[INTEGER] <col1>[player]:[VARCHAR] <col2>[league]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tony hemmings" AND `<col2>` > 15 | What FA trophys have tony hemmings as the player, with a league greater than 15?
|
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[cost] { <col0>[row_i... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table10>`.charttime ) ) FROM `<table10>` WHERE `<table10>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<table13>` WHERE `<table13>`.short_title = 'subarachnoid hemorrhage' ) AND `<table10>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHE... | how many days have elapsed since the last diagnosis of subarachnoid hemorrhage on patient 80555 in this hospital encounter?
|
<table0>[table_204_693] { <col0>[number]:[place] <col1>[text]:[total] <col2>[number]:[men] <col3>[number]:[women] <col4>[number]:[children] <col5>[number]:[elderly] <col6>[number]:[serbs] <col7>[number]:[jews] <col8>[number]:[romani] <col9>[number]:[rusyns] <col10>[number]:[hungarians] <col11>[number]:[russians] } | SELECT ABS( ( SELECT "total" FROM `<table0>` WHERE "place" = 'vilovo' ) - ( SELECT "total" FROM `<table0>` WHERE "place" = 'novi sad' ) ) | what is the difference in total victims between vilovo and novi sad ? |
<table0>[Track] { <col0>[TrackId]:[integer] <col1>[varchar]:[200] <col2>[AlbumId]:[integer] <col3>[MediaTypeId]:[integer] <col4>[GenreId]:[integer] <col5>[Composer]:[varchar] <col6>[220]:[Milliseconds] <col7>[integer]:[Bytes] <col8>[integer]:[UnitPrice] } <table1>[Genre] { <col0>[GenreId]:[integer] <col1>[varchar]:[12... | SELECT T1.Title, T1.`<table8>`Id FROM `<table8>` AS T1 JOIN Track AS T2 ON T1.`<table8>`Id = T2.`<table8>`Id WHERE T2.UnitPrice > 1 | Return a histogram on what are the titles and ids for albums containing tracks with unit price greater than 1?
|
<table0>[table_name_53] { <col0>[artist]:[VARCHAR] <col1>[mintage__proof]:[VARCHAR] <col2>[year]:[VARCHAR] <col3>[issue_price__bu]:[VARCHAR] <col4>[clarification_needed]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE issue_price__bu_[_clarification_needed_] = "n/a" AND `<col2>` > 2004 AND mintage__proof_ = "25,000" | Who is the Artist with an Issue Price (BU) [Clarification Needed] of n/a along with a Year larger than 2004, and Mintage (Proof) of 25,000? |
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Personal history of antineoplastic chemotherapy" AND prescriptions.route = "IV BOLUS" | how many patients on iv bolus route of drug administration have the diagnoses of personal history of antineoplastic chemotherapy?
|
<table0>[table_204_344] { <col0>[number]:[player] <col1>[text]:[games] <col2>[played]:[number] <col3>[field]:[goals] <col4>[number]:[free] <col5>[throws]:[number] <col6>[points]:[number] } | SELECT "player" FROM `<table0>` ORDER BY "free throws" DESC LIMIT 1 | who had the most free throws ?
|
<table0>[table_name_88] { <col0>[mach]:[INTEGER] <col1>[vehicle_flight__number]:[VARCHAR] <col2>[altitude__meters]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "m2-f2 #8" AND altitude__meters_ > 13 OFFSET 716 | What is the Mach with Vehicle Flight # m2-f2 #8 and an Altitude (meters) greater than 13,716? |
<table0>[table_204_886] { <col0>[number]:[rank] <col1>[number]:[swimmer] <col2>[text]:[country] <col3>[text]:[time] <col4>[text]:[note] } | SELECT "swimmer" FROM `<table0>` WHERE "rank" = 1 | what swimmer had the top or first rank ? |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[Creati... | SELECT ParentId AS "post_link", COUNT( Id ) FROM `<table1>` WHERE PostTypeId = 2 AND LENGTH( Body ) <= 200 AND ( Body LIKE '%hank%' ) GROUP BY ParentId HAVING COUNT( Id ) > 1 ORDER BY COUNT( Id ) DESC | Who Answers My Questions Most Effectively? (Tutorial). |
<table0>[table_33169] { <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 "Away `<col2>` score" = '17.16 ( 118 )' | What is the Home team score when the Away team score is 17.16 (118)?
|
<table0>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <col2>[airport_location]:[text] <col3>[state_code]:[varchar] <col4>[country_name]:[varchar] <col5>[time_zone_code]:[varchar] <col6>[minimum_connect_time]:[int] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <tabl... | SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' ... | i want to fly from BOSTON to SAN FRANCISCO
|
<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>`.marital_status = "MARRIED" AND diagnoses.short_title = "DMII hprosmlr uncontrold" | count the number of patients whose marital status is married and diagnoses short title is dmii hprosmlr uncontrold? |
<table0>[brazil_praseodymium] { <col0>[INT]:[year] <col1>[INT]:[units] <col2>[INT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE year = 2018; | How many units of praseodymium were extracted in Brazil in 2018? |
<table0>[SpaceMissions] { <col0>[INT]:[MissionName] <col1>[VARCHAR]:[Duration] <col2>[INT]:[INSERT] } | SELECT MIN( Duration ) FROM SpaceMissions; | What is the minimum duration of a space mission? |
<table0>[table_name_77] { <col0>[week]:[VARCHAR] <col1>[result]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "l 31–28" | What is the Week number with a result of l 31–28? |
<table0>[table_name_70] { <col0>[notes]:[VARCHAR] <col1>[bronze]:[VARCHAR] <col2>[gold]:[VARCHAR] <col3>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "thierry gueorgiou" AND `<col3>` < 2008 AND `<col1>` = "valentin novikov" | What is Notes, when Gold is 'Thierry Gueorgiou', when Year is before 2008, and when Bronze is 'Valentin Novikov'? |
<table0>[table_13884] { <col0>[Athlete]:[text] <col1>[Event]:[text] <col2>[Round]:[text] <col3>[Round]:[text] <col4>[Quarterfinals]:[text] <col5>[Semifinals]:[text] <col6>[Finals]:[text] <col7>[Rank]:[text] } | SELECT "Round of 16" FROM `<table0>` WHERE "Event" = '69kg' | What's the 69kg of Round 16?
|
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <ta... | SELECT `<table4>`.hospitaladmittime FROM `<table4>` WHERE `<table4>`.uniquepid = '022-6959' AND `<table4>`.hospitaladmitsource = 'acute care/floor' AND STRFTIME( '%y', `<table4>`.hospitaladmittime ) = '2105' ORDER BY `<table4>`.hospitaladmittime LIMIT 1 | when did patient 022-6959 come to the hospital via acute care/floor, the first time in 2105?
|
<table0>[table_19612] { <col0>[Hand]:[text] <col1>[credit]:[real] <col2>[credits]:[real] <col3>[credits]:[real] <col4>[credits]:[real] <col5>[credits]:[real] } | SELECT MIN( "2 credits" ) FROM `<table0>` WHERE "Hand" = 'Flush' | Name the least 2 credits for flush
|
<table0>[table_name_55] { <col0>[total]:[VARCHAR] <col1>[set_3]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "13–25" | What was the total with a score in set 3 of 13–25? |
<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>` WHERE `<table1>`.gender = "F" AND `<table1>`.days_stay > "16" | provide the number of patients whose gender is f and days of hospital stay is greater than 16?
|
<table0>[table_203_763] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT "notes" FROM `<table0>` ORDER BY "notes" DESC LIMIT 1 | what is the higher number of meters listed in the notes section of the table ? |
<table0>[table_name_30] { <col0>[score]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "halifax town" | What is the Score of the Halifax Town Home game? |
<table0>[table_name_25] { <col0>[to_par]:[VARCHAR] <col1>[score]:[VARCHAR] <col2>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 66 AND `<col2>` = "brad faxon" | What is To Par, when Score is '66', and when Player is 'Brad Faxon'?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "MORP0.5-4" | count the number of patients whose drug code is morp0.5-4?
|
<table0>[table_46090] { <col0>[Country]:[text] <col1>[Population]:[July] <col2>[2005]:[est] <col3>[real]:[Land] <col4>[Area]:[u00b2] <col5>[real]:[arable] <col6>[land]:[2005] <col7>[est]:[text] <col8>[Arable]:[Land] <col9>[u00b2]:[real] <col10>[Population]:[Density] <col11>[pop]:[u00b2] } | SELECT COUNT( "Population ( July `<col2>` est. )" ) FROM `<table0>` WHERE "Arable Land ( km\u00b2 )" < '16,280' AND "Land `<col4>` ( km\u00b2 )" < '240' AND "Country" = 'american samoa ( us )' AND "Population Density ( `<col11>` per km\u00b2 )" > '291' | What is the total population of American Samoa (US) that has less than 16,280 km arable land, less than 240 km land area, and has a population density of more than 291?
|
<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>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]... | SELECT COUNT( * ) FROM `<table8>` WHERE `<table8>`.icustay_id IN ( SELECT `<table4>`.icustay_id FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.subject_id = 20165 ) ) AND `<table8>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>`.label = ... | let's count the number of times patient 20165 has had a other blood products intake until 07/2102. |
<table0>[EsportsEvents] { <col0>[EventID]:[INT] <col1>[EventName]:[TEXT] <col2>[EventType]:[TEXT] <col3>[EventDate]:[DATE] } | SELECT COUNT( DISTINCT `<col0>` ), `<col2>` FROM `<table0>` WHERE `<col3>` >= DATEADD( month, -12, GETDATE( ) ) AND `<col2>` != 'Exhibition' GROUP BY EventType; | Identify the number of unique esports events and their types in the last 12 months, excluding 'Exhibition' events. |
<table0>[sensor_deployment] { <col0>[INT]:[sensor_type] <col1>[VARCHAR]:[255] <col2>[year]:[INT] <col3>[quantity]:[INT] } | SELECT sensor_type, year, SUM( `<col3>` ) as total_quantity FROM `<table0>` GROUP BY sensor_type, year; | List the number of IoT sensors of each type that were installed in each year in the 'sensor_deployment' table. |
<table0>[Products] { <col0>[ProductID]:[INT] <col1>[ProductName]:[TEXT] <col2>[Price]:[DECIMAL] <col3>[EthicalSource]:[BOOLEAN] <col4>[Vegan]:[BOOLEAN] <col5>[VendorID]:[INT] } <table1>[Vendors] { <col0>[VendorID]:[INT] <col1>[VendorName]:[TEXT] <col2>[Country]:[TEXT] <col3>[INSERT]:[Products] <col4>[VALUES]:[Shirt] <... | SELECT AVG( `<col2>` ) FROM `<table0>` p WHERE p.EthicalSource = true AND p.Vegan = true; | Display the average price of products that are ethically sourced and vegan. |
<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 `<table3>`.admission_type, `<table3>`.diagnosis FROM `<table3>` WHERE `<table3>`.name = "Dawn Cooper" | what is the name of the disease that dawn cooper is primarily suffering from? also find his admission type.
|
<table0>[table_name_98] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11/17/1979" | Can you tell me the Score that has the Date of 11/17/1979?
|
<table0>[table_79583] { <col0>[Club]:[text] <col1>[Wins]:[real] <col2>[Losses]:[real] <col3>[Draws]:[real] } | SELECT AVG( "Draws" ) FROM `<table0>` WHERE "Losses" > '8' AND "Against" < '1344' | What is the average number of draws for losses over 8 and Against values under 1344?
|
<table0>[approval_dates] { <col0>[drug_name]:[TEXT] <col1>[approval_date]:[DATE] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` >= '2020-01-01'; | Which drugs were approved in 2020 or later according to the 'approval_dates' table? |
<table0>[table_9159] { <col0>[Rank]:[real] <col1>[Gold]:[real] <col2>[Silver]:[real] <col3>[Bronze]:[real] <col4>[Total]:[real] } | SELECT MAX( "Rank" ) FROM `<table0>` WHERE "Gold" = '0' AND "Bronze" < '4' AND "Total" = '2' AND "Silver" > '1' | What is the maximum rank when there is 0 gold, and the bronze is less than 4, and the silver is greater than 1, and 2 as the total?
|
<table0>[Auto] { <col0>[policyholder_id]:[INT] <col1>[car_make]:[VARCHAR] <col2>[car_model]:[VARCHAR] } | UPDATE Auto SET car_make = 'GM' WHERE policyholder_id IN ( 300, 301, 302 ); | Update car make to 'GM' for policyholders with policyholder_id 300, 301, and 302 in the 'Auto' table. |
<table0>[table_name_62] { <col0>[points]:[INTEGER] <col1>[draw]:[VARCHAR] <col2>[rank]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 6 AND `<col2>` > 10 | What is the lowest points with 6 draws and lower than rank 10?
|
<table0>[table_24997] { <col0>[Province]:[Community] <col1>[text]:[Contestant] <col2>[text]:[Age] <col3>[real]:[Height] <col4>[text]:[Hometown] <col5>[text]:[Geographical] <col6>[Regions]:[text] } | SELECT COUNT( "Hometown" ) FROM `<table0>` WHERE "Height" = '1.80' | How many different cities are represented by contestants whose height stands at 1.80?
|
<table0>[characters] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[hero]:[text] <col3>[villian]:[text] <col4>[song]:[text] } <table1>[director] { <col0>[name]:[text] } <table2>[movies_total_gross] { <col0>[movie_title]:[text] <col1>[release_date]:[text] <col2>[genre]:[text] <col3>[MPAA_rating]:[text... | SELECT movie FROM `voice-actors` WHERE 'voice-actor' = 'Jeff Bennett' | List the movie titles with the voice actor Jeff Bennet |
<table0>[company] { <col0>[INT]:[name] <col1>[VARCHAR]:[industry] <col2>[VARCHAR]:[location] <col3>[VARCHAR]:[INSERT] } <table1>[patent] { <col0>[INT]:[title] <col1>[VARCHAR]:[100] <col2>[company_id]:[INT] <col3>[filing_date]:[DATE] } | SELECT c.name FROM `<table0>` c JOIN patent p ON c.id = p.`<table0>`_id GROUP BY c.name HAVING COUNT( p.id ) >= 2 | Which genetic research companies have at least two patents? |
<table0>[Policy] { <col0>[PolicyID]:[INT] <col1>[PolicyholderID]:[INT] <col2>[Product]:[VARCHAR] } | DELETE FROM `<table0>` WHERE `<col2>` NOT IN ( 'Auto', 'Home' ); | Delete policy types that are no longer offered. |
<table0>[table_test_20] { <col0>[int]:[ejection_fraction_ef] <col1>[int]:[anemia] <col2>[bool]:[gender] <col3>[string]:[bleeding] <col4>[int]:[systolic_blood_pressure_sbp] <col5>[int]:[left_main_coronary_artery_stenosis] <col6>[int]:[hemoglobin_a1c_hba1c] <col7>[float]:[renal_disease] <col8>[bool]:[creatinine_clearance... | SELECT * FROM `<table0>` WHERE anemia = 1 OR hemoglobin_a1c_hba1c < 8.5 | anemia ( hemoglobin < 8.5 mg / dl ) |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT `<table2>`.admittime FROM `<table2>` WHERE `<table2>`.subject_id = "17787" | for id 17787, specify the time of admission
|
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } | SELECT Price, `<col3>` FROM `<table0>` WHERE `<col2>` BETWEEN 60 AND 120 GROUP BY Name | For those products with a price between 60 and 120, return a scatter chart about the correlation between price and manufacturer , and group by attribute name.
|
<table0>[table_name_30] { <col0>[season]:[VARCHAR] <col1>[wins]:[VARCHAR] <col2>[final_placing]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 0 AND `<col2>` = "1st" | What is the total number of seasons with more than 0 wins and a 1st final placing? |
<table0>[table_14219514_2] { <col0>[home__2nd_leg]:[VARCHAR] } | SELECT 2 AS nd_leg FROM `<table0>` WHERE home__2nd_leg_ = "Platense" | When platense is the home (2nd leg) what is the 2nd leg? |
<table0>[table_1176371_1] { <col0>[t20_matches]:[INTEGER] <col1>[name_of_ground]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Green Lane" | What is the maximum t20 on green lane?
|
<table0>[table_name_15] { <col0>[format]:[VARCHAR] <col1>[label]:[VARCHAR] <col2>[catalog]:[VARCHAR] <col3>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "3645" AND `<col3>` > 1981 AND `<col1>` = "luaka bop" | What is the format for the album under the label, luaka bop, that had a catalog number of 3645 and dated after 1981? |
<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 procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.short_title = "Cont inv mec ven <96 hrs" | count the number of clinic referred patients who had premature hospital admission with continuous invasive mechanical ventilation for less than 96 consecutive hours.
|
<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>[lab] {... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "9907" | count the number of patients whose procedure icd9 code is 9907? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.