schema
stringlengths 20
14.6k
| query
stringlengths 17
2.58k
| question
stringlengths 8
1.06k
|
---|---|---|
<table0>[table_name_13] { <col0>[result]:[VARCHAR] <col1>[location]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "london 2012 women's olympic football tournament" | What is the result of the London 2012 Women's Olympic Football Tournament? |
<table0>[Air] { <col0>[Carriers]:[Code] <col1>[integer]:[Description] } <table1>[Airports] { <col0>[Code]:[text] <col1>[Description]:[text] } <table2>[Airlines] { <col0>[FL_DATE]:[text] <col1>[OP_CARRIER_AIRLINE_ID]:[integer] <col2>[TAIL_NUM]:[text] <col3>[OP_CARRIER_FL_NUM]:[integer] <col4>[ORIGIN_AIRPORT_ID]:[integer] <col5>[ORIGIN_AIRPORT_SEQ_ID]:[integer] <col6>[ORIGIN_CITY_MARKET_ID]:[integer] <col7>[ORIGIN]:[text] <col8>[DEST_AIRPORT_ID]:[integer] <col9>[DEST_AIRPORT_SEQ_ID]:[integer] <col10>[DEST_CITY_MARKET_ID]:[integer] <col11>[DEST]:[text] <col12>[CRS_DEP_TIME]:[integer] <col13>[DEP_TIME]:[integer] <col14>[DEP_DELAY]:[integer] <col15>[DEP_DELAY_NEW]:[integer] <col16>[ARR_TIME]:[integer] <col17>[ARR_DELAY]:[integer] <col18>[ARR_DELAY_NEW]:[integer] <col19>[CANCELLED]:[integer] <col20>[CANCELLATION_CODE]:[text] <col21>[CRS_ELAPSED_TIME]:[integer] <col22>[ACTUAL_ELAPSED_TIME]:[integer] <col23>[CARRIER_DELAY]:[integer] <col24>[WEATHER_DELAY]:[integer] <col25>[NAS_DELAY]:[integer] <col26>[SECURITY_DELAY]:[integer] <col27>[LATE_AIRCRAFT_DELAY]:[integer] } | SELECT COUNT( * ) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%JetBlue Airways: B6%' AND T2.ARR_DELAY_NEW = 0 | How many flights of air carrier called JetBlue Airways: B6 have 0 new arrival delay? |
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Age] <col2>[real]:[Height] <col3>[real]:[Hometown] } <table1>[gymnast] { <col0>[Gymnast_ID]:[int] <col1>[Floor_Exercise_Points]:[real] <col2>[Pommel_Horse_Points]:[real] <col3>[Rings_Points]:[real] <col4>[Vault_Points]:[real] <col5>[Parallel_Bars_Points]:[real] <col6>[Horizontal_Bar_Points]:[real] <col7>[Total_Points]:[real] } | SELECT Hometown, COUNT( * ) FROM `<table1>` AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT( * ) | What are the hometowns of gymnasts and the corresponding number of gymnasts, and rank y-axis in ascending order. |
<table0>[table_name_35] { <col0>[record]:[VARCHAR] <col1>[time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "8:17" | What was the record after the fight that lasted 8:17? |
<table0>[attractions] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[wheelchair_accessibility] <col3>[FLOAT]:[INSERT] } | SELECT country, MIN( wheelchair_accessibility ) FROM `<table0>` GROUP BY country ORDER BY MIN( wheelchair_accessibility ) LIMIT 1; | Which country has the least wheelchair accessible tourist attractions? |
<table0>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table3>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table4>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table5>[PostTypes] { <col0>[number]:[text] } <table6>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table7>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table8>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table9>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table10>[VoteTypes] { <col0>[number]:[text] } <table11>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table12>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table13>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table14>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table15>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table16>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table17>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table18>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table19>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table20>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table21>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table22>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table23>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table24>[PostHistoryTypes] { <col0>[number]:[text] } <table25>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table26>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table27>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table28>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } | SELECT 1 AS No, 'Questions' AS "column", COUNT( Id ) AS Total, AVG( CAST( Score AS FLOAT ) ) AS "average_score", STDEV( Score ) AS "score_std_deviation" FROM `<table0>` AS Q WHERE Q.ParentId IS NULL AND Q.CreationDate > DATEADD( m, -1, GETDATE( ) ) UNION SELECT 2 AS No, 'Answers' AS "column", COUNT( Id ) AS Total, AVG( CAST( Score AS FLOAT ) ) AS Average, STDEV( Score ) AS Deviation FROM `<table0>` AS A WHERE NOT A.ParentId IS NULL AND A.CreationDate > DATEADD( m, -1, GETDATE( ) ) | Average scores of last month's questions and answers. |
<table0>[ethereum_smart_contracts] { <col0>[INT]:[gas_fees] <col1>[DECIMAL]:[deFi_involvement] <col2>[BOOLEAN]:[INSERT] } | SELECT MAX( gas_fees ) FROM `<table0>` WHERE deFi_involvement = TRUE; | What is the maximum gas fee for Ethereum smart contracts involved in DeFi? |
<table0>[table_name_71] { <col0>[airport]:[VARCHAR] <col1>[city]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "macau" | Which airport is associated with Macau? |
<table0>[table_name_95] { <col0>[surface]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "july 5, 2009" | What is the surface of the match on July 5, 2009?
|
<table0>[table_name_63] { <col0>[attendance]:[INTEGER] <col1>[game_site]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "tulane stadium" | What was the highest attendance at a game that was played in tulane stadium?
|
<table0>[hospitals] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[INSERT] } | SELECT AVG( Distance ) FROM ( SELECT patient_address AS Address, MIN( h.location ) AS Distance FROM patients GROUP BY patient_address ) AS patient_distance JOIN hospitals h ON patient_distance.Distance = STRDISTANCE( patient_distance.Address, h.location ) WHERE h.location LIKE '%Yolo%'; | What is the average distance to the nearest hospital for residents in rural county 'Yolo'? |
<table0>[election] { <col0>[Election_ID]:[int] <col1>[Counties_Represented]:[text] <col2>[District]:[int] <col3>[Delegate]:[text] <col4>[Party]:[int] <col5>[First_Elected]:[real] <col6>[Committee]:[text] } <table1>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:[text] } <table2>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[text] <col7>[US_Senate]:[text] } | SELECT Committee, COUNT( `<col6>` ) FROM `<table0>` GROUP BY `<col6>` ORDER BY `<col6>` | How many delegates in each committee? Return a bar chart, list by the X in asc please. |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[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_ID]:[decimal] } <table3>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table4>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table5>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table6>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } | SELECT HIRE_DATE, `<col10>` FROM `<table2>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table6>` ) | For those employees who did not have any job in the past, return a line chart about the change of department_id over hire_date . |
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_ID]:[decimal] } <table2>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table3>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table4>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table5>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table6>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } | SELECT LAST_NAME, `<col9>` FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col9>` DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of last_name and manager_id , and display MANAGER_ID in descending order. |
<table0>[lapTimes] { <col0>[raceId]:[INTEGER] <col1>[driverId]:[INTEGER] <col2>[lap]:[INTEGER] <col3>[position]:[INTEGER] <col4>[time]:[TEXT] <col5>[milliseconds]:[INTEGER] } <table1>[results] { <col0>[resultId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[driverId]:[INTEGER] <col3>[constructorId]:[INTEGER] <col4>[number]:[INTEGER] <col5>[grid]:[INTEGER] <col6>[position]:[TEXT] <col7>[positionText]:[TEXT] <col8>[positionOrder]:[INTEGER] <col9>[points]:[REAL] <col10>[laps]:[TEXT] <col11>[time]:[TEXT] <col12>[milliseconds]:[TEXT] <col13>[fastestLap]:[TEXT] <col14>[rank]:[TEXT] <col15>[fastestLapTime]:[TEXT] <col16>[fastestLapSpeed]:[TEXT] <col17>[statusId]:[INTEGER] } <table2>[qualifying] { <col0>[qualifyId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[driverId]:[INTEGER] <col3>[constructorId]:[INTEGER] <col4>[number]:[INTEGER] <col5>[position]:[INTEGER] <col6>[TEXT]:[TEXT] } <table3>[constructorResults] { <col0>[constructorResultsId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[constructorId]:[INTEGER] <col3>[points]:[REAL] <col4>[status]:[TEXT] } <table4>[drivers] { <col0>[driverId]:[INTEGER] <col1>[driverRef]:[TEXT] <col2>[number]:[TEXT] <col3>[code]:[TEXT] <col4>[forename]:[TEXT] <col5>[surname]:[TEXT] <col6>[dob]:[TEXT] <col7>[nationality]:[TEXT] <col8>[url]:[TEXT] } <table5>[pitStops] { <col0>[raceId]:[INTEGER] <col1>[driverId]:[INTEGER] <col2>[stop]:[INTEGER] <col3>[lap]:[INTEGER] <col4>[time]:[TEXT] <col5>[duration]:[TEXT] <col6>[milliseconds]:[INTEGER] } <table6>[constructors] { <col0>[constructorId]:[INTEGER] <col1>[constructorRef]:[TEXT] <col2>[name]:[TEXT] <col3>[nationality]:[TEXT] <col4>[url]:[TEXT] } <table7>[status] { <col0>[statusId]:[INTEGER] } <table8>[seasons] { <col0>[year]:[INTEGER] <col1>[url]:[TEXT] } <table9>[races] { <col0>[raceId]:[INTEGER] <col1>[year]:[INTEGER] <col2>[round]:[INTEGER] <col3>[circuitId]:[INTEGER] <col4>[name]:[TEXT] <col5>[date]:[TEXT] <col6>[time]:[TEXT] <col7>[url]:[TEXT] } <table10>[constructorStandings] { <col0>[constructorStandingsId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[constructorId]:[INTEGER] <col3>[points]:[REAL] <col4>[position]:[INTEGER] <col5>[positionText]:[TEXT] <col6>[wins]:[INTEGER] } <table11>[circuits] { <col0>[circuitId]:[INTEGER] <col1>[circuitRef]:[TEXT] <col2>[name]:[TEXT] <col3>[location]:[TEXT] <col4>[country]:[TEXT] <col5>[lat]:[REAL] <col6>[lng]:[REAL] <col7>[alt]:[TEXT] <col8>[url]:[TEXT] } <table12>[driverStandings] { <col0>[driverStandingsId]:[INTEGER] <col1>[raceId]:[INTEGER] <col2>[driverId]:[INTEGER] <col3>[points]:[REAL] <col4>[position]:[INTEGER] <col5>[positionText]:[TEXT] <col6>[wins]:[INTEGER] } | SELECT name, COUNT( `<col2>` ) FROM `<table6>` AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY `<col2>` ORDER BY `<col2>` DESC | What are the names of all the Japanese constructors that have earned more than 5 points, and count them by a bar chart, and order by the names in descending please. |
<table0>[table_39767] { <col0>[Season]:[text] <col1>[1st]:[Place] <col2>[text]:[2nd] <col3>[Place]:[text] <col4>[3rd]:[Place] <col5>[text]:[4th] <col6>[Place]:[text] } | SELECT "Season" FROM `<table0>` WHERE "3rd Place" = 'cska moscow' AND "1st Place" = 'panathinaikos' | Which season had a 3rd place of CSKA Moscow and 1st place of Panathinaikos? |
<table0>[table_204_913] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] } | SELECT "venue" FROM `<table0>` WHERE "date" > ( SELECT "date" FROM `<table0>` WHERE "venue" = 'colombo, sri lanka' ) ORDER BY "date" LIMIT 1 | what was the next venue after colombo , sri lanka on march 28 ?
|
<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>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table3>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table4>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table5>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table6>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table7>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table8>[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] } <table9>[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] } <table10>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table11>[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] } <table12>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table13>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table14>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table15>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table16>[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] } | SELECT `<table9>`.charttime FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 15119 ) AND `<table9>`.itemid IN ( SELECT `<table1>`.itemid FROM `<table1>` WHERE `<table1>`.label = 'po2' ) AND STRFTIME( '%y-%m', `<table9>`.charttime ) = '2105-03' ORDER BY `<table9>`.valuenum, `<table9>`.charttime LIMIT 1 | when was the first time that patient 15119 had a minimum po2 in 03/2105? |
<table0>[table_name_34] { <col0>[location]:[VARCHAR] <col1>[method]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "tko" | Where was the method of tko? |
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table3>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table4>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table5>[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_ID]:[decimal] } <table6>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table5>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table3>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY AVG( `<col9>` ) DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by weekday, and show in descending by the y axis. |
<table0>[station] { <col0>[integer]:[name] <col1>[text]:[lat] <col2>[real]:[long] <col3>[real]:[dock_count] <col4>[integer]:[city] <col5>[text]:[installation_date] } <table1>[status] { <col0>[station_id]:[integer] <col1>[bikes_available]:[integer] <col2>[docks_available]:[integer] <col3>[time]:[text] } <table2>[trip] { <col0>[integer]:[duration] <col1>[integer]:[start_date] <col2>[text]:[start_station_name] <col3>[text]:[start_station_id] <col4>[integer]:[end_date] <col5>[text]:[end_station_name] <col6>[text]:[end_station_id] <col7>[integer]:[bike_id] <col8>[integer]:[subscription_type] <col9>[text]:[zip_code] } <table3>[weather] { <col0>[date]:[text] <col1>[max_temperature_f]:[integer] <col2>[mean_temperature_f]:[integer] <col3>[min_temperature_f]:[integer] <col4>[max_dew_point_f]:[integer] <col5>[mean_dew_point_f]:[integer] <col6>[min_dew_point_f]:[integer] <col7>[max_humidity]:[integer] <col8>[mean_humidity]:[integer] <col9>[min_humidity]:[integer] <col10>[max_sea_level_pressure_inches]:[real] <col11>[mean_sea_level_pressure_inches]:[real] <col12>[min_sea_level_pressure_inches]:[real] <col13>[max_visibility_miles]:[integer] <col14>[mean_visibility_miles]:[integer] <col15>[min_visibility_miles]:[integer] <col16>[max_wind_Speed_mph]:[integer] <col17>[mean_wind_speed_mph]:[integer] <col18>[max_gust_speed_mph]:[integer] <col19>[precipitation_inches]:[text] <col20>[cloud_cover]:[integer] <col21>[events]:[text] <col22>[wind_dir_degrees]:[integer] <col23>[zip_code]:[text] } | SELECT COUNT( installation_date ) FROM `<table0>` WHERE city = 'San Jose' AND ( SUBSTR( CAST( installation_date AS TEXT ), 1, INSTR( installation_date, '/' ) - 1 ) IN ( '8', '9', '10', '11', '12' ) AND SUBSTR( CAST( installation_date AS TEXT ), -4 ) = '2013' ) OR SUBSTR( CAST( installation_date AS TEXT ), -4 ) > '2013' | How many bike stations are installed after August, 2013 in San Jose? |
<table0>[lists] { <col0>[user_id]:[integer] <col1>[list_id]:[integer] <col2>[list_title]:[text] <col3>[list_movie_number]:[integer] <col4>[list_update_timestamp_utc]:[text] <col5>[list_creation_timestamp_utc]:[text] <col6>[list_followers]:[integer] <col7>[list_url]:[text] <col8>[list_comments]:[integer] <col9>[list_description]:[text] <col10>[list_cover_image_url]:[text] <col11>[list_first_image_url]:[text] <col12>[list_second_image_url]:[text] <col13>[list_third_image_url]:[text] } <table1>[movies] { <col0>[movie_id]:[integer] <col1>[movie_title]:[text] <col2>[movie_release_year]:[integer] <col3>[movie_url]:[text] <col4>[movie_title_language]:[text] <col5>[movie_popularity]:[integer] <col6>[movie_image_url]:[text] <col7>[director_id]:[text] <col8>[director_name]:[text] <col9>[director_url]:[text] } <table2>[ratings_users] { <col0>[user_id]:[integer] <col1>[rating_date_utc]:[text] <col2>[user_trialist]:[integer] <col3>[user_subscriber]:[integer] <col4>[user_avatar_image_url]:[text] <col5>[user_cover_image_url]:[text] <col6>[user_eligible_for_trial]:[integer] <col7>[user_has_payment_method]:[integer] } <table3>[lists_users] { <col0>[user_id]:[integer] <col1>[list_id]:[integer] <col2>[list_update_date_utc]:[text] <col3>[list_creation_date_utc]:[text] <col4>[user_trialist]:[integer] <col5>[user_subscriber]:[integer] <col6>[user_avatar_image_url]:[text] <col7>[user_cover_image_url]:[text] <col8>[user_eligible_for_trial]:[text] <col9>[user_has_payment_method]:[text] } <table4>[ratings] { <col0>[movie_id]:[integer] <col1>[rating_id]:[integer] <col2>[rating_url]:[text] <col3>[rating_score]:[integer] <col4>[rating_timestamp_utc]:[text] <col5>[critic]:[text] <col6>[critic_likes]:[integer] <col7>[critic_comments]:[integer] <col8>[user_id]:[integer] <col9>[user_trialist]:[integer] <col10>[user_subscriber]:[integer] <col11>[user_eligible_for_trial]:[integer] <col12>[user_has_payment_method]:[integer] } | SELECT COUNT( `<col0>` ) FROM `<table1>` WHERE `<col2>` BETWEEN '1970' AND '1980' AND `<col5>` > 11000 | Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released? |
<table0>[products] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[material]:[VARCHAR] <col3>[255]:[price] <col4>[DECIMAL]:[INSERT] } | SELECT AVG( price ) FROM `<table0>` WHERE `<col2>` = 'Hemp'; | What is the average price of hemp products? |
<table0>[articles] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[title] <col2>[TEXT]:[category] <col3>[TEXT]:[publication_date] <col4>[DATE]:[word_count] <col5>[INT]:[author_id] } | SELECT publication_date, COUNT( * ) AS `<table0>`_per_day FROM `<table0>` WHERE category = 'opinion' GROUP BY publication_date ORDER BY publication_date; | What is the total number of articles published per day in the "articles" table for the 'opinion' category? |
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table2>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table3>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table4>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table5>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table6>[VoteTypes] { <col0>[number]:[text] } <table7>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table8>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table9>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table10>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table11>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table12>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table13>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table14>[PostTypes] { <col0>[number]:[text] } <table15>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table16>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table17>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table18>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table19>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table20>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table21>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table22>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table23>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table24>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table25>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table26>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table27>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table28>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } | SELECT CASE WHEN PostTypeId = 1 THEN 'Question' ELSE 'Answer' END AS "post_type", COUNT( * ) AS Amount, SUM( CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END ) AS Up`<table17>`, SUM( CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END ) AS Down`<table17>`, CASE WHEN SUM( CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END ) = 0 THEN NULL ELSE ( CAST( SUM( CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END ) AS FLOAT ) / CAST( SUM( CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END ) AS FLOAT ) ) END AS UpVoteDownVoteRatio FROM `<table17>` AS v JOIN Posts AS p ON v.PostId = p.Id WHERE PostTypeId IN ( 1, 2 ) AND VoteTypeId IN ( 2, 3 ) AND p.CreationDate > CURRENT_TIMESTAMP( ) - 365 GROUP BY PostTypeId | Up vs Down votes by Question or Answer. |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[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>[observationtime]:[time] } <table2>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table3>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table4>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table5>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table6>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table7>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table8>[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>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table9>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table6>`.`<table6>`time FROM `<table6>` JOIN patient ON `<table6>`.patientunitstayid = patient.patientunitstayid WHERE `<table6>`.`<table6>`name = 'cardiac arrest - initial rhythm: ventricular fibrillation' AND DATETIME( `<table6>`.`<table6>`time ) >= DATETIME( CURRENT_TIME( ), '-6 year' ) ) AS t1 JOIN ( SELECT patient.uniquepid, `<table3>`.drugname, `<table3>`.drugstarttime FROM `<table3>` JOIN patient ON `<table3>`.patientunitstayid = patient.patientunitstayid WHERE patient.age BETWEEN 20 AND 29 AND DATETIME( `<table3>`.drugstarttime ) >= DATETIME( CURRENT_TIME( ), '-6 year' ) ) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.`<table6>`time < t2.drugstarttime AND DATETIME( t2.drugstarttime ) BETWEEN DATETIME( t1.`<table6>`time ) AND DATETIME( t1.`<table6>`time, '+2 month' ) GROUP BY t2.drugname ) AS t3 WHERE t3.c1 <= 3 | what are the three most common drugs that were prescribed to the patients 20s after being diagnosed with cardiac arrest - initial rhythm: ventricular fibrillation since 6 years ago within 2 months? |
<table0>[people] { <col0>[People_ID]:[int] <col1>[District]:[text] <col2>[text]:[Party] <col3>[text]:[Age] } <table1>[debate] { <col0>[Debate_ID]:[int] <col1>[Date]:[text] <col2>[Venue]:[text] <col3>[Num_of_Audience]:[int] } <table2>[debate_people] { <col0>[Debate_ID]:[int] <col1>[Affirmative]:[int] <col2>[Negative]:[int] <col3>[If_Affirmative_Win]:[bool] } | SELECT Name, COUNT( * ) FROM `<table2>` AS T1 JOIN people AS T2 ON T1.Affirmative = T2.People_ID GROUP BY T2.Name | Show the names of people and the number of times they have been on the affirmative side of debates by a bar chart. |
<table0>[PRODUCTS] { <col0>[Product_Name]:[VARCHAR] <col1>[Product_Price]:[INTEGER] } | SELECT Product_Name, AVG( `<col1>` ) FROM `<table0>` GROUP BY `<col0>` | What are the different product names? What is the average product price for each of them? |
<table0>[EXISTS] { <col0>[athletes]:[INT] <col1>[name]:[VARCHAR] <col2>[team]:[VARCHAR] <col3>[league]:[VARCHAR] } <table1>[EXISTS] { <col0>[sessions]:[INT] <col1>[athlete_id]:[INT] <col2>[type]:[VARCHAR] <col3>[duration]:[INT] <col4>[date]:[DATE] } | SELECT SUM( duration ) FROM sessions JOIN athletes ON sessions.athlete_id = athletes.id WHERE athletes.league = 'NFL' AND sessions.type IN ( 'Strength', 'Conditioning' ) AND sessions.date >= DATE_SUB( CURRENT_DATE, INTERVAL 1 MONTH ); | What is the total number of hours of strength and conditioning sessions for all athletes in the NFL in the last month? |
<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>[label]:[text] <col7>[fluid]:[text] } <table2>[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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table3>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[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] } | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.ethnicity = "UNKNOWN/NOT SPECIFIED" AND diagnoses.long_title = "Coronary atherosclerosis of native coronary artery" | For how many patients with coronary atherosclerosis of native coronary artery was the ethnic origin unknown/unspecified?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table2>[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_ID]:[decimal] } <table3>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table4>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table5>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table6>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } | SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table2>` ORDER BY SUM( `<col7>` ) DESC | Compare the total salary by each hire date (bin it into the day of week interval) of employees using a bar chart, I want to show by the y-axis in descending please.
|
<table0>[Performers_in_Bookings] { <col0>[Order_ID]:[INTEGER] <col1>[Performer_ID]:[INTEGER] } <table1>[Bookings_Services] { <col0>[Order_ID]:[INTEGER] <col1>[Product_ID]:[INTEGER] } <table2>[Invoices] { <col0>[Invoice_ID]:[INTEGER] <col1>[Order_ID]:[INTEGER] <col2>[payment_method_code]:[CHAR] <col3>[Product_ID]:[INTEGER] <col4>[Order_Quantity]:[VARCHAR] <col5>[288]:[Other_Item_Details] <col6>[VARCHAR]:[255] <col7>[Order_Item_ID]:[INTEGER] } <table3>[Invoice_Items] { <col0>[Invoice_Item_ID]:[INTEGER] <col1>[Invoice_ID]:[INTEGER] <col2>[Order_ID]:[INTEGER] <col3>[Order_Item_ID]:[INTEGER] <col4>[Product_ID]:[INTEGER] <col5>[Order_Quantity]:[INTEGER] <col6>[Other_Item_Details]:[VARCHAR] } <table4>[Customers] { <col0>[Customer_ID]:[VARCHAR] <col1>[100]:[Address_ID] <col2>[INTEGER]:[Customer_Name] <col3>[VARCHAR]:[255] <col4>[Customer_Phone]:[VARCHAR] <col5>[255]:[Customer_Email_Address] <col6>[VARCHAR]:[255] <col7>[Other_Details]:[VARCHAR] } <table5>[Products] { <col0>[Product_ID]:[VARCHAR] <col1>[100]:[Product_Name] <col2>[VARCHAR]:[255] <col3>[Product_Price]:[DECIMAL] <col4>[Product_Description]:[VARCHAR] <col5>[255]:[Other_Product_Service_Details] <col6>[VARCHAR]:[255] } <table6>[Customer_Orders] { <col0>[Order_ID]:[INTEGER] <col1>[Customer_ID]:[INTEGER] <col2>[Store_ID]:[INTEGER] <col3>[Order_Date]:[DATETIME] <col4>[Planned_Delivery_Date]:[DATETIME] <col5>[Actual_Delivery_Date]:[DATETIME] <col6>[Other_Order_Details]:[VARCHAR] } <table7>[Marketing_Regions] { <col0>[Marketing_Region_Code]:[CHAR] <col1>[Marketing_Region_Name]:[VARCHAR] <col2>[255]:[Marketing_Region_Descriptrion] <col3>[VARCHAR]:[255] <col4>[Other_Details]:[VARCHAR] } <table8>[Ref_Payment_Methods] { <col0>[payment_method_code]:[CHAR] <col1>[payment_method_description]:[VARCHAR] } <table9>[Clients] { <col0>[Client_ID]:[INTEGER] <col1>[Address_ID]:[INTEGER] <col2>[Customer_Email_Address]:[VARCHAR] <col3>[255]:[Customer_Name] <col4>[VARCHAR]:[255] <col5>[Customer_Phone]:[VARCHAR] <col6>[255]:[Other_Details] <col7>[VARCHAR]:[255] } <table10>[Services] { <col0>[Service_ID]:[INTEGER] <col1>[Service_Type_Code]:[CHAR] <col2>[Workshop_Group_ID]:[INTEGER] <col3>[Product_Description]:[VARCHAR] <col4>[255]:[Product_Name] <col5>[VARCHAR]:[255] <col6>[Product_Price]:[DECIMAL] <col7>[Other_Product_Service_Details]:[VARCHAR] } <table11>[Addresses] { <col0>[Address_ID]:[VARCHAR] <col1>[100]:[Line_1] <col2>[VARCHAR]:[255] <col3>[Line_2]:[VARCHAR] <col4>[255]:[City_Town] <col5>[VARCHAR]:[255] <col6>[State_County]:[VARCHAR] <col7>[255]:[Other_Details] <col8>[VARCHAR]:[255] } <table12>[Performers] { <col0>[Performer_ID]:[INTEGER] <col1>[Address_ID]:[INTEGER] <col2>[Customer_Name]:[VARCHAR] <col3>[255]:[Customer_Phone] <col4>[VARCHAR]:[255] <col5>[Customer_Email_Address]:[VARCHAR] <col6>[255]:[Other_Details] <col7>[VARCHAR]:[255] } <table13>[Bookings] { <col0>[Booking_ID]:[INTEGER] <col1>[Customer_ID]:[INTEGER] <col2>[Workshop_Group_ID]:[VARCHAR] <col3>[100]:[Status_Code] <col4>[CHAR]:[Store_ID] <col5>[INTEGER]:[Order_Date] <col6>[DATETIME]:[Planned_Delivery_Date] <col7>[DATETIME]:[Actual_Delivery_Date] <col8>[DATETIME]:[Other_Order_Details] <col9>[VARCHAR]:[255] } <table14>[Order_Items] { <col0>[Order_Item_ID]:[INTEGER] <col1>[Order_ID]:[INTEGER] <col2>[Product_ID]:[INTEGER] <col3>[Order_Quantity]:[VARCHAR] <col4>[288]:[Other_Item_Details] <col5>[VARCHAR]:[255] } <table15>[Drama_Workshop_Groups] { <col0>[Workshop_Group_ID]:[INTEGER] <col1>[Address_ID]:[INTEGER] <col2>[Currency_Code]:[CHAR] <col3>[Marketing_Region_Code]:[CHAR] <col4>[Store_Name]:[VARCHAR] <col5>[255]:[Store_Phone] <col6>[VARCHAR]:[255] <col7>[Store_Email_Address]:[VARCHAR] <col8>[255]:[Other_Details] <col9>[VARCHAR]:[255] } <table16>[Ref_Service_Types] { <col0>[Service_Type_Code]:[CHAR] <col1>[Parent_Service_Type_Code]:[CHAR] <col2>[Service_Type_Description]:[VARCHAR] } <table17>[Stores] { <col0>[Store_ID]:[VARCHAR] <col1>[100]:[Address_ID] <col2>[INTEGER]:[Marketing_Region_Code] <col3>[CHAR]:[Store_Name] <col4>[VARCHAR]:[255] <col5>[Store_Phone]:[VARCHAR] <col6>[255]:[Store_Email_Address] <col7>[VARCHAR]:[255] <col8>[Other_Details]:[VARCHAR] } | SELECT Service_Type_Description, COUNT( `<col2>` ) FROM `<table16>` AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) | Give me the descriptions of the service types that cost more than 100, and count them by a bar chart, and sort by the y-axis in ascending.
|
<table0>[table_name_4] { <col0>[time]:[VARCHAR] <col1>[nationality]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "great britain" | What was Great Britain's total time?
|
<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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[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_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[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] } <table3>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | 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 = "Infection with microorganisms resistant to penicillins" AND lab."CATEGORY" = "Chemistry" | calculate the number of patients tested for clinical chemistry who had infection with microorganisms resistant to penicillins |
<table0>[table_66364] { <col0>[Number]:[real] <col1>[Song]:[Title] <col2>[text]:[Lyricist] <col3>[text]:[Singer] <col4>[text]:[Length] } | SELECT "Song Title" FROM `<table0>` WHERE "Singer( s )" = 'sonu nigam' AND "Lyricist" = 'dev kohli/biddu' AND "Number" > '8' | What is the song title sung by Sonu Nigam with lyricists of Dev Kohli/Biddu, and number over 8?
|
<table0>[table_49547] { <col0>[Volume]:[Issue] <col1>[text]:[Issue] <col2>[date]:[text] <col3>[Weeks]:[number] <col4>[real]:[Song] <col5>[text]:[Artist] } | SELECT "Issue date( s )" FROM `<table0>` WHERE "Weeks at number one" = '5' AND "Volume:Issue" = '61:17-21' | Which Issue date(s) has a Weeks at number one of 5, and a Volume:Issue of 61:17-21? |
<table0>[table_204_596] { <col0>[number]:[year] <col1>[number]:[winners] <col2>[text]:[score] <col3>[text]:[runners] <col4>[text]:[notes] } | SELECT ABS( "score" - "score" ) FROM `<table0>` WHERE "year" = 1955 | tell me the difference in the scores for the game in 1955 . |
<table0>[table_2248784_3] { <col0>[rank_world]:[VARCHAR] <col1>[rank_subcontinent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 7 | Name the rank world for 7 rank subcontinent
|
<table0>[restaurant_revenue] { <col0>[date]:[DATE] <col1>[revenue]:[FLOAT] } | SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col0>` BETWEEN '2021-04-01' AND '2021-04-30'; | What was the total revenue for April 2021? |
<table0>[green_buildings] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[location] <col3>[VARCHAR]:[energy_rating] } | CREATE TABLE green_buildings ( id INT PRIMARY KEY, name VARCHAR( 50 ), location VARCHAR( 50 ), energy_rating INT ); | Create a table named 'green_buildings' to store information about energy efficient buildings |
<table0>[PROFESSOR] { <col0>[EMP_NUM]:[int] <col1>[DEPT_CODE]:[varchar] <col2>[PROF_OFFICE]:[varchar] <col3>[PROF_EXTENSION]:[varchar] <col4>[PROF_HIGH_DEGREE]:[varchar] } <table1>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:[varchar] <col3>[EMP_NUM]:[int] <col4>[DEPT_ADDRESS]:[varchar] <col5>[DEPT_EXTENSION]:[varchar] } <table2>[CLASS] { <col0>[CLASS_CODE]:[varchar] <col1>[CRS_CODE]:[varchar] <col2>[CLASS_SECTION]:[varchar] <col3>[CLASS_TIME]:[varchar] <col4>[CLASS_ROOM]:[varchar] <col5>[PROF_NUM]:[int] } <table3>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[varchar] <col4>[EMP_JOBCODE]:[varchar] <col5>[EMP_HIREDATE]:[datetime] <col6>[EMP_DOB]:[datetime] } <table4>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11>[PROF_NUM]:[int] } <table5>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CREDIT]:[float] } <table6>[ENROLL] { <col0>[CLASS_CODE]:[varchar] <col1>[STU_NUM]:[int] <col2>[ENROLL_GRADE]:[varchar] } | SELECT SCHOOL_CODE, COUNT( DISTINCT `<col4>` ) FROM `<table1>` ORDER BY COUNT( DISTINCT `<col4>` ) DESC | A bar chart about how many different locations does each school have?, and sort from high to low by the Y-axis. |
<table0>[table_74606] { <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 "Crowd" > '16,000' AND "Home `<col2>` score" = '7.7 ( 49 )' | Which venue has a crowd over 16,000 and a home team score of 7.7 (49)? |
<table0>[table_name_26] { <col0>[position]:[VARCHAR] <col1>[played]:[INTEGER] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 12 | How many positions have a played greater than 12? |
<table0>[table_name_52] { <col0>[height]:[INTEGER] <col1>[player]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "stephen arigbabu" | What is stephen arigbabu's height? |
<table0>[table_name_70] { <col0>[date]:[VARCHAR] <col1>[visiting_team]:[VARCHAR] <col2>[final_score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "new york giants" AND `<col2>` = "37-34" | What is the date the new york giants were the visiting team and the Final Score was 37-34?
|
<table0>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table1>[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] } <table2>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table3>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table4>[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] } <table5>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table6>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table7>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table8>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table9>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table10>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table11>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table12>[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] } <table13>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table14>[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] } <table15>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table16>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } | SELECT `<table12>`.charttime FROM `<table12>` WHERE `<table12>`.icustay_id IN ( SELECT `<table1>`.icustay_id FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table0>`.hadm_id FROM `<table0>` WHERE `<table0>`.subject_id = 16329 ) ) AND `<table12>`.itemid IN ( SELECT `<table2>`.itemid FROM `<table2>` WHERE `<table2>`.label = 'respiratory rate' AND `<table2>`.linksto = '`<table12>`' ) AND `<table12>`.valuenum < 11.0 AND DATETIME( `<table12>`.charttime ) <= DATETIME( CURRENT_TIME( ), '-125 day' ) ORDER BY `<table12>`.charttime DESC LIMIT 1 | until 125 days ago, when was the last time that the respiratory rate of patient 16329 was less than 11.0? |
<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>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table3>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table4>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table5>[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_ID]:[decimal] } <table6>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } | SELECT HIRE_DATE, SUM( `<col9>` ) FROM `<table5>` WHERE `<col5>` < '2002-06-21' ORDER BY SUM( `<col9>` ) | For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by weekday, could you sort in asc by the total number? |
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[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] } <table3>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table4>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table5>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table6>[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] } <table7>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table8>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table9>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table10>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table11>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table12>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table13>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table14>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table15>[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] } <table16>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } | SELECT `<table11>`.admittime FROM `<table11>` WHERE `<table11>`.subject_id = 10431 AND `<table11>`.admission_location = 'transfer from hosp/extram' AND STRFTIME( '%y', `<table11>`.admittime ) <= '2101' ORDER BY `<table11>`.admittime DESC LIMIT 1 | when was the last hospital visit until 2101 that patient 10431 was admitted via transfer from hosp/extram? |
<table0>[Candidates] { <col0>[candidate_id]:[INTEGER] <col1>[candidate_details]:[VARCHAR] } <table1>[Student_Course_Attendance] { <col0>[student_id]:[INTEGER] <col1>[course_id]:[INTEGER] <col2>[date_of_attendance]:[DATETIME] } <table2>[People_Addresses] { <col0>[person_address_id]:[INTEGER] <col1>[person_id]:[INTEGER] <col2>[address_id]:[INTEGER] <col3>[date_from]:[DATETIME] <col4>[date_to]:[DATETIME] } <table3>[Student_Course_Registrations] { <col0>[student_id]:[INTEGER] <col1>[course_id]:[INTEGER] <col2>[registration_date]:[DATETIME] } <table4>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[line_1]:[VARCHAR] <col2>[line_2]:[VARCHAR] <col3>[city]:[VARCHAR] <col4>[zip_postcode]:[CHAR] <col5>[state_province_county]:[VARCHAR] <col6>[country]:[VARCHAR] } <table5>[Courses] { <col0>[course_id]:[VARCHAR] <col1>[100]:[course_name] <col2>[VARCHAR]:[120] <col3>[course_description]:[VARCHAR] <col4>[255]:[other_details] <col5>[VARCHAR]:[255] } <table6>[Students] { <col0>[student_id]:[INTEGER] <col1>[student_details]:[VARCHAR] } <table7>[People] { <col0>[person_id]:[INTEGER] <col1>[first_name]:[VARCHAR] <col2>[255]:[middle_name] <col3>[VARCHAR]:[255] <col4>[last_name]:[VARCHAR] <col5>[255]:[cell_mobile_number] <col6>[VARCHAR]:[email_address] <col7>[VARCHAR]:[login_name] <col8>[VARCHAR]:[password] } <table8>[Candidate_Assessments] { <col0>[candidate_id]:[INTEGER] <col1>[qualification]:[CHAR] <col2>[assessment_date]:[DATETIME] <col3>[asessment_outcome_code]:[CHAR] } | SELECT course_name, COUNT( course_name ) FROM `<table5>` GROUP BY course_name | Bar chart of the number of course name from each course name
|
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[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>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table2>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table3>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table4>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table5>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table6>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table7>[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>[observationtime]:[time] } <table8>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table9>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } | SELECT MIN( t1.c1 ) FROM ( SELECT SUM( `<table2>`.`<table2>` ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.`<table1>`unitstayid IN ( SELECT `<table9>`.`<table1>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`name = 'tacrolimus-fk506' ) ) AND DATETIME( `<table2>`.chargetime ) <= DATETIME( CURRENT_TIME( ), '-1 year' ) GROUP BY `<table2>`.`<table1>`healthsystemstayid ) AS t1 | what is the minimum total cost of the hospital which include tacrolimus-fk506 until 1 year ago?
|
<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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[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] { <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] } <table3>[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] } <table4>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT `<table0>`.gender, `<table0>`.admittime FROM `<table0>` WHERE `<table0>`.subject_id = "26285" | tell me the time of admission and gender of patient with patient id 26285.
|
<table0>[table_name_99] { <col0>[wheel_arrangement]:[VARCHAR] <col1>[year_made]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1890" | What is the wheel arrangement made in 1890? |
<table0>[NewsCommittees] { <col0>[CommitteeID]:[int] <col1>[varchar]:[MembersCount] <col2>[int]:[Country] <col3>[varchar]:[INSERT] } | SELECT Country, AVG( MembersCount ) as AvgMembers FROM `<table0>` GROUP BY Country HAVING COUNT( `<col0>` ) > 5; | Which countries have more than 5 news committees and what is the average number of members in those committees? |
<table0>[table_203_755] { <col0>[number]:[singing] <col1>[position]:[number] <col2>[song]:[title] <col3>[text]:[informal] <col4>[translation]:[text] <col5>[act]:[text] <col6>[percentage]:[votes] <col7>[text]:[final] <col8>[position]:[text] } | SELECT COUNT( "song title" ) FROM `<table0>` | what is the total number of songs that are listed in the table ? |
<table0>[table_21197] { <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>[Record]:[text] } | SELECT "Record" FROM `<table0>` WHERE "High rebounds" = 'Gerald Wallace ( 14 )' | What was the final score of the game with gerald wallace (14) as the High Rebound?
|
<table0>[table_55313] { <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 "Home `<col2>` score" = '13.11 ( 89 )' | Which Venue has a Home team score of 13.11 (89)? |
<table0>[table_26464364_1] { <col0>[us_air_date]:[VARCHAR] <col1>[number]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE _number = 18 | On which date did episode # 18 air in the U.S.?
|
<table0>[table_name_77] { <col0>[date]:[VARCHAR] <col1>[attendance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "75,891" | On what Date was the Attendance 75,891?
|
<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>[label]:[text] <col7>[fluid]:[text] } <table2>[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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table3>[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] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND `<table2>`.dob_year < "2111" | what is the number of patients whose primary disease is atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda and year of birth is less than 2111? |
<table0>[table_77912] { <col0>[Round]:[real] <col1>[Pick]:[real] <col2>[text]:[Position] <col3>[text]:[School] } | SELECT MAX( "Pick" ) FROM `<table0>` WHERE "Round" = '8' | What is the largest pick in round 8?
|
<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>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table2>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table3>[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>[observationtime]:[time] } <table4>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table5>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table6>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table7>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table8>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table9>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } | SELECT AVG( t1.c1 ) FROM ( SELECT COUNT( DISTINCT `<table2>`.patientunitstayid ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table2>`name = 'cardiac hardware malfunction - pacemaker' AND DATETIME( `<table2>`.`<table2>`time, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-0 year' ) GROUP BY STRFTIME( '%y-%m-%d', `<table2>`.`<table2>`time ) ) AS t1 | what would be the average daily number of patients diagnosed with cardiac hardware malfunction - pacemaker this year? |
<table0>[animal_population] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[species] <col2>[VARCHAR]:[name] <col3>[VARCHAR]:[population] } | INSERT INTO animal_population ( species, name, population ) VALUES ( 'Puma concolor', 'Puma', 500 ); | Add a new animal 'Puma concolor' with population 500 to the 'animal_population' table |
<table0>[table_21269441_4] { <col0>[tournament_venue__city]:[VARCHAR] <col1>[regular_season_winner]:[VARCHAR] } | SELECT tournament_venue__city_ FROM `<table0>` WHERE `<col1>` = "Louisville" | Where was the tourney when Louisville won the regular season? |
<table0>[properties] { <col0>[INT]:[sustainability_rating] <col1>[FLOAT]:[urban] <col2>[BOOLEAN]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE urban = true AND sustainability_rating IS NOT NULL; | What is the total number of sustainable urban properties? |
<table0>[energy_efficiency_stats] { <col0>[state]:[VARCHAR] <col1>[energy_efficiency_score]:[INT] } | SELECT * FROM `<table0>` WHERE `<col0>` = 'California'; | List all energy efficiency stats for California |
<table0>[table_201_38] { <col0>[number]:[season] <col1>[text]:[winner] <col2>[text]:[team] <col3>[text]:[position] <col4>[text]:[age] } | SELECT "winner" FROM `<table0>` WHERE "team" = 'boston bruins' ORDER BY "season" LIMIT 1 | who was the first calder memorial trophy winner from the boston bruins ?
|
<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_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table4>[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] } | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Continuous invasive mechanical ventilation for 96 consecutive hours or more" | which patients had continuous invasive mechanical ventilation for 96 consecutive hours or more? |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table2>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table3>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table4>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table5>[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] } <table6>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table7>[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] } <table8>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table9>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table10>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table11>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table12>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table13>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table14>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table15>[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] } <table16>[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] } | SELECT AVG( `<table15>`.valuenum ) FROM `<table15>` WHERE `<table15>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 22449 AND NOT `<table2>`.dischtime IS NULL ORDER BY `<table2>`.admittime DESC LIMIT 1 ) ) AND `<table15>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE `<table3>`.label = 'admit wt' AND `<table3>`.linksto = '`<table15>`' ) GROUP BY STRFTIME( '%y-%m-%d', `<table15>`.charttime ) | what was the daily average value of weight for patient 22449 during the last hospital visit?
|
<table0>[smart_cities] { <col0>[city]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[solar_capacity]:[INT] } | SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Germany'; | What is the total installed capacity of solar panels for all smart city projects in Germany? |
<table0>[freight_forwarders] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[shipments] { <col0>[INT]:[forwarder_id] <col1>[INT]:[INSERT] <col2>[freight_forwarders]:[name] <col3>[VALUES]:[ABC] <col4>[Freight]:[XYZ] <col5>[Logistics]:[DEF] <col6>[Freight]:[INSERT] } | SELECT f.name FROM `<table0>` f LEFT JOIN shipments s ON f.id = s.forwarder_id WHERE s.forwarder_id IS NULL; | Which freight forwarders have not handled any shipments? |
<table0>[table_name_22] { <col0>[tries_for]:[VARCHAR] <col1>[points]:[VARCHAR] <col2>[played]:[VARCHAR] <col3>[tries_against]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "22" AND `<col3>` = "33" AND `<col1>` = "60" | What is the number of tries for the team that has 22 plays with 33 tries against and 60 points? |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[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] } <table2>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table3>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table4>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table5>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table6>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table7>[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] } <table8>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table9>[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] } <table10>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table11>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table12>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table13>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table14>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table15>[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] } <table16>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } | SELECT AVG( `<table9>`.valuenum ) FROM `<table9>` WHERE `<table9>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 1912 ) AND NOT `<table7>`.outtime IS NULL ORDER BY `<table7>`.intime DESC LIMIT 1 ) AND `<table9>`.itemid IN ( SELECT `<table2>`.itemid FROM `<table2>` WHERE `<table2>`.label = 'sao2' AND `<table2>`.linksto = '`<table9>`' ) GROUP BY STRFTIME( '%y-%m-%d', `<table9>`.charttime ) | what is the daily average of sao2 for patient 1912 on the last icu visit?
|
<table0>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[COMP_ID]:[text] <col8>[COM_ACC_PAY]:[number] <col9>[COM_PAY]:[number] <col10>[DATA_ID]:[text] <col11>[ENT_ACC_PAY]:[number] <col12>[ENT_PAY]:[number] <col13>[FLX_MED_ORG_ID]:[text] <col14>[ILL_PAY]:[number] <col15>[INSURED_IDENTITY]:[number] <col16>[INSURED_STS]:[text] <col17>[INSU_TYPE]:[text] <col18>[LAS_OVE_PAY]:[number] <col19>[MED_AMOUT]:[number] <col20>[MED_CLINIC_ID]:[text] <col21>[MED_SAFE_PAY_ID]:[text] <col22>[MED_TYPE]:[number] <col23>[OLDC_FUND_PAY]:[number] <col24>[OUT_HOSP_DATE]:[time] <col25>[OVERALL_CD_ORG]:[text] <col26>[OVERALL_CD_PERSON]:[text] <col27>[OVE_ADD_PAY]:[number] <col28>[OVE_PAY]:[number] <col29>[PERSON_ID]:[text] <col30>[PER_ACC_PAY]:[number] <col31>[PER_EXP]:[number] <col32>[PER_SOL]:[number] <col33>[RECEIVER_DEAL_ID]:[text] <col34>[RECEIVER_OFFSET_ID]:[text] <col35>[RECEIVER_REVOKE_ID]:[text] <col36>[RECIPE_BILL_ID]:[text] <col37>[REF_SLT_FLG]:[number] <col38>[REIMBURS_FLG]:[number] <col39>[SENDER_DEAL_ID]:[text] <col40>[SENDER_OFFSET_ID]:[text] <col41>[SENDER_REVOKE_ID]:[text] <col42>[SPE_FUND_PAY]:[number] <col43>[SUP_ADD_PAY]:[number] <col44>[SYNC_TIME]:[time] <col45>[TRADE_TYPE]:[number] <col46>[t_kc21_CLINIC_ID]:[text] <col47>[t_kc21_CLINIC_TYPE]:[text] <col48>[t_kc21_COMP_ID]:[text] <col49>[t_kc21_DATA_ID]:[text] <col50>[t_kc21_DIFF_PLACE_FLG]:[number] <col51>[t_kc21_FERTILITY_STS]:[number] <col52>[t_kc21_FLX_MED_ORG_ID]:[text] <col53>[t_kc21_HOSP_LEV]:[number] <col54>[t_kc21_HOSP_STS]:[number] <col55>[t_kc21_IDENTITY_CARD]:[text] <col56>[t_kc21_INPT_AREA_BED]:[text] <col57>[t_kc21_INSURED_IDENTITY]:[number] <col58>[t_kc21_INSURED_STS]:[text] <col59>[t_kc21_INSU_TYPE]:[text] <col60>[t_kc21_IN_DIAG_DIS_CD]:[text] <col61>[t_kc21_IN_DIAG_DIS_NM]:[text] <col62>[t_kc21_IN_HOSP_DATE]:[time] <col63>[t_kc21_IN_HOSP_DAYS]:[number] <col64>[t_kc21_MAIN_COND_DES]:[text] <col65>[t_kc21_MED_AMOUT]:[number] <col66>[t_kc21_MED_ORG_DEPT_CD]:[text] <col67>[t_kc21_MED_ORG_DEPT_NM]:[text] <col68>[t_kc21_MED_SER_ORG_NO]:[text] <col69>[t_kc21_MED_TYPE]:[number] <col70>[t_kc21_OUT_DIAG_DIS_CD]:[text] <col71>[t_kc21_OUT_DIAG_DIS_NM]:[text] <col72>[t_kc21_OUT_DIAG_DOC_CD]:[text] <col73>[t_kc21_OUT_DIAG_DOC_NM]:[text] <col74>[t_kc21_OUT_HOSP_DATE]:[time] <col75>[t_kc21_OVERALL_CD_ORG]:[text] <col76>[t_kc21_OVERALL_CD_PERSON]:[text] <col77>[t_kc21_PERSON_AGE]:[number] <col78>[t_kc21_PERSON_ID]:[text] <col79>[t_kc21_PERSON_NM]:[text] <col80>[t_kc21_PERSON_SEX]:[number] <col81>[t_kc21_REIMBURSEMENT_FLG]:[number] <col82>[t_kc21_REMOTE_SETTLE_FLG]:[text] <col83>[t_kc21_SERVANT_FLG]:[text] <col84>[t_kc21_SOC_SRT_CARD]:[text] <col85>[t_kc21_SYNC_TIME]:[time] <col86>[t_kc21_TRADE_TYPE]:[number] } <table1>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>[text]:[MED_CLINIC_ID] <col12>[text]:[MED_DIRE_CD] <col13>[text]:[MED_DIRE_NM] <col14>[text]:[MED_EXP_BILL_ID] <col15>[text]:[MED_EXP_DET_ID] <col16>[text]:[MED_INV_ITEM_TYPE] <col17>[text]:[MED_ORG_DEPT_CD] <col18>[text]:[MED_ORG_DEPT_NM] <col19>[text]:[OVERALL_CD_ORG] <col20>[text]:[OVERALL_CD_PERSON] <col21>[text]:[OVE_SELF_AMO] <col22>[number]:[PRESCRIPTION_CODE] <col23>[text]:[PRESCRIPTION_ID] <col24>[text]:[QTY] <col25>[number]:[RECIPE_BILL_ID] <col26>[text]:[REF_STA_FLG] <col27>[number]:[REIMBURS_TYPE] <col28>[number]:[REMOTE_SETTLE_FLG] <col29>[text]:[RER_SOL] <col30>[number]:[SELF_PAY_AMO] <col31>[number]:[SELF_PAY_PRO] <col32>[number]:[SOC_SRT_DIRE_CD] <col33>[text]:[SOC_SRT_DIRE_NM] <col34>[text]:[SPEC] <col35>[text]:[STA_DATE] <col36>[time]:[STA_FLG] <col37>[number]:[SYNC_TIME] <col38>[time]:[TRADE_TYPE] <col39>[number]:[UNIVALENT] <col40>[number]:[UP_LIMIT_AMO] <col41>[number]:[USE_FRE] <col42>[text]:[VAL_UNIT] } | SELECT SUM( `<table0>`.MED_AMOUT ), SUM( `<table0>`.OVE_PAY ) FROM `<table0>` WHERE `<table0>`.t_kc21_MED_SER_ORG_NO = '2412028' AND `<table0>`.CLINIC_SLT_DATE BETWEEN '2002-01-31' AND '2009-06-09' | 自2002年1月31日到2009年6月9日,查一下医疗机构2412028的总金额和统筹总金额
|
<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>[observationtime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table2>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table3>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table4>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table5>[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>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table6>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table7>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table8>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table9>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } | SELECT `<table0>`.observationtime FROM `<table0>` WHERE `<table0>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '006-205326' ) AND NOT `<table5>`.unitdischargetime IS NULL ORDER BY `<table5>`.unitadmittime DESC LIMIT 1 ) AND NOT `<table0>`.heartrate IS NULL ORDER BY `<table0>`.observationtime DESC LIMIT 1 | when was the heartrate of patient 006-205326 last measured on the last intensive care unit visit? |
<table0>[table_31540] { <col0>[Year]:[real] <col1>[Competition]:[text] <col2>[Venue]:[text] <col3>[Position]:[text] <col4>[Event]:[text] } | SELECT AVG( "Year" ) FROM `<table0>` WHERE "Venue" = 'ponce, puerto rico' | What is the average year for Ponce, Puerto Rico events?
|
<table0>[table_name_32] { <col0>[removal_treaty__year_signed]:[VARCHAR] <col1>[nation]:[VARCHAR] } | SELECT removal_treaty__year_signed_ FROM `<table0>` WHERE `<col1>` = "chickasaw" | Which removal treaty covered the chickasaw nation? |
<table0>[sales_data] { <col0>[INT]:[sale_date] <col1>[DATE]:[VARCHAR] <col2>[model]:[VARCHAR] <col3>[vehicle_type]:[VARCHAR] <col4>[price]:[FLOAT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col3>` = 'Luxury' AND YEAR( sale_date ) = 2015; | Find the number of luxury vehicles sold in the 'sales_data' table from the year 2015. |
<table0>[table_name_21] { <col0>[notes]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2008-01-27" | Which Notes have a Date of 2008-01-27? |
<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] <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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table2>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[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] } <table4>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Venous catheterization, not elsewhere classified" | how many patients whose procedure long title is venous catheterization, not elsewhere classified? |
<table0>[startup] { <col0>[INT]:[name] <col1>[TEXT]:[industry] <col2>[TEXT]:[CEO_gender] <col3>[TEXT]:[total_funding] } | SELECT COUNT( * ) FROM `<table0>` WHERE industry = 'MedTech' AND CEO_gender = 'Female' AND total_funding > 50000000.00; | How many startups in the MedTech sector have a female CEO and have raised over $50M in total funding? |
<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>[label]:[text] <col7>[fluid]:[text] } <table2>[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] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.diagnosis = "CELO-VESSICLE FISTULA" | count the number of patients whose primary disease is celo-vessicle fistula? |
<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] <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>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table2>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[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] } | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE lab.charttime = "2111-12-22 19:13:00" | how many patients whose lab test chart time is 2111-12-22 19:13:00? |
<table0>[table_32993] { <col0>[Episode]:[Number] <col1>[real]:[Title] <col2>[text]:[Podcast] <col3>[Date]:[text] <col4>[Run]:[time] <col5>[text]:[Historical] <col6>[References]:[text] } | SELECT "Podcast Date" FROM `<table0>` WHERE "Episode Number" = '103' | What is the date for the podcast episode number 103?
|
<table0>[table_76153] { <col0>[1996]:[general] <col1>[real]:[1999] <col2>[European]:[real] <col3>[2001]:[general] <col4>[real]:[2004] <col5>[European]:[real] <col6>[2006]:[general] <col7>[real]:[2008] <col8>[general]:[real] <col9>[2009]:[European] <col10>[real]:[2013] <col11>[general]:[real] } | SELECT MAX( "2008 general" ) FROM `<table0>` WHERE "2009 European" < '5.5' AND "2006 general" > '5.8' AND "2001 general" > '3.3' AND "2004 European" < '3.6' | What is the highest value for general 2008 when there is less than 5.5 in European 2009, more than 5.8 in general 2006, more than 3.3 in general 2001, and less than 3.6 for 2004 European? |
<table0>[landfills] { <col0>[country]:[VARCHAR] <col1>[capacity]:[INT] <col2>[year]:[INT] } | SELECT COUNT( * ) as num_`<table0>` FROM `<table0>` WHERE `<col1>` > 8000 AND `<col2>` = 2021 AND `<col0>` IN ( 'Brazil', 'Argentina', 'Colombia', 'Peru', 'Venezuela' ); | How many landfills are there in South America with a capacity greater than 8000 tons as of 2021?' |
<table0>[table_28059992_6] { <col0>[position]:[VARCHAR] <col1>[cfl_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Edmonton" | What position was the player who was drafted by Edmonton? |
<table0>[table_name_4] { <col0>[date_and_opponent]:[VARCHAR] <col1>[position]:[VARCHAR] <col2>[career_games]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "f" AND `<col2>` = "123 games" | Name the Date and an Opponent which has a f Position and Career Games of 123 games? |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table3>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table4>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table5>[PostHistoryTypes] { <col0>[number]:[text] } <table6>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table7>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table8>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table9>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table10>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table11>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table12>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table13>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table14>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table15>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table16>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table17>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table18>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table19>[VoteTypes] { <col0>[number]:[text] } <table20>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table21>[PostTypes] { <col0>[number]:[text] } <table22>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table23>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table24>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table25>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table26>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table27>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table28>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } | SELECT p.Id AS "user_link", p.Ranking, SUBSTRING( CAST( CAST( Ranking AS FLOAT ) / Count * 100.00 AS TEXT ), 1, 6 ) + '%' AS Percentile, Reputation, SUBSTRING( CAST( CAST( Reputation AS FLOAT ) / Sum * 100.00 AS TEXT ), 1, 6 ) + '%' AS "Hoarded rep" FROM ( SELECT Id, ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS Ranking, Reputation FROM `<table11>` WHERE Reputation > @MinRep ) AS p, ( SELECT Count = COUNT( * ) FROM `<table11>` WHERE Reputation > @MinRep ) AS Counts, ( SELECT Sum = SUM( Reputation ) FROM `<table11>` WHERE Reputation > @MinRep ) AS Rep ORDER BY ranking LIMIT 1000 | User Rank and Hoarded Rep.
|
<table0>[table_2155] { <col0>[Country]:[text] <col1>[1948]:[millions] <col2>[real]:[1949] <col3>[millions]:[real] <col4>[1950]:[millions] <col5>[real]:[Cumulative] <col6>[millions]:[real] } | SELECT MAX( "1949/50 ( $ `<col3>` )" ) FROM `<table0>` WHERE "1948/49 ( $ `<col3>` )" = '232' | What's the 1949/50 expenditure (in $ millions) in the country where the 1948/49 expenditure was 232$ millions?
|
<table0>[ResourceDepletion] { <col0>[Site]:[VARCHAR] <col1>[255]:[Date] <col2>[DATE]:[Depletion] <col3>[FLOAT]:[INSERT] } | SELECT Site, ( Depletion - LAG( Depletion, 1, Depletion ) OVER ( PARTITION BY `<col0>` ORDER BY Date ) ) / NULLIF( DATEDIFF( DAY, LAG( Date, 1, Date ) OVER ( PARTITION BY `<col0>` ORDER BY Date ), Date ), 0 ) as Depletion_Rate FROM `<table0>` WHERE Date >= DATEADD( MONTH, -6, GETDATE( ) ) ORDER BY Site, Date; | What is the rate of resource depletion by mine site in the last 6 months? |
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table2>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table4>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table5>[PostTypes] { <col0>[number]:[text] } <table6>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table7>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table8>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table9>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table10>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table11>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table12>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table13>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table14>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table15>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table16>[PostHistoryTypes] { <col0>[number]:[text] } <table17>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table18>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table19>[VoteTypes] { <col0>[number]:[text] } <table20>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table21>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table22>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table23>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table24>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table25>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table26>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table27>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table28>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } | SELECT DISTINCT ( d.PostId ) AS "post_link" FROM `<table17>` AS d INNER JOIN `<table17>` AS c ON d.PostId = c.PostId INNER JOIN Votes AS v ON v.PostId = c.PostId AND v.CreationDate > d.CreationDate AND v.CreationDate < c.CreationDate WHERE d.`<table17>`TypeId = 6 AND d.Text LIKE '%<status-declined>%' AND c.`<table17>`TypeId = 6 AND c.Text LIKE '%<status-completed>%' AND v.VoteTypeId = 8 | Questions going from [status-declined] to [status-completed] after posting a bounty.
|
<table0>[table_45870] { <col0>[Res]:[text] <col1>[Record]:[text] <col2>[Opponent]:[text] <col3>[Method]:[text] <col4>[Event]:[text] <col5>[Round]:[real] <col6>[Location]:[text] } | SELECT "Method" FROM `<table0>` WHERE "Location" = 'tokyo , japan' AND "Event" = 'rings: millennium combine 2' | What is Method, when Location is 'Tokyo , Japan', and when Event is 'Rings: Millennium Combine 2'?
|
<table0>[therapy_sessions_2023] { <col0>[patient_id]:[INT] <col1>[session_date]:[DATE] } | SELECT AVG( num_sessions ) FROM ( SELECT patient_id, COUNT( * ) AS num_sessions FROM `<table0>` WHERE YEAR( `<col1>` ) = 2023 GROUP BY `<col0>` ) AS patient_sessions; | What is the average number of therapy sessions per patient in 2023? |
<table0>[table_25030512_4] { <col0>[party]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Spencer Bachus" | Name the party for spencer bachus |
<table0>[table_204_633] { <col0>[number]:[launch] <col1>[date]:[text] <col2>[operator]:[text] <col3>[name]:[text] <col4>[sample]:[origin] <col5>[text]:[samples] <col6>[returned]:[text] <col7>[recovery]:[date] <col8>[text]:[mission] <col9>[result]:[text] } | SELECT MIN( "launch date" ) FROM `<table0>` WHERE "mission result" = 'success' | what year was the first success ?
|
<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] <col11>[All_Neutral]:[text] } <table1>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } | SELECT ACC_Regular_Season, `<col4>` FROM `<table0>` ORDER BY `<col4>` | Find ACC_Regular_Season and ACC_Percent , and visualize them by a bar chart, and order from low to high by the Y. |
<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>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table2>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table3>[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>[observationtime]:[time] } <table4>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table5>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table6>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table7>[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>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table8>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table9>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } | SELECT t2.drugname FROM ( SELECT `<table7>`.uniquepid, `<table9>`.`<table9>`time FROM `<table9>` JOIN `<table7>` ON `<table9>`.`<table7>`unitstayid = `<table7>`.`<table7>`unitstayid WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '015-12508' ) AND `<table9>`.`<table9>`name = 'antiplatelet agent' ) AS t1 JOIN ( SELECT `<table7>`.uniquepid, `<table0>`.drugname, `<table0>`.drugstarttime FROM `<table0>` JOIN `<table7>` ON `<table0>`.`<table7>`unitstayid = `<table7>`.`<table7>`unitstayid WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '015-12508' ) ) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.`<table9>`time < t2.drugstarttime AND DATETIME( t1.`<table9>`time, 'start of day' ) = DATETIME( t2.drugstarttime, 'start of day' ) | what is the drug that patient 015-12508 was prescribed for during the same day after having received antiplatelet agent?
|
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[int] <col11>[cares_for_students]:[int] <col12>[heavy_assignments]:[int] <col13>[respected]:[int] <col14>[participation]:[int] <col15>[heavy_reading]:[int] <col16>[tough_grader]:[int] <col17>[hilarious]:[int] <col18>[would_take_again]:[int] <col19>[good_lecture]:[int] <col20>[no_skip]:[int] } <table4>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table5>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table6>[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] } <table7>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table8>[requirement] { <col0>[requirement_id]:[int] } <table9>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table10>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table11>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table12>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table13>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table14>[area] { <col0>[course_id]:[int] } <table15>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has_discussion]:[varchar] <col11>[has_lab]:[varchar] <col12>[has_projects]:[varchar] <col13>[has_exams]:[varchar] <col14>[num_reviews]:[int] <col15>[clarity_score]:[int] <col16>[easiness_score]:[int] <col17>[helpfulness_score]:[int] } <table16>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degree]:[varchar] <col11>[minor]:[varchar] <col12>[internship]:[varchar] } <table17>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[saturday]:[varchar] <col12>[sunday]:[varchar] <col13>[has_final_project]:[varchar] <col14>[has_final_exam]:[varchar] <col15>[textbook]:[varchar] <col16>[class_address]:[varchar] <col17>[allow_audit]:[varchar] } | SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM ( SELECT `<col1>` FROM `<table6>` WHERE earn_credit = 'Y' AND `<col0>` = 1 ) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, `<col2>` AS SEMESTERalias0 WHERE ( ( SEMESTERalias0.semester = 'FA' AND SEMESTERalias0.year = 2016 ) OR ( SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2017 ) ) AND COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN ( DERIVED_TABLEalias0.course_id ) AND NOT COURSEalias0.course_id IN ( SELECT DISTINCT COURSE_PREREQUISITEalias0.course_id FROM `<table11>` AS COURSE_PREREQUISITEalias0 WHERE NOT COURSE_PREREQUISITEalias0.pre_course_id IN ( DERIVED_TABLEalias0.course_id ) ) AND COURSEalias0.department = 'EECS' AND COURSEalias0.number BETWEEN 400 AND 400 + 100 AND SEMESTERalias0.semester_id = COURSE_OFFERINGalias0.semester | Can 400 -level classes be taken by me in the Fall or Winter term ? |
<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]:[date] <col3>[ssn]:[text] <col4>[drivers]:[text] <col5>[passport]:[text] <col6>[prefix]:[text] <col7>[text]:[text] <col8>[suffix]:[text] <col9>[maiden]:[text] <col10>[marital]:[text] <col11>[race]:[text] <col12>[ethnicity]:[text] <col13>[gender]:[text] <col14>[birthplace]:[text] <col15>[address]:[text] } <table2>[encounters] { <col0>[text]:[DATE] <col1>[date]:[PATIENT] <col2>[text]:[CODE] <col3>[integer]:[DESCRIPTION] <col4>[text]:[REASONCODE] <col5>[integer]:[REASONDESCRIPTION] } <table3>[allergies] { <col0>[START]:[text] <col1>[STOP]:[text] <col2>[PATIENT]:[text] <col3>[ENCOUNTER]:[text] <col4>[CODE]:[integer] <col5>[DESCRIPTION]:[text] } <table4>[careplans] { <col0>[text]:[START] <col1>[date]:[STOP] <col2>[date]:[PATIENT] <col3>[text]:[ENCOUNTER] <col4>[text]:[CODE] <col5>[real]:[DESCRIPTION] <col6>[text]:[REASONCODE] <col7>[integer]:[REASONDESCRIPTION] } <table5>[conditions] { <col0>[START]:[date] <col1>[STOP]:[date] <col2>[PATIENT]:[text] <col3>[ENCOUNTER]:[text] <col4>[CODE]:[integer] <col5>[DESCRIPTION]:[text] } <table6>[immunizations] { <col0>[DATE]:[date] <col1>[PATIENT]:[text] <col2>[ENCOUNTER]:[text] <col3>[CODE]:[integer] <col4>[DESCRIPTION]:[text] } <table7>[medications] { <col0>[START]:[date] <col1>[STOP]:[date] <col2>[PATIENT]:[text] <col3>[ENCOUNTER]:[text] <col4>[CODE]:[integer] <col5>[DESCRIPTION]:[text] <col6>[REASONCODE]:[integer] <col7>[REASONDESCRIPTION]:[text] } <table8>[observations] { <col0>[DATE]:[date] <col1>[PATIENT]:[text] <col2>[ENCOUNTER]:[text] <col3>[CODE]:[text] <col4>[DESCRIPTION]:[text] <col5>[VALUE]:[real] <col6>[UNITS]:[text] } <table9>[procedures] { <col0>[DATE]:[date] <col1>[PATIENT]:[text] <col2>[ENCOUNTER]:[text] <col3>[CODE]:[integer] <col4>[DESCRIPTION]:[text] <col5>[REASONCODE]:[integer] <col6>[REASONDESCRIPTION]:[text] } <table10>[claims] { <col0>[text]:[PATIENT] <col1>[text]:[BILLABLEPERIOD] <col2>[date]:[ORGANIZATION] <col3>[text]:[ENCOUNTER] <col4>[text]:[DIAGNOSIS] <col5>[text]:[TOTAL] } | SELECT COUNT( DISTINCT T1.patient ) FROM `<table1>` AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Ibuprofen 200 MG Oral Tablet' AND T1.ethnicity = 'dominican' AND strftime( '%Y', T2.START ) = '2016' AND strftime( '%m', T2.STOP ) - strftime( '%m', T2.START ) = 1 | Among the patients that started taking Ibuprofen 200mg Oral Tablet in 2016, how many Dominican patients stopped taking the medicine after exactly one month? |
<table0>[table_203_598] { <col0>[number]:[date] <col1>[text]:[time] <col2>[text]:[opponent] <col3>[text]:[site] <col4>[text]:[text] <col5>[result]:[text] <col6>[attendance]:[number] } | SELECT "date" FROM `<table0>` ORDER BY "attendance" DESC LIMIT 1 | which date had the most attendance ?
|