schema
stringlengths 20
14.6k
| query
stringlengths 17
2.58k
| question
stringlengths 8
1.06k
|
---|---|---|
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table2>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table4>[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] } <table5>[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] } <table6>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table7>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table8>[PostHistoryTypes] { <col0>[number]:[text] } <table9>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table10>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table11>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <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>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table14>[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] } <table15>[VoteTypes] { <col0>[number]:[text] } <table16>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table17>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table18>[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] } <table19>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table20>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table21>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table22>[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] } <table23>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table24>[PostTypes] { <col0>[number]:[text] } <table25>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table26>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table27>[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] } <table28>[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] } | SELECT `<table14>`.Id, `<table14>`.Title, `<table14>`.CreationDate, `<table14>`.Score, `<table14>`.ViewCount, `<table14>`.FavoriteCount, `<table14>`.AnswerCount, `<table14>`.Body, `<table14>`.Tags FROM `<table14>` WHERE `<table14>`.PostTypeId = 1 AND `<table14>`.Tags LIKE '%python%' AND `<table14>`.CreationDate >= CURRENT_TIMESTAMP( ) - 7 AND `<table14>`.AcceptedAnswerId IS NULL ORDER BY ViewCount DESC LIMIT 100 | Top 100 unanswered python questions by view count.
|
<table0>[dental_providers] { <col0>[INT]:[county] <col1>[VARCHAR]:[provider_type] <col2>[VARCHAR]:[INSERT] } <table1>[counties] { <col0>[county]:[VARCHAR] <col1>[state]:[VARCHAR] <col2>[pop_density]:[INT] } | SELECT h.county, COUNT( h.id ) FROM `<table0>` h JOIN counties c ON h.county = c.county WHERE c.pop_density > 1000 GROUP BY h.county; | List the number of dental providers in each county, for counties with a population density greater than 1000 people per square mile. |
<table0>[marine_species_info] { <col0>[INT]:[species] <col1>[TEXT]:[region] <col2>[TEXT]:[lifespan] } | SELECT COUNT( * ) FROM `<table0>` WHERE region = 'Indian Ocean' AND lifespan < 10; | Find the number of marine species in the Indian Ocean with a lifespan less than 10 |
<table0>[courses] { <col0>[INT]:[course_name] <col1>[TEXT]:[department] <col2>[TEXT]:[completion_date] <col3>[DATE]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE department = 'Math' AND completion_date >= DATE( 'now', '-6 month' ); | How many professional development courses were completed by teachers in the 'Math' department in the last 6 months? |
<table0>[table_78564] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Attendance]:[text] } | SELECT MAX( "Week" ) FROM `<table0>` WHERE "Attendance" = '74,162' | What is the latest week with an attendance of 74,162?
|
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[semester] { <col0>[semester_id]:[int] } <table2>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table3>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table4>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table5>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table6>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table7>[requirement] { <col0>[requirement_id]:[int] } <table8>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table9>[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] } <table10>[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] } <table11>[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] } <table12>[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] } <table13>[area] { <col0>[course_id]:[int] } <table14>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table15>[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] } <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>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } | SELECT COUNT( * ) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'CMPLXSYS' AND course.number = 391 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | Does CMPLXSYS 391 have morning classes ?
|
<table0>[table_15162479_8] { <col0>[nominee]:[VARCHAR] <col1>[net_vote]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "34.46%" | What nominees had a net vote of 34.46%? |
<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>[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>[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>[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 `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Status autm crd dfbrltr" | count the number of patients whose diagnoses short title is status autm crd dfbrltr?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[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>[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 `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Unspecified septicemia" AND lab."CATEGORY" = "Blood Gas" | provide the number of patients whose diagnoses long title is unspecified septicemia and lab test category is blood gas? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] { <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>[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>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.expire_flag = "1" AND prescriptions.drug = "Rosiglitazone Maleate" | what is the number of patients whose death status is 1 and drug name is rosiglitazone maleate?
|
<table0>[table_name_93] { <col0>[country]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1994 | What is Country, when Year is "1994"? |
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[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>[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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hematoma complic proc" AND prescriptions.route = "BUCCAL" | provide the number of patients whose diagnoses short title is hematoma complic proc and drug route is buccal?
|
<table0>[organic_cafe] { <col0>[dish_name]:[TEXT] <col1>[calories]:[INTEGER] } | SELECT AVG( calories ) FROM organic_cafe; | What is the average calorie count for all dishes in the organic_cafe restaurant? |
<table0>[judges] { <col0>[INT]:[first_name] <col1>[VARCHAR]:[last_name] <col2>[VARCHAR]:[court_id] } <table1>[courts] { <col0>[INT]:[name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[INSERT] } | INSERT INTO judges ( id, first_name, last_name, court_id ) VALUES ( 4, 'Fatima', 'Adebayo', 3 ); | Insert a new record in the 'judges' table with the name 'Fatima Adebayo' for the court with id 3 |
<table0>[table_name_52] { <col0>[rank]:[INTEGER] <col1>[heat]:[VARCHAR] <col2>[nationality]:[VARCHAR] <col3>[lane]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "japan" AND `<col3>` < 7 AND `<col1>` < 3 | What rank is from Japan, has a lane smaller than 7 and a heat smaller than 3? |
<table0>[table_23183195_2] { <col0>[road_record]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Vanderbilt" | What is the road record for Vanderbilt? |
<table0>[table_10294071_1] { <col0>[total_w_l]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Boro Jovanović Category:Articles with hCards" | what's the total w–l where player is boro jovanović category:articles with hcards |
<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>[diagnoses] { <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>[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>` WHERE `<table0>`.gender = "F" AND `<table0>`.age < "36" | provide the number of patients whose gender is f and age is less than 36? |
<table0>[table_204_235] { <col0>[number]:[season] <col1>[text]:[team] <col2>[text]:[country] <col3>[text]:[competition] <col4>[text]:[matches] <col5>[number]:[goals] } | SELECT SUM( "matches" ) FROM `<table0>` | what is the total number of matches ?
|
<table0>[table_52174] { <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>[Date]:[text] } | SELECT "Venue" FROM `<table0>` WHERE "Away `<col2>` score" = '6.8 ( 44 )' | What was the venue where the away team ended in a score of 6.8 (44)? |
<table0>[table_11545282_10] { <col0>[school_club_team]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Al Jefferson" | What school or team does Al Jefferson play for? |
<table0>[table_name_45] { <col0>[draws]:[INTEGER] <col1>[season]:[VARCHAR] <col2>[losses]:[VARCHAR] <col3>[team]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 18 AND `<col3>` = "north melbourne" AND `<col1>` > 1926 | What is the highest Draws with less than 18 losses for north melbourne later than 1926? |
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table1>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table3>[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] } <table4>[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] } <table5>[PostHistoryTypes] { <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>[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] } <table9>[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] } <table10>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table11>[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] } <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>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table14>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table15>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table16>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table17>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <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>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table20>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table21>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table22>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table23>[VoteTypes] { <col0>[number]:[text] } <table24>[PostTypes] { <col0>[number]:[text] } <table25>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table26>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table27>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table28>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } | SELECT * FROM `<table3>` WHERE LOWER( Location ) LIKE '%india%' OR UPPER( Location ) LIKE '%INDIA%' OR Location LIKE '%India%' AND Reputation >= 1000 ORDER BY Reputation DESC | Top SO users From India.
|
<table0>[invoice_items] { <col0>[invoice_item_id]:[number] <col1>[invoice_id]:[number] <col2>[order_id]:[number] <col3>[order_item_id]:[number] <col4>[product_id]:[number] <col5>[order_quantity]:[number] <col6>[other_item_details]:[text] } <table1>[marketing_regions] { <col0>[marketing_region_code]:[text] <col1>[marketing_region_name]:[text] <col2>[marketing_region_descriptrion]:[text] <col3>[other_details]:[text] } <table2>[drama_workshop_groups] { <col0>[workshop_group_id]:[number] <col1>[address_id]:[number] <col2>[currency_code]:[text] <col3>[marketing_region_code]:[text] <col4>[store_name]:[text] <col5>[store_phone]:[text] <col6>[store_email_address]:[text] <col7>[other_details]:[text] } <table3>[clients] { <col0>[client_id]:[number] <col1>[address_id]:[number] <col2>[customer_email_address]:[text] <col3>[customer_name]:[text] <col4>[customer_phone]:[text] <col5>[other_details]:[text] } <table4>[addresses] { <col0>[address_id]:[text] <col1>[line_1]:[text] <col2>[line_2]:[text] <col3>[city_town]:[text] <col4>[state_county]:[text] <col5>[other_details]:[text] } <table5>[order_items] { <col0>[order_item_id]:[number] <col1>[order_id]:[number] <col2>[product_id]:[number] <col3>[order_quantity]:[text] <col4>[other_item_details]:[text] } <table6>[bookings] { <col0>[booking_id]:[number] <col1>[customer_id]:[number] <col2>[workshop_group_id]:[text] <col3>[status_code]:[text] <col4>[store_id]:[number] <col5>[order_date]:[time] <col6>[planned_delivery_date]:[time] <col7>[actual_delivery_date]:[time] <col8>[other_order_details]:[text] } <table7>[bookings_services] { <col0>[order_id]:[number] <col1>[product_id]:[number] } <table8>[stores] { <col0>[store_id]:[text] <col1>[address_id]:[number] <col2>[marketing_region_code]:[text] <col3>[store_name]:[text] <col4>[store_phone]:[text] <col5>[store_email_address]:[text] <col6>[other_details]:[text] } <table9>[performers] { <col0>[performer_id]:[number] <col1>[address_id]:[number] <col2>[customer_name]:[text] <col3>[customer_phone]:[text] <col4>[customer_email_address]:[text] <col5>[other_details]:[text] } <table10>[ref_payment_methods] { <col0>[payment_method_code]:[text] <col1>[payment_method_description]:[text] } <table11>[services] { <col0>[service_id]:[number] <col1>[service_type_code]:[text] <col2>[workshop_group_id]:[number] <col3>[product_description]:[text] <col4>[product_name]:[text] <col5>[product_price]:[number] <col6>[other_product_service_details]:[text] } <table12>[products] { <col0>[product_id]:[text] <col1>[product_name]:[text] <col2>[product_price]:[number] <col3>[product_description]:[text] <col4>[other_product_service_details]:[text] } <table13>[ref_service_types] { <col0>[service_type_code]:[text] <col1>[parent_service_type_code]:[text] <col2>[service_type_description]:[text] } <table14>[customers] { <col0>[customer_id]:[text] <col1>[address_id]:[number] <col2>[customer_name]:[text] <col3>[customer_phone]:[text] <col4>[customer_email_address]:[text] <col5>[other_details]:[text] } <table15>[invoices] { <col0>[invoice_id]:[number] <col1>[order_id]:[number] <col2>[payment_method_code]:[text] <col3>[product_id]:[number] <col4>[order_quantity]:[text] <col5>[other_item_details]:[text] <col6>[order_item_id]:[number] } <table16>[customer_orders] { <col0>[order_id]:[number] <col1>[customer_id]:[number] <col2>[store_id]:[number] <col3>[order_date]:[time] <col4>[planned_delivery_date]:[time] <col5>[actual_delivery_date]:[time] <col6>[other_order_details]:[text] } <table17>[performers_in_bookings] { <col0>[order_id]:[number] <col1>[performer_id]:[number] } | SELECT `<col3>` FROM `<table6>` GROUP BY `<col3>` ORDER BY COUNT( * ) DESC LIMIT 1 | Which status code is the most common of all the bookings? |
<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>[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] } <table2>[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] } <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>[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>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table6>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table7>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <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>[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] } <table10>[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] } <table11>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table12>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table13>[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] } <table14>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table15>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table16>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } | SELECT COUNT( * ) FROM `<table11>` WHERE `<table11>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` WHERE `<table5>`.short_title = 'anterior rect resect nec' ) AND `<table11>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 82235 ) | count the number of times patient 82235 had anterior rect resect nec procedures.
|
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[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] } <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>[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] } <table4>[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] } <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>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table7>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <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>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table10>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table11>[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] } <table12>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table13>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[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>[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>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } | SELECT `<table8>`.dose_val_rx FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 138 ) AND `<table8>`.drug = 'atorvastatin' AND DATETIME( `<table8>`.startdate, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) AND STRFTIME( '%m', `<table8>`.startdate ) = '11' ORDER BY `<table8>`.startdate LIMIT 1 | what is the dose of atorvastatin, that patient 138 was first prescribed in 11/last year? |
<table0>[table_59928] { <col0>[White]:[text] <col1>[Black]:[text] <col2>[Year]:[real] <col3>[Result]:[text] <col4>[Moves]:[real] <col5>[Tournament]:[text] <col6>[Opening]:[text] } | SELECT COUNT( "Moves" ) FROM `<table0>` WHERE "Result" = '½–½' AND "Year" < '1999' AND "Black" = 'anand' | What's the total number of moves with a result of and a black of Anand before 1999?
|
<table0>[table_53074] { <col0>[Building]:[text] <col1>[Height]:[text] <col2>[Floors]:[real] <col3>[Year]:[text] <col4>[Status]:[text] } | SELECT "Building" FROM `<table0>` WHERE "Floors" > '15' AND "Year" = '2013' | For the Year 2013 what building(s) had more than 15 Floors?
|
<table0>[table_1231316_5] { <col0>[fastest_time__s]:[VARCHAR] <col1>[nation]:[VARCHAR] } | SELECT COUNT( fastest_time__s_ ) FROM `<table0>` WHERE `<col1>` = "Nigeria" | Nigeria had the fastest time once.
|
<table0>[table_name_41] { <col0>[song]:[VARCHAR] <col1>[draw]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2 | What song has draw number less than 2?
|
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table2>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table3>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table4>[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] } <table5>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table6>[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] } <table7>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table8>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table9>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } | SELECT AVG( t1.c1 ) FROM ( SELECT SUM( `<table9>`.`<table9>` ) AS c1 FROM `<table9>` WHERE `<table9>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.`<table4>`unitstayid IN ( SELECT `<table3>`.`<table4>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`name = 'removal of thora`<table9>`omy tube' ) ) AND DATETIME( `<table9>`.chargetime ) <= DATETIME( CURRENT_TIME( ), '-1 year' ) GROUP BY `<table9>`.`<table4>`healthsystemstayid ) AS t1 | what's the average cost of a hospital that involves a procedure called removal of thoracostomy tube until 1 year ago? |
<table0>[artist] { <col0>[Artist_ID]:[int] <col1>[Artist]:[text] <col2>[Age]:[int] <col3>[Famous_Title]:[text] <col4>[Famous_Release_date]:[text] } <table1>[volume] { <col0>[Volume_ID]:[int] <col1>[Volume_Issue]:[text] <col2>[Issue_Date]:[text] <col3>[Weeks_on_Top]:[real] <col4>[Song]:[text] <col5>[Artist_ID]:[int] } <table2>[music_festival] { <col0>[int]:[Music_Festival] <col1>[text]:[Date_of_ceremony] <col2>[text]:[Category] <col3>[text]:[Volume] <col4>[int]:[Result] } | SELECT Category, COUNT( Category ) FROM `<table2>` WHERE Result = "Awarded" GROUP BY Category | What are the category of music festivals with result 'Awarded', and count them by a bar chart |
<table0>[inclusive_housing] { <col0>[INT]:[units] <col1>[INT]:[PRIMARY] <col2>[KEY]:[INSERT] } | SELECT COUNT( * ) FROM inclusive_housing; | How many inclusive housing units exist in the 'inclusive_housing' table? |
<table0>[table_22904707_1] { <col0>[us_viewers__million]:[VARCHAR] } | SELECT us_viewers__million_ FROM `<table0>` WHERE no = 63 | How many million viewers did episode number 63 have? |
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <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>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_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>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[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, SUM( `<col0>` ) FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) | For those employees who did not have any job in the past, show me about the distribution of hire_date and the sum of employee_id bin hire_date by time in a bar chart.
|
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table2>[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] } <table3>[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] } <table4>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table5>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table6>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table7>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table8>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table9>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } | SELECT MAX( `<table3>`.admissionweight ) FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '003-37225' ) AND NOT `<table3>`.admissionweight IS NULL AND DATETIME( `<table3>`.unitadmittime ) >= DATETIME( CURRENT_TIME( ), '-6 year' ) GROUP BY STRFTIME( '%y', `<table3>`.unitadmittime ) | what was the yearly maximum value of weight for patient 003-37225 since 6 years ago? |
<table0>[table_name_86] { <col0>[rank]:[INTEGER] <col1>[silver]:[VARCHAR] <col2>[total]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 0 AND `<col2>` > 2 | What is the rank for the nation with 0 silver medals and a total larger than 2? |
<table0>[table_57991] { <col0>[Player]:[text] <col1>[Car]:[real] <col2>[Yards]:[real] <col3>[Avg]:[real] <col4>[real]:[Long] } | SELECT MIN( "Avg." ) FROM `<table0>` WHERE "Player" = 'kevin swayne' AND "Long" > '7' | How many yards did kevin swayne average, with a long carry over 7?
|
<table0>[table_57247] { <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 AVG( "Crowd" ) FROM `<table0>` WHERE "Home `<col2>` score" = '11.14 ( 80 )' | What was the average amount of spectators when the home team scored 11.14 (80)?
|
<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 All_Home, `<col0>` FROM `<table0>` GROUP BY ACC_Road, `<col9>` ORDER BY `<col0>` | Draw a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road, and could you rank by the Y in asc? |
<table0>[mining_waste] { <col0>[INT]:[operation_id] <col1>[INT]:[waste_amount] <col2>[FLOAT]:[INSERT] } | SELECT SUM( waste_amount ) FROM mining_waste; | What is the total amount of waste generated by the mining industry in South Africa? |
<table0>[products] { <col0>[product_id]:[INT] <col1>[product_category]:[VARCHAR] <col2>[sustainability_rating]:[FLOAT] <col3>[country]:[VARCHAR] } | INSERT INTO products ( product_id, product_category, sustainability_rating, country ) VALUES ( 4, 'perfume', 4.2, 'Italy' ); | Insert a new 'perfume' product from 'Italy' with a sustainability rating of 4.2 into the 'products' table? |
<table0>[table_25703_2] { <col0>[birth_2012]:[INTEGER] <col1>[death_2012]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 163 | What were the total 2012 births when the 2012 deaths were 163?
|
<table0>[table_430] { <col0>[State]:[text] <col1>[Preliminaries]:[text] <col2>[Interview]:[text] <col3>[Swimsuit]:[text] <col4>[Evening]:[Gown] <col5>[text]:[Average] } | SELECT "Average" FROM `<table0>` WHERE "Swimsuit" = '8.503' | What is the average score when the swimsuit score is 8.503?
|
<table0>[GarmentSales] { <col0>[garment_id]:[INT] <col1>[date]:[DATE] <col2>[revenue]:[DECIMAL] } | SELECT garment_id, date, AVG( revenue ) OVER ( PARTITION BY garment_id ORDER BY date ROWS BETWEEN 2 PRECEDING AND CURRENT ROW ) AS moving_average FROM GarmentSales; | Calculate the moving average of revenue for each garment for the last 3 months. |
<table0>[waste_generation] { <col0>[country]:[TEXT] <col1>[year]:[INT] } | SELECT country, SUM( `<table0>` ) FROM `<table0>` WHERE `<col1>` BETWEEN 2017 AND 2021 GROUP BY country; | What is the total waste generation in each country for the last 5 years? |
<table0>[table_71392] { <col0>[Rank]:[real] <col1>[Lane]:[real] <col2>[text]:[Nationality] <col3>[text]:[Time] } | SELECT MIN( "Rank" ) FROM `<table0>` WHERE "Name" = 'jens kruppa' AND "Lane" > '2' | What is the lowest rank of Jens Kruppa in a lane larger than 2?
|
<table0>[dorm] { <col0>[dormid]:[number] <col1>[dorm_name]:[text] <col2>[student_capacity]:[number] <col3>[gender]:[text] } <table1>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advisor]:[number] <col7>[city_code]:[text] } <table2>[dorm_amenity] { <col0>[amenid]:[number] <col1>[amenity_name]:[text] } <table3>[lives_in] { <col0>[stuid]:[number] <col1>[dormid]:[number] <col2>[room_number]:[number] } <table4>[has_amenity] { <col0>[dormid]:[number] <col1>[amenid]:[number] } | SELECT AVG( T1.age ) FROM `<table1>` AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN `<table0>` AS T3 ON T3.`<table0>`id = T2.`<table0>`id WHERE T3.`<table1>`_capacity = ( SELECT MAX( `<table1>`_capacity ) FROM `<table0>` ) | Find the average age of students who are living in the dorm with the largest capacity.
|
<table0>[files] { <col0>[f_id]:[number] <col1>[artist_name]:[text] <col2>[file_size]:[text] <col3>[duration]:[text] <col4>[formats]:[text] } <table1>[genre] { <col0>[g_name]:[text] <col1>[rating]:[text] <col2>[most_popular_in]:[text] } <table2>[artist] { <col0>[artist_name]:[text] <col1>[country]:[text] <col2>[gender]:[text] <col3>[preferred_genre]:[text] } <table3>[song] { <col0>[song_name]:[text] <col1>[artist_name]:[text] <col2>[country]:[text] <col3>[f_id]:[number] <col4>[genre_is]:[text] <col5>[rating]:[number] <col6>[languages]:[text] <col7>[releasedate]:[time] <col8>[resolution]:[number] } | SELECT DISTINCT T1.file_size, T1.formats FROM `<table0>` AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 | What are the file sizes and formats for all songs with a resolution lower than 800?
|
<table0>[table_name_79] { <col0>[team_2]:[VARCHAR] } | SELECT 1 AS st_leg FROM `<table0>` WHERE `<col0>` = "slovan liberec" | What was the 1st leg for Team 2, Slovan Liberec? |
<table0>[Episode] { <col0>[episode_id]:[text] <col1>[series]:[text] <col2>[season]:[integer] <col3>[episode]:[integer] <col4>[number_in_series]:[integer] <col5>[title]:[text] <col6>[summary]:[text] <col7>[air_date]:[date] <col8>[episode_image]:[text] <col9>[rating]:[real] <col10>[votes]:[integer] } <table1>[Keyword] { <col0>[episode_id]:[text] <col1>[keyword]:[text] } <table2>[Person] { <col0>[person_id]:[text] <col1>[name]:[text] <col2>[birthdate]:[date] <col3>[birth_name]:[text] <col4>[birth_place]:[text] <col5>[birth_region]:[text] <col6>[birth_country]:[text] <col7>[height_meters]:[real] <col8>[nickname]:[text] } <table3>[Award] { <col0>[award_id]:[integer] <col1>[organization]:[text] <col2>[year]:[integer] <col3>[award_category]:[text] <col4>[award]:[text] <col5>[series]:[text] <col6>[episode_id]:[text] <col7>[person_id]:[text] <col8>[role]:[text] <col9>[result]:[text] } <table4>[Credit] { <col0>[episode_id]:[text] <col1>[person_id]:[text] <col2>[category]:[text] <col3>[role]:[text] <col4>[credited]:[text] } <table5>[Vote] { <col0>[episode_id]:[text] <col1>[stars]:[integer] <col2>[votes]:[integer] <col3>[percent]:[real] } | SELECT T2.air_date FROM `<table5>` AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id GROUP BY T2.episode_id ORDER BY SUM( T1.votes ) DESC LIMIT 1 | For the episode with the most votes, give its air date. |
<table0>[OrganicWaste] { <col0>[Region]:[VARCHAR] <col1>[WasteQuantity]:[INT] } | SELECT Region, `<col1>` FROM `<table0>` WHERE `<col0>` IN ( 'World', 'Europe' ); | What is the total amount of organic waste generated in the world, and how does that compare to the amount of organic waste generated in Europe? |
<table0>[table_204_159] { <col0>[number]:[name] <col1>[text]:[nation] <col2>[text]:[position] <col3>[text]:[league] <col4>[apps]:[number] <col5>[league]:[goals] <col6>[number]:[cup] <col7>[apps]:[number] <col8>[cup]:[goals] <col9>[number]:[total] <col10>[apps]:[number] <col11>[total]:[goals] } | SELECT COUNT( "name" ) FROM `<table0>` WHERE "position" = 'fw' | how many players are fws ? |
<table0>[table_name_29] { <col0>[total]:[INTEGER] <col1>[gold]:[VARCHAR] <col2>[nation]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1 AND `<col2>` = "czechoslovakia" | Which Total is the highest one that has a Gold of 1, and a Nation of czechoslovakia? |
<table0>[table_11618] { <col0>[Rank]:[real] <col1>[Movie]:[text] <col2>[Year]:[real] <col3>[Studio]:[text] <col4>[Opening]:[Weekend] <col5>[Net]:[Gross] } | SELECT COUNT( "Year" ) FROM `<table0>` WHERE "Rank" < '7' AND "Studio( s )" = 'red chillies entertainment' AND "Opening Weekend `<col5>` Gross" = '52,93,00,000' | What's the total number of years with a Rank that smaller than 7, Studio of Red Chillies Entertainment, and Opening Weekend Net Gross of 52,93,00,000?
|
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostTypes] { <col0>[number]:[text] } <table3>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table4>[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] } <table5>[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] } <table6>[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] } <table7>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table8>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table9>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table10>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table11>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table12>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table13>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table14>[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] } <table15>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table16>[VoteTypes] { <col0>[number]:[text] } <table17>[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] } <table18>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table19>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table20>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table21>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table22>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table23>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table24>[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] } <table25>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table26>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <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>[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] } | SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS Rank, Id, DisplayName, Reputation, WebsiteUrl, Location FROM `<table6>` WHERE Location LIKE '%Thailand%' LIMIT 25 | Top 25 users from Thailand. |
<table0>[TicketSpending] { <col0>[FanID]:[INT] <col1>[Gender]:[VARCHAR] <col2>[255]:[TotalSpent] <col3>[DECIMAL]:[INSERT] } | SELECT Gender, AVG( TotalSpent ) as Avg_Ticket_Spending FROM `<table0>` GROUP BY Gender; | What is the average ticket spending by fan demographic? |
<table0>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table1>[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_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table3>[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] } <table4>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table5>[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] } <table6>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table7>[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] } <table8>[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] } <table9>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table10>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table11>[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] } <table12>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table13>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table14>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table15>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table16>[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] } | SELECT SUM( `<table11>`.value ) FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table1>`.icustay_id FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.subject_id = 28443 ) ) AND STRFTIME( '%y-%m-%d', `<table11>`.charttime ) = '2105-12-18' | tell me what the total output on 12/18/2105 is for patient 28443. |
<table0>[Region] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] } <table1>[Farm] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[region_id] <col2>[INT]:[temperature] <col3>[INT]:[FOREIGN] <col4>[KEY]:[region_id] <col5>[REFERENCES]:[Region] } | SELECT `<table0>`.name, DATE_FORMAT( Farm.date, '%Y-%m' ) AS month, AVG( Farm.temperature ) FROM `<table0>` INNER JOIN Farm ON `<table0>`.id = Farm.region_id GROUP BY `<table0>`.name, MONTH( Farm.date ), YEAR( Farm.date ); | What is the average water temperature by region and season? |
<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>[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>[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 `<table0>`.subject_id ) FROM `<table0>` WHERE `<table0>`.diagnosis = "GUILLAIN BARRE SYNDROME" AND `<table0>`.dob_year < "2052" | how many patients born before the year 2052 had guillain barre as the primary disease?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[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 `<table3>`.age < "77" AND procedures.short_title = "Radiotherapeut proc NEC" | what is the number of patients whose age is less than 77 and procedure short title is radiotherapeut proc nec? |
<table0>[yoga_classes] { <col0>[INT]:[user_id] <col1>[INT]:[heart_rate] <col2>[INT]:[INSERT] } <table1>[users] { <col0>[INT]:[experience] <col1>[INT]:[INSERT] } | SELECT MAX( heart_rate ) FROM `<table0>` INNER JOIN users ON `<table0>`.user_id = users.id WHERE users.experience > 5; | What is the maximum heart rate recorded during yoga sessions, for users with more than 5 years of experience? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[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>[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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.admission_type = "EMERGENCY" AND procedures.short_title = "Replace small bowel tube" | how many patients were admitted in emergency for replacement of small bowel tube? |
<table0>[justice_streams] { <col0>[week]:[INT] <col1>[streams_in_week]:[INT] } | SELECT `<col1>` FROM `<table0>` WHERE `<col0>` = 1; | How many streams did the 2021 album release 'Justice' by Justin Bieber receive in its first week? |
<table0>[table_name_30] { <col0>[paper_type]:[VARCHAR] <col1>[denomination]:[VARCHAR] <col2>[date_of_issue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "$0.50" AND `<col2>` = "4 february 2005" | Which Paper Type has a Denomination of $0.50 and Date of Issue 4 February 2005? |
<table0>[table_1756264_2] { <col0>[company_name]:[VARCHAR] <col1>[parent__holding__company]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "POSTERMOBILE LIMITED" | How many companies have Postermobile Limited as a parent company? |
<table0>[table_2005] { <col0>[Institution]:[text] <col1>[Location]:[text] <col2>[Founded]:[real] <col3>[Affiliation]:[text] <col4>[Enrollment]:[real] <col5>[Year]:[Joined] <col6>[real]:[Nickname] <col7>[text]:[Conference] } | SELECT "Location" FROM `<table0>` WHERE "Conference" = 'American Athletic Conference' | Where is the University that plays in the American Athletic Conference?
|
<table0>[adaptation_projects] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[location]:[VARCHAR] <col4>[255]:[budget] <col5>[FLOAT]:[start_date] <col6>[DATE]:[end_date] <col7>[DATE]:[INSERT] } | SELECT * FROM adaptation_projects; | List all adaptation projects in 'adaptation_projects' table |
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table3>[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] } <table4>[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] } <table5>[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] } <table6>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table7>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table8>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table9>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <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>[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] } <table13>[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] } <table14>[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] } <table15>[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] } <table16>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } | SELECT COUNT( DISTINCT `<table5>`.subject_id ) FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.careunit = 'csru' AND DATETIME( `<table12>`.intime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-0 year' ) ) | what's the total number of patients in careunit csru during this year? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[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>[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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Myelodysplastic syndrome, unspecified" AND prescriptions.drug_type = "BASE" | Calculate the total number of patients who had myelodysplastic syndrome (unspecified) that were treated with base drug
|
<table0>[table_21377473_7] { <col0>[stadium]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3 - 1 Hughes 64'" | When 3 - 1 hughes 64' is the score what is the stadium? |
<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>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table3>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table4>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[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>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } | SELECT HIRE_DATE, `<col8>` FROM `<table5>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY `<col5>` | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a line chart about the change of commission_pct over hire_date , and sort X-axis from low to high order.
|
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table3>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <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>[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] } | SELECT HIRE_DATE, SUM( `<col9>` ) FROM `<table6>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, a bar chart shows the distribution of hire_date and the sum of manager_id bin hire_date by weekday.
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[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>[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>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.insurance = "Government" AND procedures.short_title = "Open incis hern-grft NEC" | provide me the number of government insurance patients who had other open incisional hernia repair with graft or prosthesis.
|
<table0>[table_name_30] { <col0>[country]:[VARCHAR] <col1>[film_title_used_in_nomination]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "the garden of the finzi-continis" | Where was the film about the garden of the finzi-continis made?
|
<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>[diagnoses] { <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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT MIN( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.marital_status = "DIVORCED" AND `<table0>`.diagnosis = "COPD EXACERBATION" | calculate the minimum age of divorced patients who have copd exacerbation primary disease.
|
<table0>[least_progress] { <col0>[country]:[TEXT] <col1>[year]:[INT] <col2>[progress]:[FLOAT] } | SELECT country, MIN( `<col2>` ) FROM `<table0>` WHERE `<col1>` BETWEEN 2016 AND 2021 GROUP BY `<col0>` ORDER BY `<col2>` ASC; | Which countries have made the least progress in climate adaptation in the last 5 years? |
<table0>[domain_keyword] { <col0>[int]:[kid] } <table1>[publication] { <col0>[abstract]:[varchar] <col1>[cid]:[int] <col2>[citation_num]:[int] <col3>[jid]:[int] <col4>[pid]:[int] <col5>[reference_num]:[int] <col6>[title]:[varchar] <col7>[year]:[int] } <table2>[domain_publication] { <col0>[int]:[pid] } <table3>[conference] { <col0>[cid]:[int] <col1>[homepage]:[varchar] <col2>[name]:[varchar] } <table4>[keyword] { } <table5>[cite] { <col0>[cited]:[int] <col1>[citing]:[int] } <table6>[domain_author] { <col0>[aid]:[int] } <table7>[domain] { <col0>[int]:[name] } <table8>[journal] { <col0>[homepage]:[varchar] <col1>[jid]:[int] <col2>[name]:[varchar] } <table9>[author] { <col0>[aid]:[int] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table10>[writes] { <col0>[aid]:[int] <col1>[pid]:[int] } <table11>[domain_journal] { <col0>[int]:[jid] } <table12>[domain_conference] { <col0>[cid]:[int] } <table13>[organization] { <col0>[continent]:[varchar] <col1>[homepage]:[varchar] <col2>[name]:[varchar] <col3>[oid]:[int] } <table14>[publication_keyword] { <col0>[kid]:[int] <col1>[pid]:[int] } | SELECT COUNT( DISTINCT ( publication.title ) ) FROM conference, publication WHERE conference.name = 'VLDB' AND publication.cid = conference.cid | return me the number of papers on VLDB conference . |
<table0>[table_2333416_2] { <col0>[year]:[VARCHAR] <col1>[position]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "78th" | What year did Ken Bouchard finish in 78th place? |
<table0>[battery_storage] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[capacity] <col2>[FLOAT]:[warranty] <col3>[INT]:[manufacturer] <col4>[VARCHAR]:[255] } | DELETE FROM `<table0>` WHERE warranty < 8; | Delete records in the "battery_storage" table where the warranty is less than 8 years |
<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>[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] } <table2>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table3>[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] } <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>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table6>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table7>[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] } <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>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table11>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table12>[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] } <table13>[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] } <table14>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table15>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table16>[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] } | SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table5>`.charttime, admissions.hadm_id FROM `<table5>` JOIN admissions ON `<table5>`.hadm_id = admissions.hadm_id WHERE `<table5>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14>` WHERE `<table14>`.short_title = 'cirrhosis of liver nos' ) AND STRFTIME( '%y', `<table5>`.charttime ) <= '2104' ) AS t1 JOIN ( SELECT admissions.subject_id, `<table4>`.drug, `<table4>`.startdate, admissions.hadm_id FROM `<table4>` JOIN admissions ON `<table4>`.hadm_id = admissions.hadm_id WHERE admissions.age >= 60 AND STRFTIME( '%y', `<table4>`.startdate ) <= '2104' ) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND t1.hadm_id = t2.hadm_id GROUP BY t2.drug ) AS t3 WHERE t3.c1 <= 3 | what are the three most frequent drugs that are prescribed in the same hospital visit to the patients aged 60 or above after they had been diagnosed with cirrhosis of liver nos, until 2104?
|
<table0>[table_name_12] { <col0>[minister]:[VARCHAR] <col1>[end_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "31 july 2004" | Name the minister for end date of 31 july 2004
|
<table0>[table_11964047_7] { <col0>[record]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "L 109–116 2 OT" | what records have a score of l 109–116 2 ot |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table2>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table3>[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] } <table4>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table5>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table6>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[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>[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>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table11>[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] } <table12>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table13>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[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>[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] } <table16>[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] } | SELECT COUNT( * ) > 0 FROM `<table1>` WHERE `<table1>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 11779 ) ) AND `<table1>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>`.label = 'temperature c ( calc )' AND `<table13>`.linksto = '`<table1>`' ) AND `<table1>`.valuenum BETWEEN temperature_lower AND temperature_upper AND DATETIME( `<table1>`.charttime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) AND STRFTIME( '%m', `<table1>`.charttime ) = '02' | does the temperature c (calc) of patient 11779 in 02/last year have been normal? |
<table0>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table1>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table2>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table3>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table4>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table5>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table6>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table7>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table8>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table9>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table10>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table11>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col2>[stop_days]:[text] <col3>[stop_airport]:[text] <col4>[arrival_time]:[int] <col5>[arrival_airline]:[text] <col6>[arrival_flight_number]:[int] <col7>[departure_time]:[int] <col8>[departure_airline]:[text] <col9>[departure_flight_number]:[int] <col10>[stop_time]:[int] } <table12>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table13>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table14>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <col2>[airport_location]:[text] <col3>[state_code]:[varchar] <col4>[country_name]:[varchar] <col5>[time_zone_code]:[varchar] <col6>[minimum_connect_time]:[int] } <table15>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table16>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table17>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text] <col7>[no_discounts]:[text] } <table18>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table19>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_direction_cost]:[int] <col7>[round_trip_cost]:[int] <col8>[round_trip_required]:[varchar] } <table20>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table21>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int] <col11>[pay_load]:[int] <col12>[cruising_speed]:[int] <col13>[range_miles]:[int] <col14>[pressurized]:[varchar] } <table22>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table23>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table24>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } | SELECT DISTINCT `<table21>`_code FROM `<table21>` WHERE `<col10>` = ( SELECT MAX( AIRCRAFTalias1.capacity ) FROM `<table21>` AS AIRCRAFTalias1 ) | what is the aircraft type with the greatest seating capacity
|
<table0>[table_49922] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] } | SELECT "Away team" FROM `<table0>` WHERE "Home team" = 'ipswich town' AND "Date" = '6 february 1986' | What is Away Team, when Home Team is 'Ipswich Town', and when Date is '6 February 1986'?
|
<table0>[table_name_27] { <col0>[opponent]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "6-9" | What opponent has a record of 6-9?
|
<table0>[security_incidents] { <col0>[INT]:[country] <col1>[VARCHAR]:[incident_count] <col2>[INT]:[incident_date] <col3>[DATE]:[INSERT] } | SELECT country, COUNT( * ) as incident_count FROM `<table0>` WHERE incident_date >= DATE_SUB( CURRENT_DATE, INTERVAL 1 MONTH ) GROUP BY country ORDER BY incident_count DESC LIMIT 3; | What are the top 3 countries with the most security incidents in the past month, based on the 'security_incidents' table? |
<table0>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table1>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table4>[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] } <table5>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table6>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table7>[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] } <table8>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_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>[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] } <table11>[requirement] { <col0>[requirement_id]:[int] } <table12>[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] } <table13>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table14>[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] } <table15>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table16>[area] { <col0>[course_id]:[int] } <table17>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Joel Tropp%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | What classes is Dr. Joel Tropp teaching next semester ?
|
<table0>[table_39070] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Game]:[site] <col5>[text]:[Record] <col6>[text]:[Attendance] } | SELECT "Date" FROM `<table0>` WHERE "Game site" = 'lincoln financial field' | On what date was the game at Lincoln Financial Field?
|
<table0>[labor_rights_advocacy] { <col0>[la_id]:[SERIAL] <col1>[PRIMARY]:[KEY] <col2>[union_id]:[VARCHAR] <col3>[issue]:[TEXT] <col4>[action]:[TEXT] <col5>[date]:[DATE] } | DELETE FROM `<table0>` WHERE `<col4>` = 'Protest'; | Delete all records with an action of 'Protest' from the labor_rights_advocacy table |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] { <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>[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>[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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.marital_status = "SINGLE" AND diagnoses.short_title = "Myopia" | count the number of patients whose marital status is single and diagnoses short title is myopia? |
<table0>[members] { <col0>[INT]:[country] <col1>[VARCHAR]:[INSERT] } <table1>[workouts] { <col0>[INT]:[member_id] <col1>[INT]:[date] <col2>[DATE]:[heart_rate] <col3>[INT]:[INSERT] } | SELECT AVG( heart_rate ) FROM `<table0>` JOIN workouts ON `<table0>`.id = workouts.member_id WHERE `<table0>`.country = 'Australia' AND HOUR( workouts.date ) BETWEEN 17 AND 23; | What is the average heart rate of members from Australia during evening workouts? |
<table0>[table_name_93] { <col0>[format]:[VARCHAR] <col1>[region]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "china" | Which Format is listed that has a Region of China?
|
<table0>[table_204_565] { <col0>[number]:[game] <col1>[number]:[date] <col2>[text]:[opponent] <col3>[text]:[venue] <col4>[text]:[result] <col5>[text]:[attendance] <col6>[number]:[goalscorers] } | SELECT "date" FROM `<table0>` ORDER BY "attendance" LIMIT 1 | which game was attended by the least number of people ?
|
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table3>[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] } <table4>[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] } <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>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table7>[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] } <table8>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table9>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table10>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table11>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table12>[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] } <table13>[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] } <table14>[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] } <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>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } | SELECT `<table13>`.dose_val_rx FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.subject_id = 9566 AND `<table3>`.dischtime IS NULL ) AND `<table13>`.drug = 'isotonic sodium chloride' ORDER BY `<table13>`.startdate LIMIT 1 | what was the isotonic sodium chloride dose that was prescribed to patient 9566 in this hospital encounter for the first time? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[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>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table3>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table4>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table5>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table6>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table7>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table8>[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] } <table9>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } | SELECT MIN( t1.c1 ) FROM ( SELECT SUM( `<table0>`.`<table0>` ) AS c1 FROM `<table0>` WHERE `<table0>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.`<table1>`unitstayid IN ( SELECT `<table6>`.`<table1>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`name = 's/p surgery for cancer' ) ) GROUP BY `<table0>`.`<table1>`healthsystemstayid ) AS t1 | what's the minimum hospital cost if there is s/p surgery for cancer? |
<table0>[startups] { <col0>[INT]:[name] <col1>[TEXT]:[founding_year] <col2>[INT]:[funding] <col3>[FLOAT]:[INSERT] } | SELECT founding_year, SUM( funding ) FROM `<table0>` GROUP BY founding_year; | What is the total funding received by startups founded in each year? |
<table0>[news] { <col0>[INT]:[title] <col1>[TEXT]:[category] <col2>[TEXT]:[INSERT] } | DELETE FROM `<table0>` WHERE category = 'Politics' AND country = 'United States'; | Delete all news articles about politics in the United States. |
<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>[diagnoses] { <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>[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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.marital_status = "SINGLE" AND diagnoses.long_title = "Intestinal bypass or anastomosis status" | provide the number of patients whose marital status is single and diagnoses long title is intestinal bypass or anastomosis status?
|