schema
stringlengths 20
14.6k
| query
stringlengths 17
2.58k
| question
stringlengths 8
1.06k
|
---|---|---|
<table0>[Staff_Roles] { <col0>[role_code]:[VARCHAR] <col1>[role_description]:[VARCHAR] } <table1>[Document_Types] { <col0>[document_type_code]:[VARCHAR] <col1>[document_description]:[VARCHAR] } <table2>[Projects] { <col0>[project_id]:[INTEGER] <col1>[organisation_id]:[INTEGER] <col2>[project_details]:[VARCHAR] } <table3>[Organisations] { <col0>[organisation_id]:[INTEGER] <col1>[organisation_type]:[VARCHAR] <col2>[organisation_details]:[VARCHAR] } <table4>[Tasks] { <col0>[task_id]:[INTEGER] <col1>[project_id]:[INTEGER] <col2>[task_details]:[VARCHAR] <col3>[255]:[Agree] <col4>[Objectives]:[VARCHAR] } <table5>[Grants] { <col0>[grant_id]:[INTEGER] <col1>[organisation_id]:[INTEGER] <col2>[grant_amount]:[DECIMAL] <col3>[grant_start_date]:[DATETIME] <col4>[grant_end_date]:[DATETIME] <col5>[other_details]:[VARCHAR] } <table6>[Organisation_Types] { <col0>[organisation_type]:[VARCHAR] <col1>[organisation_type_description]:[VARCHAR] } <table7>[Project_Outcomes] { <col0>[project_id]:[INTEGER] <col1>[outcome_code]:[VARCHAR] <col2>[outcome_details]:[VARCHAR] } <table8>[Project_Staff] { <col0>[staff_id]:[DOUBLE] <col1>[project_id]:[INTEGER] <col2>[role_code]:[VARCHAR] <col3>[date_from]:[DATETIME] <col4>[date_to]:[DATETIME] <col5>[other_details]:[VARCHAR] } <table9>[Research_Staff] { <col0>[staff_id]:[INTEGER] <col1>[employer_organisation_id]:[INTEGER] <col2>[staff_details]:[VARCHAR] } <table10>[Research_Outcomes] { <col0>[outcome_code]:[VARCHAR] <col1>[outcome_description]:[VARCHAR] } <table11>[Documents] { <col0>[document_id]:[INTEGER] <col1>[document_type_code]:[VARCHAR] <col2>[grant_id]:[INTEGER] <col3>[sent_date]:[DATETIME] <col4>[response_received_date]:[DATETIME] <col5>[other_details]:[VARCHAR] } | SELECT date_from, COUNT( `<col3>` ) FROM `<table8>` ORDER BY COUNT( `<col3>` ) | When do all the researcher role staff start to work? Bin the time into weekday interval and count them with a bar chart, I want to list in asc by the Y-axis please. |
<table0>[news_organizations] { <col0>[INT]:[name] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[articles_published] <col3>[INT]:[INSERT] } | SELECT name, country, articles_published FROM `<table0>` WHERE country = 'Africa' ORDER BY articles_published DESC LIMIT 3; | Who are the top 3 news organizations in Africa in terms of articles published in 2021? |
<table0>[table_29639] { <col0>[Season]:[text] <col1>[Episodes]:[real] <col2>[Timeslot]:[EST] <col3>[text]:[Season] <col4>[premiere]:[text] <col5>[Season]:[finale] <col6>[text]:[season] <col7>[text]:[Rank] <col8>[text]:[Viewers] <col9>[millions]:[text] } | SELECT "Season premiere" FROM `<table0>` WHERE "Season finale" = 'May 22, 2007' | What season premiere date had a finale on may 22, 2007? |
<table0>[Vessels] { <col0>[INT]:[VARCHAR] <col1>[Type]:[VARCHAR] <col2>[Safety_Inspections]:[INT] <col3>[Engine_Capacity]:[INT] } | SELECT Name, Engine_Capacity, `<col2>` FROM `<table0>` WHERE `<col2>` = 0 OR `<col3>` > 4000 AND `<col1>` != 'Passenger Ship'; | Display the vessel names, engine capacities, and safety inspection status for vessels that have not had any safety inspections or have an engine capacity greater than 4000, excluding passenger ships? |
<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>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table3>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table4>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table5>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_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, COUNT( `<col5>` ) FROM `<table6>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) ORDER BY COUNT( `<col5>` ) | For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday, and display y axis in asc order. |
<table0>[table_name_63] { <col0>[place]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 69 - 70 - 72 = 211 | what country has a score of 69-70-72=211? |
<table0>[service_union] { <col0>[employee_id]:[INT] <col1>[department]:[VARCHAR] <col2>[salary]:[DECIMAL] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Cleaning'; | What is the average salary of 'Cleaning' staff in the 'service_union' table? |
<table0>[table_name_29] { } | SELECT 1992 FROM `<table0>` WHERE 1990 = "grand slams" | What is 1992, when 1990 is "Grand Slams"? |
<table0>[table_48323] { <col0>[Year]:[real] <col1>[Venue]:[text] <col2>[Winner]:[text] <col3>[Runner]:[text] <col4>[Place]:[text] } | SELECT "Third Place" FROM `<table0>` WHERE "Year" = '2012' | Who took third place in 2012?
|
<table0>[africa_scores] { <col0>[region]:[TEXT] <col1>[index_score]:[INT] } | SELECT region, index_score, COUNT( * ) FROM `<table0>` GROUP BY `<col1>` ORDER BY index_score; | What is the distribution of digital divide index scores by region in Africa? |
<table0>[greenhouse_gas_emissions] { <col0>[country]:[VARCHAR] <col1>[255]:[co2_emissions] <col2>[DECIMAL]:[year] <col3>[INT]:[continent] <col4>[VARCHAR]:[255] } <table1>[continent_map] { <col0>[country]:[VARCHAR] <col1>[255]:[continent] <col2>[VARCHAR]:[255] } | SELECT c.continent, SUM( g.co2_emissions ) as total_emissions FROM `<table0>` g INNER JOIN continent_map c ON g.country = c.country GROUP BY c.continent; | What is the total CO2 emissions for each continent in the 'greenhouse_gas_emissions' table? |
<table0>[rural_clinics] { <col0>[INT]:[region] <col1>[VARCHAR]:[255] <col2>[name]:[VARCHAR] <col3>[255]:[patient_volume] <col4>[INT]:[INSERT] } | SELECT `<col2>` FROM `<table0>` WHERE region = 'Appalachian' ORDER BY patient_volume ASC LIMIT 1; | What is the name of the rural clinic with the lowest patient volume in the Appalachian region? |
<table0>[ocean_acidification] { <col0>[INT]:[location] <col1>[VARCHAR]:[FLOAT] <col2>[date]:[DATE] } | INSERT INTO ocean_acidification ( location, pH, date ) VALUES ( 'Pacific Ocean', 7.8, '2022-03-02' ); | Insert a new record in the table "ocean_acidification" with values 'Pacific Ocean', 7.8, '2022-03-02' |
<table0>[trees] { <col0>[tree_id]:[INT] <col1>[region_id]:[INT] <col2>[year]:[INT] } | SELECT region_id, year, SUM( num_`<table0>` ) AS total_`<table0>`, RANK( ) OVER ( PARTITION BY `<col2>` ORDER BY SUM( num_`<table0>` ) DESC ) AS tree_rank FROM `<table0>` GROUP BY region_id, `<col2>` ORDER BY year, tree_rank ASC; | For each year, find the total number of trees in each region and rank them in descending order of total trees. |
<table0>[ocean_map] { <col0>[project]:[VARCHAR] <col1>[depth]:[FLOAT] } | SELECT project, AVG( `<col1>` ) as avg_depth FROM `<table0>` GROUP BY project; | What is the average depth of the ocean floor for each mapping project, along with the project name? |
<table0>[VehicleSafetyTests] { <col0>[INT]:[Vehicle] <col1>[VARCHAR]:[TestDate] <col2>[DATE]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE Vehicle = 'Ford Mustang' AND TestDate >= DATEADD( year, -3, GETDATE( ) ); | How many safety tests has the Ford Mustang passed in the last 3 years? |
<table0>[table_name_48] { <col0>[total]:[VARCHAR] <col1>[silver]:[VARCHAR] <col2>[bronze]:[VARCHAR] <col3>[rank]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 13 AND `<col3>` = "8" AND `<col1>` < 11 | How many Total(s) are there, when the number of Bronze is greater than 13, when the Rank is 8, and when the number of Silver is less than 11? |
<table0>[students] { <col0>[INT]:[department] <col1>[VARCHAR]:[255] } | SELECT department, COUNT( * ) FROM `<table0>` GROUP BY department; | How many graduate students are there in each department? |
<table0>[table_name_39] { <col0>[driver]:[VARCHAR] <col1>[time_retired]:[VARCHAR] <col2>[constructor]:[VARCHAR] <col3>[grid]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "maserati" AND `<col3>` < 6 AND `<col1>` = "+2 laps" | Who was driving the Maserati with a Grid smaller than 6, and a Time/Retired of +2 laps? |
<table0>[table_1851] { <col0>[Main]:[contestant] <col1>[text]:[contestant] <col2>[Yaar]:[Pyaar] <col3>[text]:[Date] <col4>[performed]:[text] <col5>[Scores]:[individual] <col6>[judge]:[text] <col7>[Total]:[score] <col8>[week]:[text] <col9>[Position]:[text] <col10>[Status]:[text] } | SELECT "Total score/week" FROM `<table0>` WHERE "Date performed" = 'August 14' AND "Position" = 'Bottom 2' | What was the total score / week of the contestant who placed in the bottom 2 on august 14?
|
<table0>[court_cases_2] { <col0>[court_type]:[VARCHAR] <col1>[year]:[INT] <col2>[case_type]:[VARCHAR] <col3>[num_cases]:[INT] } | SELECT court_type, SUM( `<col3>` ) as total_cases FROM `<table0>` WHERE `<col1>` = 2021 GROUP BY court_type; | What was the total number of criminal and civil cases heard in each court last year? |
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table2>[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] } <table3>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table4>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table5>[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] } <table6>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table7>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table8>[requirement] { <col0>[requirement_id]:[int] } <table9>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table10>[semester] { <col0>[semester_id]:[int] } <table11>[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] } <table12>[area] { <col0>[course_id]:[int] } <table13>[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] } <table14>[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] } <table15>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table16>[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] } <table17>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BIOSTAT' AND course.number = 666 AND semester.semester_id = course_offering.semester ORDER BY semester.year DESC LIMIT 1 | BIOSTAT 666 was offered last time when ? |
<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_Games, `<col0>` FROM `<table0>` | A pie chart shows the proportion of All_Games and Team_ID.
|
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[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] } <table2>[PostTypes] { <col0>[number]:[text] } <table3>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table4>[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] } <table5>[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] } <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>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table9>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table10>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table11>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table12>[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] } <table13>[PostHistoryTypes] { <col0>[number]:[text] } <table14>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table15>[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] } <table16>[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] } <table17>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table18>[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] } <table19>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table20>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table21>[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] } <table22>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table23>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table24>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table25>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table26>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table27>[VoteTypes] { <col0>[number]:[text] } <table28>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } | WITH Raw AS ( SELECT Id, PostId, `<col7>` AS Tags, UserId, RANK( ) OVER ( PARTITION BY PostId ORDER BY Id ) AS No FROM `<table15>` WHERE `<table15>`TypeId IN ( 3, 6, 9 ) ) SELECT N.UserId AS "user_link", Tags.TagName, COUNT( * ) AS Count FROM Raw AS C, Raw AS N, PostTags, Tags WHERE C.PostId = N.PostId AND C.No + 1 = N.No AND NOT C.Tags LIKE '%<status-review>%' AND N.Tags LIKE '%<status-review>%' AND C.PostId = PostTags.PostId AND PostTags.TagId = Tags.Id AND Tags.TagName LIKE 'status-%' GROUP BY N.UserId, Tags.TagName ORDER BY N.UserId, Tags.TagName | Outcome of status-review s by the tagger. We see the posts which were (re)tagged as 'status-review' in their post history. We group them by their _current_ status-* tagging and by the re-tagger user. So we can estimate the likely outcome of a change request, from the re-tagger SE employee.
|
<table0>[table_name_14] { <col0>[round]:[VARCHAR] <col1>[method]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ko" AND `<col2>` = "alfonse d'amore" | Which Round has a Method of ko, and an Opponent of alfonse d'amore? |
<table0>[table_name_2] { <col0>[round]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ray kurpis" | What round did Ray Kurpis play?
|
<table0>[game] { <col0>[stadium_id]:[int] <col1>[int]:[Season] <col2>[int]:[Date] <col3>[text]:[Home_team] <col4>[text]:[Away_team] <col5>[text]:[Score] <col6>[text]:[Competition] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Home_Games] <col2>[int]:[Average_Attendance] <col3>[real]:[Total_Attendance] <col4>[real]:[Capacity_Percentage] } <table2>[injury_accident] { <col0>[game_id]:[int] <col1>[int]:[Player] <col2>[text]:[Injury] <col3>[text]:[Number_of_matches] <col4>[text]:[Source] } | SELECT Home_team, COUNT( Home_team ) FROM `<table0>` GROUP BY Home_team ORDER BY COUNT( Home_team ) | Show me how many home team by home team in a histogram, and I want to order how many home team in ascending order.
|
<table0>[table_name_87] { <col0>[call_sign]:[VARCHAR] <col1>[state]:[VARCHAR] <col2>[frequency]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "florida" AND `<col2>` = "90.9 fm" | What is the call sign for 90.9 FM which is in Florida?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table2>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "78630" AND prescriptions.drug_type = "ADDITIVE" | what is the number of patients whose diagnoses icd9 code is 78630 and drug type is additive? |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table2>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table3>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table4>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table5>[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] } <table6>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table7>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table8>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table9>[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] } | SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '015-15167' ) ) AND `<table4>`.`<table4>`name = 'tracheal suctioning' AND DATETIME( `<table4>`.`<table4>`time ) <= DATETIME( CURRENT_TIME( ), '-3 year' ) | had patient 015-15167 ever undergone a tracheal suctioning until 3 years ago?
|
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } <table1>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] } | SELECT Snatch, `<col3>` FROM `<table1>` | List the snatch score and clean jerk score of body builders in ascending order of snatch score in a scatter chart |
<table0>[salaries] { <col0>[worker_id]:[INT] <col1>[job_role]:[VARCHAR] <col2>[255]:[location] <col3>[VARCHAR]:[255] <col4>[salary]:[FLOAT] } | SELECT location, job_role, AVG( `<col4>` ) FROM `<table0>` GROUP BY location, job_role; | What is the average salary of workers in the manufacturing industry, grouped by their job role and location? |
<table0>[Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Document_Type_Code]:[CHAR] <col2>[Project_ID]:[INTEGER] <col3>[Document_Date]:[DATETIME] <col4>[Document_Name]:[VARCHAR] <col5>[255]:[Document_Description] <col6>[VARCHAR]:[255] <col7>[Other_Details]:[VARCHAR] } <table1>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[Document_Type_Description] <col3>[VARCHAR]:[255] } <table2>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table3>[Documents_with_Expenses] { <col0>[Document_ID]:[INTEGER] <col1>[Budget_Type_Code]:[CHAR] <col2>[Document_Details]:[VARCHAR] } <table4>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table5>[Statements] { <col0>[Statement_ID]:[INTEGER] <col1>[Statement_Details]:[VARCHAR] } <table6>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[VARCHAR] } | SELECT T1.Project_Details, T1.Project_ID FROM `<table4>` AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID | A bar chart about what is the project id and detail for the project with at least two documents? |
<table0>[Languages] { <col0>[LanguageID]:[int] <col1>[LanguageName]:[varchar] } <table1>[Content] { <col0>[ContentID]:[int] <col1>[ContentType]:[varchar] <col2>[LanguageID]:[int] } | SELECT COUNT( `<table1>`ID ) FROM `<table1>` WHERE `<table1>`Type = 'Documentary' AND `<col2>` = ( SELECT `<col2>` FROM `<table0>` WHERE `<col1>` = 'Hindi' ); | How many pieces of 'Documentary' content are available in the 'Hindi' language? |
<table0>[table_760] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Result]:[text] <col5>[Candidates]:[text] } | SELECT "District" FROM `<table0>` WHERE "Incumbent" = 'James C. Davis' | What district does incumbent james c. davis represent? |
<table0>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table1>[Statements] { <col0>[Statement_ID]:[INTEGER] <col1>[Statement_Details]:[VARCHAR] } <table2>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[Document_Type_Description] <col3>[VARCHAR]:[255] } <table3>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[VARCHAR] } <table4>[Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Document_Type_Code]:[CHAR] <col2>[Project_ID]:[INTEGER] <col3>[Document_Date]:[DATETIME] <col4>[Document_Name]:[VARCHAR] <col5>[255]:[Document_Description] <col6>[VARCHAR]:[255] <col7>[Other_Details]:[VARCHAR] } <table5>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table6>[Documents_with_Expenses] { <col0>[Document_ID]:[INTEGER] <col1>[Budget_Type_Code]:[CHAR] <col2>[Document_Details]:[VARCHAR] } | SELECT Document_Type_Description, COUNT( Document_Type_Description ) FROM `<table2>` AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Type_Description DESC | Return a bar chart showing the number of documents for each document type description, I want to display x axis in desc order.
|
<table0>[table_13609] { <col0>[Year]:[real] <col1>[Finish]:[position] <col2>[text]:[1st] <col3>[day]:[text] <col4>[2nd]:[day] <col5>[text]:[3rd] <col6>[day]:[text] <col7>[4th]:[Day] } | SELECT "Finish position" FROM `<table0>` WHERE "4th Day" = 'bumped robinson' | Which Finish position has a 4th Day of bumped robinson?
|
<table0>[table_name_14] { <col0>[location]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11 november" | What is the location of the race on 11 November?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_ID]:[decimal] } <table3>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table4>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table5>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table6>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } | SELECT PHONE_NUMBER, `<col7>` FROM `<table2>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col4>` | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and salary , and I want to sort by the bar in asc.
|
<table0>[table_204_980] { <col0>[number]:[name] <col1>[text]:[type] <col2>[text]:[elevation] <col3>[ground]:[station] <col4>[number]:[elevation] <col5>[mountain]:[station] <col6>[number]:[slope] <col7>[length]:[number] <col8>[capacity]:[persons] <col9>[hour]:[number] <col10>[construction]:[year] } | SELECT "type" FROM `<table0>` WHERE "name" = 'trainer 1' | is the trainer 1 a cable car or a surface lift ?
|
<table0>[table_name_36] { <col0>[tournament]:[VARCHAR] <col1>[runner_up]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pat cash" | Which Tournament has Pat Cash as a runner-up? |
<table0>[table_name_51] { <col0>[nationality]:[VARCHAR] <col1>[position]:[VARCHAR] <col2>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "center" AND `<col2>` = "mark eaton" | What nationality is mark eaton, center position?
|
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table4>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table5>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table6>[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] } <table7>[VoteTypes] { <col0>[number]:[text] } <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>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table10>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table11>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <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>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table14>[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] } <table15>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table16>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table17>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table18>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table19>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table20>[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] } <table21>[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] } <table22>[PostHistoryTypes] { <col0>[number]:[text] } <table23>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table24>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table25>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table26>[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] } <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>[PostTypes] { <col0>[number]:[text] } | SELECT ( 1.0 * ( SELECT COUNT( * ) FROM ( SELECT u.Id FROM ( SELECT Id FROM `<table20>` WHERE Reputation = 1 ) AS u JOIN Posts AS p ON u.Id = p.OwnerUserId GROUP BY u.Id HAVING COUNT( * ) = 1 AND MAX( p.PostTypeId ) = 1 ) AS Chosen ) ) / ( 1.0 * ( SELECT COUNT( * ) FROM `<table20>` ) ) * 100 | Percentage of users with rep=1 and with just a single question post. |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } | SELECT `<table1>`.drug_type, `<table1>`.route FROM `<table1>` WHERE `<table1>`.formulary_drug_cd = "METRBASE" | what is drug type and drug route of drug code metrbase? |
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[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>[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 `<table2>`.admission_type, diagnoses.long_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.subject_id = "2560" | what is the admission type and diagnosis long title of subject id 2560?
|
<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>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[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 `<table1>`.long_title FROM `<table1>` WHERE `<table1>`.subject_id = "18077" | Tell me the long title of diagnoses for the patient with patient id 18077. |
<table0>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11>[PROF_NUM]:[int] } <table1>[PROFESSOR] { <col0>[EMP_NUM]:[int] <col1>[DEPT_CODE]:[varchar] <col2>[PROF_OFFICE]:[varchar] <col3>[PROF_EXTENSION]:[varchar] <col4>[PROF_HIGH_DEGREE]:[varchar] } <table2>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[varchar] <col4>[EMP_JOBCODE]:[varchar] <col5>[EMP_HIREDATE]:[datetime] <col6>[EMP_DOB]:[datetime] } <table3>[CLASS] { <col0>[CLASS_CODE]:[varchar] <col1>[CRS_CODE]:[varchar] <col2>[CLASS_SECTION]:[varchar] <col3>[CLASS_TIME]:[varchar] <col4>[CLASS_ROOM]:[varchar] <col5>[PROF_NUM]:[int] } <table4>[ENROLL] { <col0>[CLASS_CODE]:[varchar] <col1>[STU_NUM]:[int] <col2>[ENROLL_GRADE]:[varchar] } <table5>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:[varchar] <col3>[EMP_NUM]:[int] <col4>[DEPT_ADDRESS]:[varchar] <col5>[DEPT_EXTENSION]:[varchar] } <table6>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CREDIT]:[float] } | SELECT DEPT_CODE, COUNT( * ) FROM `<table0>` GROUP BY `<col9>` | Find the number of students for each department. Plot them as bar chart.
|
<table0>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table1>[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] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table3>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table4>[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] } <table5>[requirement] { <col0>[requirement_id]:[int] } <table6>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table7>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table8>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table9>[semester] { <col0>[semester_id]:[int] } <table10>[area] { <col0>[course_id]:[int] } <table11>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table12>[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] } <table13>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <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>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table16>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degree]:[varchar] <col11>[minor]:[varchar] <col12>[internship]:[varchar] } <table17>[course_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] } | SELECT DISTINCT `<table4>`.department, `<table4>`.name, `<table4>`.number FROM `<table4>` INNER JOIN student_record ON student_record.`<table4>`_id = `<table4>`.`<table4>`_id INNER JOIN program_`<table4>` ON student_record.`<table4>`_id = program_`<table4>`.`<table4>`_id WHERE program_`<table4>`.category LIKE '%Core%' AND student_record.student_id = 1 | The classes that I took before did any of them consist of Core classes ?
|
<table0>[clinics] { <col0>[INT]:[name] <col1>[TEXT]:[state] <col2>[TEXT]:[INSERT] } <table1>[states] { <col0>[INT]:[name] <col1>[TEXT]:[diabetes_rate] <col2>[FLOAT]:[INSERT] } | SELECT c.name FROM `<table0>` c INNER JOIN states s ON c.state = s.name WHERE s.diabetes_rate > 0.12; | List all rural clinics in states with high prevalence of diabetes. |
<table0>[table_21795] { <col0>[Poll]:[Source] <col1>[text]:[Dates] <col2>[administered]:[text] <col3>[Democrat]:[Jay] <col4>[Nixon]:[text] <col5>[Republican]:[Kenny] <col6>[Hulshof]:[text] <col7>[Lead]:[Margin] } | SELECT COUNT( "Lead Margin" ) FROM `<table0>` WHERE "Dates administered" = 'September 11, 2008' | How many different lead margins were stated in the poll administered on September 11, 2008?
|
<table0>[table_name_35] { <col0>[sample_size]:[INTEGER] <col1>[date_s__administered]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "october 18" | What is the highest sample size administered on October 18? |
<table0>[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] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[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] } <table3>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table4>[area] { <col0>[course_id]:[int] } <table5>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table6>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table7>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table8>[requirement] { <col0>[requirement_id]:[int] } <table9>[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] } <table10>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table11>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table12>[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] } <table13>[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] } <table14>[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] } <table15>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table16>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table17>[semester] { <col0>[semester_id]:[int] } | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | Next semester , which classes can be taken as Core ?
|
<table0>[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] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table2>[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] } <table3>[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] } <table4>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table5>[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] } <table6>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table7>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table8>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table9>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table10>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table11>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table12>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table13>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table14>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table15>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table16>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table17>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table18>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table19>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table20>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table21>[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] } <table22>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table23>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table24>[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] } | SELECT DISTINCT flight.flight_id FROM `<table17>` AS AIRPORT_SERVICE_0, `<table17>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND flight.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code ) AND flight.airline_code = 'AA' | what are the AA flights from NEWARK to NASHVILLE
|
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[Employees] { <col0>[EmployeeID]:[integer] <col1>[LastName]:[text] <col2>[FirstName]:[text] <col3>[BirthDate]:[date] <col4>[Photo]:[text] <col5>[Notes]:[text] } <table3>[Shippers] { <col0>[ShipperID]:[integer] <col1>[ShipperName]:[text] <col2>[Phone]:[text] } <table4>[Suppliers] { <col0>[SupplierID]:[integer] <col1>[SupplierName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] <col7>[Phone]:[text] } <table5>[Products] { <col0>[ProductID]:[integer] <col1>[ProductName]:[text] <col2>[SupplierID]:[integer] <col3>[CategoryID]:[integer] <col4>[Unit]:[text] <col5>[Price]:[real] } <table6>[Orders] { <col0>[OrderID]:[integer] <col1>[CustomerID]:[integer] <col2>[EmployeeID]:[integer] <col3>[OrderDate]:[datetime] <col4>[ShipperID]:[integer] } <table7>[OrderDetails] { <col0>[OrderDetailID]:[integer] <col1>[OrderID]:[integer] <col2>[ProductID]:[integer] <col3>[Quantity]:[integer] } | SELECT STRFTIME( '%Y', T2.OrderDate ) FROM `<table1>` AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Around the Horn' GROUP BY STRFTIME( '%Y', T2.OrderDate ) ORDER BY COUNT( T2.OrderID ) DESC LIMIT 1 | In which year did Around the Horn place the most orders? |
<table0>[Artifacts] { <col0>[ArtifactName]:[VARCHAR] <col1>[SiteName]:[VARCHAR] <col2>[AnalysisResult]:[VARCHAR] } | SELECT ArtifactName, `<col2>` FROM `<table0>` WHERE `<col1>` != 'Site13'; | List all artifacts with their respective analysis results, excluding those from 'Site13'. |
<table0>[employees] { <col0>[employee_id]:[number] <col1>[role_code]:[text] <col2>[employee_name]:[text] <col3>[gender_mfu]:[text] <col4>[date_of_birth]:[time] <col5>[other_details]:[text] } <table1>[ref_calendar] { <col0>[calendar_date]:[time] <col1>[day_number]:[number] } <table2>[documents_to_be_destroyed] { <col0>[document_id]:[number] <col1>[destruction_authorised_by_employee_id]:[number] <col2>[destroyed_by_employee_id]:[number] <col3>[planned_destruction_date]:[time] <col4>[actual_destruction_date]:[time] <col5>[other_details]:[text] } <table3>[document_locations] { <col0>[document_id]:[number] <col1>[location_code]:[text] <col2>[date_in_location_from]:[time] <col3>[date_in_locaton_to]:[time] } <table4>[all_documents] { <col0>[document_id]:[number] <col1>[date_stored]:[time] <col2>[document_type_code]:[text] <col3>[document_name]:[text] <col4>[document_description]:[text] <col5>[other_details]:[text] } <table5>[roles] { <col0>[role_code]:[text] <col1>[role_name]:[text] <col2>[role_description]:[text] } <table6>[ref_locations] { <col0>[location_code]:[text] <col1>[location_name]:[text] <col2>[location_description]:[text] } <table7>[ref_document_types] { <col0>[document_type_code]:[text] <col1>[document_type_name]:[text] <col2>[document_type_description]:[text] } | SELECT location_code, date_in_location_from, `<col3>` FROM `<table3>` | Show the location code, the starting date and ending data in that location for all the documents.
|
<table0>[employee_skills] { <col0>[employee_id]:[INT] <col1>[skill_name]:[VARCHAR] <col2>[experience_years]:[INT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'quality_control'; | What is the average experience of employees in 'quality_control' skill? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table3>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[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 `<table4>`.discharge_location, `<table4>`.dischtime FROM `<table4>` WHERE `<table4>`.name = "Thomas Nazario" | what is discharge location and discharge time of subject name thomas nazario?
|
<table0>[zyjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] <col5>[CYSJ]:[time] <col6>[CYZTDM]:[number] <col7>[HZXM]:[text] <col8>[JZKSDM]:[text] <col9>[JZKSMC]:[text] <col10>[JZLSH]:[text] <col11>[text]:[KLX] <col12>[number]:[MZBMLX] <col13>[number]:[MZJZLSH] <col14>[text]:[MZZDBM] <col15>[text]:[MZZDMC] <col16>[text]:[MZZYZDZZBM] <col17>[text]:[RYCWH] <col18>[text]:[RYDJSJ] <col19>[time]:[RYSJ] <col20>[time]:[RYTJDM] <col21>[number]:[RYTJMC] <col22>[text]:[RZBQDM] <col23>[text]:[RZBQMC] <col24>[text]:[WDBZ] <col25>[number]:[YLJGDM] <col26>[text]:[ZYBMLX] <col27>[number]:[ZYZDBM] <col28>[text]:[ZYZDMC] <col29>[text]:[ZYZYZDZZBM] <col30>[text]:[ZYZYZDZZMC] } <table1>[hz_info] { <col0>[text]:[KLX] <col1>[number]:[RYBH] <col2>[text]:[YLJGDM] } <table2>[person_info] { <col0>[CSD]:[text] <col1>[CSRQ]:[time] <col2>[GJDM]:[text] <col3>[GJMC]:[text] <col4>[JGDM]:[text] <col5>[JGMC]:[text] <col6>[MZDM]:[text] <col7>[MZMC]:[text] <col8>[RYBH]:[text] <col9>[XBDM]:[number] <col10>[XBMC]:[text] <col11>[XLDM]:[text] <col12>[XLMC]:[text] <col13>[text]:[ZYLBDM] <col14>[text]:[ZYMC] } <table3>[mzjzjlb] { <col0>[HXPLC]:[number] <col1>[HZXM]:[text] <col2>[JLSJ]:[time] <col3>[JZJSSJ]:[time] <col4>[JZKSBM]:[text] <col5>[JZKSMC]:[text] <col6>[JZKSRQ]:[time] <col7>[JZLSH]:[text] <col8>[JZZDBM]:[text] <col9>[JZZDSM]:[text] <col10>[JZZTDM]:[number] <col11>[JZZTMC]:[text] <col12>[text]:[KLX] <col13>[number]:[MJZH] <col14>[text]:[number] <col15>[MZZYZDZZBM]:[text] <col16>[MZZYZDZZMC]:[text] <col17>[NLS]:[number] <col18>[NLY]:[number] <col19>[QTJZYSGH]:[text] <col20>[number]:[SSY] <col21>[number]:[SZY] <col22>[number]:[number] <col23>[TXBZ]:[number] <col24>[number]:[WDBZ] <col25>[number]:[number] <col26>[YLJGDM]:[text] <col27>[ZSEBZ]:[number] <col28>[ZZBZ]:[number] <col29>[ZZYSGH]:[text] } <table4>[jybgb] { <col0>[BBCJBW]:[text] <col1>[BBDM]:[text] <col2>[BBMC]:[text] <col3>[BBZT]:[number] <col4>[BGDH]:[text] <col5>[BGJGDM]:[text] <col6>[BGJGMC]:[text] <col7>[BGRGH]:[text] <col8>[BGRQ]:[time] <col9>[BGRXM]:[text] <col10>[BGSJ]:[time] <col11>[CJRQ]:[time] <col12>[JSBBRQSJ]:[time] <col13>[JSBBSJ]:[time] <col14>[JYBBH]:[text] <col15>[JYJGMC]:[text] <col16>[JYJSGH]:[text] <col17>[JYJSQM]:[text] <col18>[JYKSBM]:[text] <col19>[JYKSMC]:[text] <col20>[JYLX]:[number] <col21>[JYRQ]:[time] <col22>[JYSQJGMC]:[text] <col23>[JYXMDM]:[text] <col24>[JYXMMC]:[text] <col25>[JZLSH]:[text] <col26>[JZLSH_MZJZJLB]:[text] <col27>[JZLSH_ZYJZJLB]:[text] <col28>[JZLX]:[number] <col29>[KSBM]:[text] <col30>[KSMC]:[text] <col31>[SHRGH]:[text] <col32>[SHRXM]:[text] <col33>[SHSJ]:[time] <col34>[SQKS]:[text] <col35>[SQKSMC]:[text] <col36>[SQRGH]:[text] <col37>[SQRQ]:[time] <col38>[SQRXM]:[text] <col39>[YLJGDM]:[text] <col40>[YLJGDM_ZYJZJLB]:[text] } <table5>[mzjzjlb_jybgb] { <col0>[YLJGDM_MZJZJLB]:[text] <col1>[BGDH]:[number] <col2>[YLJGDM]:[number] } <table6>[jyjgzbb] { <col0>[BGDH]:[text] <col1>[BGRQ]:[time] <col2>[CKZFWDX]:[text] <col3>[CKZFWSX]:[number] <col4>[CKZFWXX]:[number] <col5>[JCFF]:[text] <col6>[JCRGH]:[text] <col7>[JCRXM]:[text] <col8>[JCXMMC]:[text] <col9>[JCZBDM]:[text] <col10>[JCZBJGDL]:[number] <col11>[JCZBJGDW]:[text] <col12>[JCZBJGDX]:[text] <col13>[JCZBMC]:[text] <col14>[JLDW]:[text] <col15>[JYRQ]:[time] <col16>[JYZBLSH]:[text] <col17>[SBBM]:[text] <col18>[SHRGH]:[text] <col19>[SHRXM]:[text] <col20>[YLJGDM]:[text] <col21>[YQBH]:[text] <col22>[YQMC]:[text] } | SELECT `<table2>`.JGDM, `<table2>`.JGMC, COUNT( `<table2>`.RYBH ) FROM `<table2>` JOIN hz_info JOIN mzjzjlb ON `<table2>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDSM = '嗜眠症' GROUP BY `<table2>`.JGDM | 门诊诊断为嗜眠症的患者的籍贯代码是什么?名称是什么?相应人数是多少?
|
<table0>[table_name_3] { <col0>[finalist]:[VARCHAR] <col1>[semifinalists]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "andre agassi ( 1 ) lleyton hewitt ( 14 )" | Which finalist has Semifinalists of andre agassi (1) lleyton hewitt (14)? |
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table3>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table4>[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] } <table5>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table6>[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] } <table7>[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] } <table8>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table9>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table10>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table11>[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] } <table12>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table13>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table14>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table15>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table16>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table17>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table18>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table19>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table20>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table21>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table22>[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] } <table23>[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] } <table24>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } | SELECT DISTINCT flight.flight_id FROM `<table9>` AS AIRPORT_SERVICE_0, `<table9>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code ) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN DIEGO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | list flights tomorrow from SAN DIEGO to PHOENIX |
<table0>[table_name_42] { <col0>[gold]:[VARCHAR] <col1>[total]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 4 | How many gold medals correspond with a total over 4? |
<table0>[table_name_83] { <col0>[poles]:[INTEGER] <col1>[driver]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "nelson piquet" | How many poles does driver Nelson Piquet have?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[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>[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>[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 `<table1>`.subject_id ) FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.religion = "PROTESTANT QUAKER" AND lab.itemid = "51447" | Tell me the number of patients with protestant quaker religious backgrounds who have lab test item id 51447. |
<table0>[table_name_4] { <col0>[year]:[INTEGER] <col1>[position]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "12th" | Name the lowest year for 12th position |
<table0>[habitats] { <col0>[INT]:[habitat_name] <col1>[VARCHAR]:[preservation_status] } <table1>[education_programs] { <col0>[INT]:[habitat_id] <col1>[INT]:[coordinator_name] } | SELECT h.habitat_name, h.preservation_status, e.coordinator_name FROM `<table0>` h INNER JOIN education_programs e ON h.id = e.habitat_id; | List all the habitats along with their corresponding preservation status and education program coordinator name. |
<table0>[table_name_64] { <col0>[grid]:[INTEGER] <col1>[rider]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mika kallio" | what is the grid when the rider is mika kallio?
|
<table0>[table_68734] { <col0>[Year]:[real] <col1>[Entrant]:[text] <col2>[Chassis]:[text] <col3>[Engine]:[text] <col4>[Points]:[real] } | SELECT "Engine" FROM `<table0>` WHERE "Points" = '0' AND "Entrant" = 'élie bayol' | Which engine did lie Bayol use when they earned 0 points? |
<table0>[table_name_27] { <col0>[distance]:[VARCHAR] <col1>[bearing]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "297°" | what is the distance for bearing 297°? |
<table0>[table_18220102_1] { <col0>[opening_film]:[VARCHAR] <col1>[date__opening]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE date__opening_ = "August 23" | Which opening film has the opening date of august 23? |
<table0>[table_name_79] { <col0>[college_or_campus_name]:[VARCHAR] <col1>[weblink]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "http://www.aucev.edu.in/" | Which College or campus has a website of http://www.aucev.edu.in/?
|
<table0>[table_name_98] { <col0>[rank]:[VARCHAR] <col1>[total_gdp__]:[_bn] } | SELECT `<col0>` FROM `<table0>` WHERE total_gdp__€_bn__ = "€11.243" | Which rank has a Total GDP ( bn) of 11.243??
|
<table0>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[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] } <table2>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table3>[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] } <table4>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table5>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table6>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <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>[semester] { <col0>[semester_id]:[int] } <table9>[area] { <col0>[course_id]:[int] } <table10>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table11>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table12>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table13>[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] } <table14>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table15>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table16>[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] } <table17>[requirement] { <col0>[requirement_id]:[int] } | SELECT DISTINCT course.department, course.name, course.number FROM `<table5>` INNER JOIN course ON `<table5>`.course_id = course.course_id WHERE course.department = 'PHRMACOL' | As a CS major , what PHRMACOL classes are required to graduate ? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[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>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table3>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table4>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table5>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table6>[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] } <table7>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table8>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table9>[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] } <table10>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table11>[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] } <table12>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table13>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table14>[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] } <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>[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] } | SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.short_title = 'atrial fibrillation' ) ) AS t1 JOIN ( SELECT admissions.subject_id, `<table11>`.drug, `<table11>`.startdate FROM `<table11>` JOIN admissions ON `<table11>`.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN ( SELECT `<table8>`.subject_id FROM `<table8>` WHERE `<table8>`.gender = 'm' ) AND admissions.age BETWEEN 40 AND 49 ) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME( t1.charttime, 'start of month' ) = DATETIME( t2.startdate, 'start of month' ) GROUP BY t2.drug ) AS t3 WHERE t3.c1 <= 3 | what is the three most frequently prescribed drugs that were prescribed within the same month to the male patients with age 40s after they have been diagnosed with atrial fibrillation,? |
<table0>[Members] { } <table1>[Meditation] { <col0>[MemberID]:[INT] <col1>[Duration]:[INT] } <table2>[Cycling] { <col0>[MemberID]:[INT] <col1>[INSERT]:[Members] <col2>[VALUES]:[INSERT] <col3>[Meditation]:[MemberID] <col4>[Duration]:[VALUES] } | SELECT MAX( `<col1>` ) FROM `<table1>` WHERE `<col0>` IN ( SELECT `<col0>` FROM `<table0>` JOIN Cycling ON `<table0>`.ID = Cycling.MemberID ); | What's the maximum duration of meditation sessions for members who also do cycling? |
<table0>[appellations] { <col0>[INTEGER]:[Appelation] <col1>[TEXT]:[County] <col2>[TEXT]:[State] <col3>[TEXT]:[Area] <col4>[TEXT]:[isAVA] } <table1>[grapes] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Color] } <table2>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <col4>[TEXT]:[TEXT] <col5>[Year]:[INTEGER] <col6>[Price]:[INTEGER] <col7>[Score]:[INTEGER] <col8>[Cases]:[INTEGER] <col9>[Drink]:[TEXT] } | SELECT Year, AVG( `<col6>` ) FROM `<table2>` GROUP BY `<col5>` | Display a line chart for what is the average prices of wines for each each?
|
<table0>[table_1579922_1] { <col0>[broadcast_date]:[VARCHAR] <col1>[run_time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "24:30" | What date was an episode with a run time of 24:30 broadcasted?
|
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>[text]:[MED_DIRE_CD] <col12>[text]:[MED_DIRE_NM] <col13>[text]:[MED_EXP_BILL_ID] <col14>[text]:[MED_EXP_DET_ID] <col15>[text]:[MED_INV_ITEM_TYPE] <col16>[text]:[MED_ORG_DEPT_CD] <col17>[text]:[MED_ORG_DEPT_NM] <col18>[text]:[OVERALL_CD_ORG] <col19>[text]:[OVERALL_CD_PERSON] <col20>[text]:[OVE_SELF_AMO] <col21>[number]:[PRESCRIPTION_CODE] <col22>[text]:[PRESCRIPTION_ID] <col23>[text]:[QTY] <col24>[number]:[RECIPE_BILL_ID] <col25>[text]:[REF_STA_FLG] <col26>[number]:[REIMBURS_TYPE] <col27>[number]:[REMOTE_SETTLE_FLG] <col28>[text]:[RER_SOL] <col29>[number]:[SELF_PAY_AMO] <col30>[number]:[SELF_PAY_PRO] <col31>[number]:[SOC_SRT_DIRE_CD] <col32>[text]:[SOC_SRT_DIRE_NM] <col33>[text]:[SPEC] <col34>[text]:[STA_DATE] <col35>[time]:[STA_FLG] <col36>[number]:[SYNC_TIME] <col37>[time]:[TRADE_TYPE] <col38>[number]:[UNIVALENT] <col39>[number]:[UP_LIMIT_AMO] <col40>[number]:[USE_FRE] <col41>[text]:[VAL_UNIT] } <table1>[t_kc21] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text] <col11>[INSURED_IDENTITY]:[number] <col12>[INSURED_STS]:[text] <col13>[INSU_TYPE]:[text] <col14>[IN_DIAG_DIS_CD]:[text] <col15>[IN_DIAG_DIS_NM]:[text] <col16>[IN_HOSP_DATE]:[time] <col17>[IN_HOSP_DAYS]:[number] <col18>[MAIN_COND_DES]:[text] <col19>[MED_AMOUT]:[number] <col20>[MED_CLINIC_ID]:[text] <col21>[MED_ORG_DEPT_CD]:[text] <col22>[MED_ORG_DEPT_NM]:[text] <col23>[MED_SER_ORG_NO]:[text] <col24>[MED_TYPE]:[number] <col25>[OUT_DIAG_DIS_CD]:[text] <col26>[OUT_DIAG_DIS_NM]:[text] <col27>[OUT_DIAG_DOC_CD]:[text] <col28>[OUT_DIAG_DOC_NM]:[text] <col29>[OUT_HOSP_DATE]:[time] <col30>[OVERALL_CD_ORG]:[text] <col31>[OVERALL_CD_PERSON]:[text] <col32>[PERSON_AGE]:[number] <col33>[PERSON_ID]:[text] <col34>[PERSON_NM]:[text] <col35>[PERSON_SEX]:[number] <col36>[REIMBURSEMENT_FLG]:[number] <col37>[REMOTE_SETTLE_FLG]:[text] <col38>[SERVANT_FLG]:[text] <col39>[SOC_SRT_CARD]:[text] <col40>[SYNC_TIME]:[time] <col41>[TRADE_TYPE]:[number] } <table2>[t_kc21_t_kc22] { <col0>[MED_CLINIC_ID]:[text] <col1>[MED_EXP_DET_ID]:[number] } <table3>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[COMP_ID]:[text] <col8>[COM_ACC_PAY]:[number] <col9>[COM_PAY]:[number] <col10>[DATA_ID]:[text] <col11>[ENT_ACC_PAY]:[number] <col12>[ENT_PAY]:[number] <col13>[FLX_MED_ORG_ID]:[text] <col14>[ILL_PAY]:[number] <col15>[INSURED_IDENTITY]:[number] <col16>[INSURED_STS]:[text] <col17>[INSU_TYPE]:[text] <col18>[LAS_OVE_PAY]:[number] <col19>[MED_AMOUT]:[number] <col20>[MED_CLINIC_ID]:[text] <col21>[MED_SAFE_PAY_ID]:[text] <col22>[MED_TYPE]:[number] <col23>[OLDC_FUND_PAY]:[number] <col24>[OUT_HOSP_DATE]:[time] <col25>[OVERALL_CD_ORG]:[text] <col26>[OVERALL_CD_PERSON]:[text] <col27>[OVE_ADD_PAY]:[number] <col28>[OVE_PAY]:[number] <col29>[PERSON_ID]:[text] <col30>[PER_ACC_PAY]:[number] <col31>[PER_EXP]:[number] <col32>[PER_SOL]:[number] <col33>[RECEIVER_DEAL_ID]:[text] <col34>[RECEIVER_OFFSET_ID]:[text] <col35>[RECEIVER_REVOKE_ID]:[text] <col36>[RECIPE_BILL_ID]:[text] <col37>[REF_SLT_FLG]:[number] <col38>[REIMBURS_FLG]:[number] <col39>[SENDER_DEAL_ID]:[text] <col40>[SENDER_OFFSET_ID]:[text] <col41>[SENDER_REVOKE_ID]:[text] <col42>[SPE_FUND_PAY]:[number] <col43>[SUP_ADD_PAY]:[number] <col44>[SYNC_TIME]:[time] <col45>[TRADE_TYPE]:[number] } | SELECT `<table0>`.CHA_ITEM_LEV FROM `<table0>` JOIN t_kc21_`<table0>` JOIN t_kc21 ON t_kc21_`<table0>`.MED_EXP_DET_ID = `<table0>`.MED_EXP_DET_ID AND t_kc21_`<table0>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '14864928570' AND `<table0>`.SOC_SRT_DIRE_NM = '盐酸帕罗西汀片' | 盐酸帕罗西汀片在医疗就诊14864928570中,他的收费项目分多少等级?
|
<table0>[table_19580] { <col0>[Year]:[real] <col1>[Enrollment]:[real] <col2>[Black]:[text] <col3>[White]:[text] <col4>[Hispanic]:[text] <col5>[Asian]:[text] <col6>[Free]:[reduced] <col7>[lunch]:[text] } | SELECT "Free/reduced `<col7>` ( % )" FROM `<table0>` WHERE "Hispanic ( % )" = '3.7' | What percentage of free/reduced lunch are there when the hispanic percentage is 3.7? |
<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>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.admission_type = "NEWBORN" AND diagnoses.long_title = "Other Staphylococcus pneumonia" | count the number of patients whose admission type is newborn and diagnoses long title is other staphylococcus pneumonia?
|
<table0>[table_name_23] { <col0>[enrollment]:[VARCHAR] <col1>[nickname]:[VARCHAR] <col2>[founded]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "buccaneers" AND `<col2>` < 1911 | What is the number of enrollments for teams named the Buccaneers founded before 1911?
|
<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 COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.admityear < "2148" AND diagnoses.short_title = "Obesity NOS" | give me the number of patients admitted before 2148 who are diagnosed with unspecified obesity. |
<table0>[table_name_40] { <col0>[VARCHAR]:[runner_up] <col1>[VARCHAR]:[edition] } | SELECT third FROM `<table0>` WHERE runner_up = "paris saint-germain" AND edition < 5 | I want to know the third with runner of paris saint-germain and edition less than 5 |
<table0>[table_name_44] { <col0>[loser]:[VARCHAR] <col1>[time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0:58" | Who lost with a time of 0:58? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[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>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table3>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table4>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table5>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table6>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table7>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] } <table8>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table9>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } | SELECT `<table9>`.drugname FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '021-80293' ) AND DATETIME( `<table9>`.drugstarttime, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-0 day' ) EXCEPT SELECT `<table9>`.drugname FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '021-80293' ) AND DATETIME( `<table9>`.drugstarttime, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-1 day' ) | what were the drugs which were added to patient 021-80293 today compared to the ones yesterday?
|
<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>[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>` WHERE `<table3>`.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND `<table3>`.diagnosis = "RUQ PAIN" | how many patients whose discharge location is disch-tran to psych hosp and primary disease is ruq pain?
|
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[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>[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 JOB_TITLE, `<col3>` - `<col2>` FROM `<table0>` WHERE `<col3>` BETWEEN 12000 AND 18000 ORDER BY `<col1>` DESC | what are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?, could you sort by the names in descending?
|
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter_700] <col9>[text]:[Time] } <table3>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } | SELECT meter_400, meter_100 FROM `<table2>` | Return a bar chart about the distribution of meter_400 and meter_100 .
|
<table0>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table1>[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] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[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] } <table4>[requirement] { <col0>[requirement_id]:[int] } <table5>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table6>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table7>[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] } <table8>[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] } <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>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table11>[area] { <col0>[course_id]:[int] } <table12>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table13>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table14>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table15>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table16>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table17>[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] } | SELECT DISTINCT `<table9>`.department, `<table9>`.name, `<table9>`.number FROM `<table9>` INNER JOIN program_`<table9>` ON program_`<table9>`.`<table9>`_id = `<table9>`.`<table9>`_id WHERE `<table9>`.credits = 9 AND program_`<table9>`.category LIKE 'ULCS' | Are there any upper-level classes that have 9 credits ? |
<table0>[table_203_151] { <col0>[number]:[number] <col1>[date]:[text] <col2>[tournament]:[text] <col3>[winning]:[score] <col4>[text]:[margin] <col5>[nvictory]:[text] <col6>[runner]:[text] } | SELECT ( SELECT "date" FROM `<table0>` WHERE "tournament" = 'klm open' AND "margin of\nvictory" = '4 strokes' ) - ( SELECT "date" FROM `<table0>` WHERE "tournament" = 'bmw international open' AND "margin of\nvictory" = 'playoff' ) | how long separated the playoff victory at bmw international open and the 4 stroke victory at the klm open ?
|
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table2>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[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>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table5>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table6>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table7>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] } <table8>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table9>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } | SELECT COUNT( DISTINCT `<table3>`.uniquepid ) FROM `<table3>` WHERE STRFTIME( '%y', `<table3>`.hospitaladmittime ) <= '2100' | how many patients have been admitted to hospitals until 2100? |
<table0>[donation_data] { <col0>[INT]:[type] <col1>[VARCHAR]:[DECIMAL] } | SELECT type, SUM( amount ) as total_donations FROM `<table0>` GROUP BY type; | What is the total donation amount by organization type? |
<table0>[Bear_Population] { <col0>[INT]:[species] <col1>[VARCHAR]:[population] } <table1>[Conservation_Efforts] { <col0>[INT]:[species] <col1>[VARCHAR]:[efforts] } | SELECT SUM( population ) FROM `<table0>` WHERE species = 'Polar Bear' UNION ALL SELECT SUM( efforts ) FROM `<table1>` WHERE species = 'Polar Bear' | Find the total number of polar bears in the 'Bear_Population' table and the 'Conservation_Efforts' table, then sum the results. |
<table0>[Transactions_Lots] { <col0>[transaction_id]:[INTEGER] <col1>[lot_id]:[INTEGER] } <table1>[Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[transaction_type_code]:[VARCHAR] <col3>[date_of_transaction]:[DATETIME] <col4>[amount_of_transaction]:[DECIMAL] <col5>[share_count]:[VARCHAR] <col6>[other_details]:[VARCHAR] } <table2>[Purchases] { <col0>[purchase_transaction_id]:[INTEGER] <col1>[purchase_details]:[VARCHAR] } <table3>[Lots] { <col0>[lot_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[lot_details]:[VARCHAR] } <table4>[Investors] { <col0>[investor_id]:[INTEGER] <col1>[Investor_details]:[VARCHAR] } <table5>[Ref_Transaction_Types] { <col0>[transaction_type_code]:[VARCHAR] <col1>[transaction_type_description]:[VARCHAR] } <table6>[Sales] { <col0>[sales_transaction_id]:[INTEGER] <col1>[sales_details]:[VARCHAR] } | SELECT lot_details, COUNT( lot_details ) FROM `<table4>` AS T1 JOIN Lots AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" GROUP BY lot_details | A bar chart for returning the number of the lot details of lots that belong to investors with details 'l'?
|
<table0>[table_name_3] { <col0>[grid]:[VARCHAR] <col1>[driver]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "giancarlo fisichella" | How many grid numbers were there for the driver Giancarlo Fisichella?
|
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table3>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table4>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table5>[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] } <table6>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table7>[VoteTypes] { <col0>[number]:[text] } <table8>[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] } <table9>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table10>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table11>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table12>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table13>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table14>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table15>[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] } <table16>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table17>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table18>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table19>[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] } <table20>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table21>[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] } <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>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table24>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table25>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table26>[PostTypes] { <col0>[number]:[text] } <table27>[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] } <table28>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } | SELECT p.Id AS "post_link" FROM `<table21>` AS p WHERE AnswerCount > 0 AND AcceptedAnswerId IS NULL AND ClosedDate IS NULL AND NOT EXISTS( SELECT a.Id FROM `<table21>` AS a WHERE a.ParentId = p.Id AND a.Score >= 0 ) ORDER BY p.Score DESC | Questions where all answers have negative score. |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[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>[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 `<table3>`.diagnosis, `<table3>`.admittime FROM `<table3>` WHERE `<table3>`.subject_id = "29767" | what is primary disease and admission time of subject id 29767?
|
<table0>[table_76437] { <col0>[Player]:[text] <col1>[Country]:[text] <col2>[Year]:[won] <col3>[text]:[Total] <col4>[real]:[par] <col5>[real]:[Finish] } | SELECT "Country" FROM `<table0>` WHERE "Total" < '290' AND "Year( s ) won" = '1960' | What is Country, when Total is less than 290, and when Year(s) Won is 1960?
|
<table0>[carbon_offset_programs] { <col0>[INT]:[location] <col1>[VARCHAR]:[INSERT] } | SELECT location, COUNT( * ) AS count FROM `<table0>` WHERE location IN ( 'Europe', 'Asia' ) GROUP BY location; | Count the number of carbon offset programs implemented in 'Europe' and 'Asia'. |