schema
stringlengths 29
5.42k
| question
stringlengths 0
752
| rejected
stringlengths 2
4.44k
| chosen
stringlengths 4
8.94k
| weight
float64 0
8.73
|
---|---|---|---|---|
CREATE TABLE table_1354805_6 (number_of_dances VARCHAR2, average VARCHAR2)
| how many turns were completed to make a mean of 34.0 | SELECT COUNT(number_of_dances) FROM table_1354805_6 WHERE average = "34.0" | SELECT COUNT("number_of_dances") FROM "table_1354805_6" WHERE "34.0" = "average" | 0.078125 |
CREATE TABLE table_21691 ("Athlete" CLOB, "Event" CLOB, "Round of 32" CLOB, "Round of 16" CLOB, "Quarterfinals" CLOB, "Semifinals" CLOB)
| How did Hamza Kramou fare in the semifinals? | SELECT "Semifinals" FROM table_21691 WHERE "Athlete" = 'Hamza Kramou' | SELECT "Semifinals" FROM "table_21691" WHERE "Athlete" = 'Hamza Kramou' | 0.069336 |
CREATE TABLE table_name_55 (catalog VARCHAR2, date VARCHAR2)
| What was the name of the catalog released on 19 July 2008? | SELECT catalog FROM table_name_55 WHERE date = "19 july 2008" | SELECT "catalog" FROM "table_name_55" WHERE "19 july 2008" = "date" | 0.06543 |
CREATE TABLE employees (EMPLOYEE_ID NUMBER, FIRST_NAME VARCHAR2, LAST_NAME VARCHAR2, EMAIL VARCHAR2, PHONE_NUMBER VARCHAR2, HIRE_DATE DATE, JOB_ID VARCHAR2, SALARY NUMBER, COMMISSION_PCT NUMBER, MANAGER_ID NUMBER, DEPARTMENT_ID NUMBER)
CREATE TABLE job_history (EMPLOYEE_ID NUMBER, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR2, DEPARTMENT_ID NUMBER)
CREATE TABLE jobs (JOB_ID VARCHAR2, JOB_TITLE VARCHAR2, MIN_SALARY NUMBER, MAX_SALARY NUMBER)
CREATE TABLE locations (LOCATION_ID NUMBER, STREET_ADDRESS VARCHAR2, POSTAL_CODE VARCHAR2, CITY VARCHAR2, STATE_PROVINCE VARCHAR2, COUNTRY_ID VARCHAR2)
CREATE TABLE countries (COUNTRY_ID VARCHAR2, COUNTRY_NAME VARCHAR2, REGION_ID NUMBER)
CREATE TABLE regions (REGION_ID NUMBER, REGION_NAME VARCHAR2)
CREATE TABLE departments (DEPARTMENT_ID NUMBER, DEPARTMENT_NAME VARCHAR2, MANAGER_ID NUMBER, LOCATION_ID NUMBER)
| For those employees who did not have any job in the past, show me about the correlation between salary and department_id in a scatter chart. | SELECT SALARY, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | SELECT "SALARY", "DEPARTMENT_ID" FROM "employees" WHERE NOT "EMPLOYEE_ID" IN (SELECT "EMPLOYEE_ID" FROM "job_history") | 0.115234 |
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| count the number of patients whose death status is 0 and diagnoses short title is metabolic encephalopathy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Metabolic encephalopathy" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "Metabolic encephalopathy" = "diagnoses"."short_title" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "0" = "demographic"."expire_flag" | 0.229492 |
CREATE TABLE table_27298240_26 (pluperfect VARCHAR2, perfect VARCHAR2)
| What is the pluperfect for the perfect si bio/la; bio/la si? | SELECT pluperfect FROM table_27298240_26 WHERE perfect = "si bio/la; bio/la si" | SELECT "pluperfect" FROM "table_27298240_26" WHERE "perfect" = "si bio/la; bio/la si" | 0.083008 |
CREATE TABLE table_70278 ("Start Date/Time" CLOB, "Duration" CLOB, "End Time" CLOB, "Spacecraft" CLOB, "Crew" CLOB)
| What is the crew with the end time of 21:11? | SELECT "Crew" FROM table_70278 WHERE "End Time" = '21:11' | SELECT "Crew" FROM "table_70278" WHERE "End Time" = '21:11' | 0.057617 |
CREATE TABLE table_name_38 (drawn VARCHAR2, against VARCHAR2, played VARCHAR2)
| How many Drawn have an Against smaller than 5, and a Played smaller than 3? | SELECT COUNT(drawn) FROM table_name_38 WHERE against < 5 AND played < 3 | SELECT COUNT("drawn") FROM "table_name_38" WHERE "against" < 5 AND "played" < 3 | 0.077148 |
CREATE TABLE table_name_38 (Id VARCHAR2)
| What is the 2002 result when 2006 is A and 2010 is Q1? | SELECT 2002 FROM table_name_38 WHERE 2006 = "a" AND 2010 = "q1" | SELECT 2002 FROM "table_name_38" WHERE "a" = 2006 AND "q1" = 2010 | 0.063477 |
CREATE TABLE table_35463 ("Series" CLOB, "Date" CLOB, "Entrants" FLOAT, "Winner" CLOB, "First Prize" CLOB)
| When was the game that had a first prize of $161,480? | SELECT "Date" FROM table_35463 WHERE "First Prize" = '$161,480' | SELECT "Date" FROM "table_35463" WHERE "First Prize" = '$161,480' | 0.063477 |
CREATE TABLE table_name_12 (finishes VARCHAR2, stage_wins VARCHAR2, starts VARCHAR2, points VARCHAR2)
| What is the number of finishes associated with 13 starts, more than 169 points, and 96 stage wins? | SELECT finishes FROM table_name_12 WHERE starts = 13 AND points > 169 AND stage_wins = 96 | SELECT "finishes" FROM "table_name_12" WHERE "points" > 169 AND "stage_wins" = 96 AND "starts" = 13 | 0.09668 |
CREATE TABLE table_18994724_1 (director_s_ VARCHAR2, film_title_used_in_nomination VARCHAR2)
| Who directed the film Nuits d'arabie? | SELECT director_s_ FROM table_18994724_1 WHERE film_title_used_in_nomination = "Nuits d'Arabie" | SELECT "director_s_" FROM "table_18994724_1" WHERE "Nuits d'Arabie" = "film_title_used_in_nomination" | 0.098633 |
CREATE TABLE table_62200 ("Player" CLOB, "Height" FLOAT, "Position" CLOB, "Year born ( Age ) " CLOB, "Current Club" CLOB)
| What is the lowest height for Rans Brempong? | SELECT MIN("Height") FROM table_62200 WHERE "Player" = 'rans brempong' | SELECT MIN("Height") FROM "table_62200" WHERE "Player" = 'rans brempong' | 0.070313 |
CREATE TABLE table_50805 ("Year" CLOB, "Division" FLOAT, "League" CLOB, "Regular Season" CLOB, "Playoffs" CLOB, "Open Cup" CLOB)
| Name the League which has a Regular Season of 3rd, atlantic? | SELECT "League" FROM table_50805 WHERE "Regular Season" = '3rd, atlantic' | SELECT "League" FROM "table_50805" WHERE "Regular Season" = '3rd, atlantic' | 0.073242 |
CREATE TABLE table_57261 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Venue" CLOB, "Crowd" FLOAT, "Date" CLOB)
| What was the attendance for the North Melbourne's home game? | SELECT "Crowd" FROM table_57261 WHERE "Home team" = 'north melbourne' | SELECT "Crowd" FROM "table_57261" WHERE "Home team" = 'north melbourne' | 0.069336 |
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| provide the number of patients whose admission type is elective and procedure long title is automatic implantable cardioverter/defibrillator (aicd) check? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Automatic implantable cardioverter/defibrillator (AICD) check" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "Automatic implantable cardioverter/defibrillator (AICD) check" = "procedures"."long_title" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "ELECTIVE" = "demographic"."admission_type" | 0.277344 |
CREATE TABLE Manufacturers (Code NUMBER, Name VARCHAR2, Headquarter VARCHAR2, Founder VARCHAR2, Revenue FLOAT)
CREATE TABLE Products (Code NUMBER, Name VARCHAR2, Price NUMBER, Manufacturer NUMBER)
| For those records from the products and each product's manufacturer, show me about the distribution of name and the average of code , and group by attribute name in a bar chart, sort X in descending order. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | SELECT "T2"."Name", "T1"."Code" FROM "Products" "T1" JOIN "Manufacturers" "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T2"."Name" ORDER BY "T2"."Name" DESC | 0.158203 |
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
| Days with at least one vote by Mathematics moderators. | SELECT DATE(v.CreationDate) FROM Users AS u INNER JOIN Votes AS v ON v.UserId = u.Id WHERE u.Id IN (2, 3, 66, 121, 1409, 2000, 2926) GROUP BY DATE(v.CreationDate) ORDER BY DATE(v.CreationDate) DESC | SELECT CAST("v"."CreationDate" AS DATE) FROM "Users" "u" JOIN "Votes" "v" ON "u"."Id" = "v"."UserId" WHERE "u"."Id" IN (2, 3, 66, 121, 1409, 2000, 2926) GROUP BY CAST("v"."CreationDate" AS DATE) ORDER BY CAST("v"."CreationDate" AS DATE) DESC | 0.235352 |
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
| Users who want the 404 polyglot back. | SELECT Id AS "user_link", AboutMe FROM Users WHERE (AboutMe LIKE '%404 polyglot%' OR AboutMe LIKE '%back the polyglot%') | SELECT "Id" AS "user_link", "AboutMe" FROM "Users" WHERE "AboutMe" LIKE '%404 polyglot%' OR "AboutMe" LIKE '%back the polyglot%' | 0.125 |
CREATE TABLE table_29223 ("Pick #" FLOAT, "CFL Team" CLOB, "Player" CLOB, "Position" CLOB, "College" CLOB)
| How many CFL teams drafted someone from mount allison college? | SELECT COUNT("CFL Team") FROM table_29223 WHERE "College" = 'Mount Allison' | SELECT COUNT("CFL Team") FROM "table_29223" WHERE "College" = 'Mount Allison' | 0.075195 |
CREATE TABLE table_name_96 (score VARCHAR2, money___$__ VARCHAR2, player VARCHAR2)
| WHAT IS THE SCORE WITH $85 FOR CLARENCE HACKNEY? | SELECT score FROM table_name_96 WHERE money___$__ = 85 AND player = "clarence hackney" | SELECT "score" FROM "table_name_96" WHERE "clarence hackney" = "player" AND "money___$__" = 85 | 0.091797 |
CREATE TABLE table_name_50 (playoffs VARCHAR2, division VARCHAR2, regular_season VARCHAR2)
| Which Playoffs has a Division of 2 and a Regular Season of 4th, southeast? | SELECT playoffs FROM table_name_50 WHERE division = "2" AND regular_season = "4th, southeast" | SELECT "playoffs" FROM "table_name_50" WHERE "2" = "division" AND "4th, southeast" = "regular_season" | 0.098633 |
CREATE TABLE table_name_68 (player VARCHAR2, to_par VARCHAR2, country VARCHAR2)
| Which Player has a To par of e, and a Country of united states? | SELECT player FROM table_name_68 WHERE to_par = "e" AND country = "united states" | SELECT "player" FROM "table_name_68" WHERE "country" = "united states" AND "e" = "to_par" | 0.086914 |
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| how many patients whose year of birth is less than 2056 and lab test name is glucose, pleural? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" AND lab.label = "Glucose, Pleural" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Glucose, Pleural" = "lab"."label" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "2056" > "demographic"."dob_year" | 0.198242 |
CREATE TABLE table_name_63 (current_map VARCHAR2, namesake VARCHAR2)
| What is the current map designation of the feature which was named for discovery rupes? | SELECT current_map FROM table_name_63 WHERE namesake = "discovery rupes" | SELECT "current_map" FROM "table_name_63" WHERE "discovery rupes" = "namesake" | 0.076172 |
CREATE TABLE Timed_Locations_of_Things (thing_id NUMBER, Date_and_Time DATETIME, Location_Code CHAR)
CREATE TABLE Customer_Events (Customer_Event_ID NUMBER, customer_id NUMBER, date_moved_in DATETIME, property_id NUMBER, resident_id NUMBER, thing_id NUMBER)
CREATE TABLE Residents (resident_id NUMBER, property_id NUMBER, date_moved_in DATETIME, date_moved_out DATETIME, other_details VARCHAR2)
CREATE TABLE Timed_Status_of_Things (thing_id NUMBER, Date_and_Date DATETIME, Status_of_Thing_Code CHAR)
CREATE TABLE Services (service_id NUMBER, organization_id NUMBER, service_type_code CHAR, service_details VARCHAR2)
CREATE TABLE Customers (customer_id NUMBER, customer_details VARCHAR2)
CREATE TABLE Residents_Services (resident_id NUMBER, service_id NUMBER, date_moved_in DATETIME, property_id NUMBER, date_requested DATETIME, date_provided DATETIME, other_details VARCHAR2)
CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID NUMBER, Customer_Event_ID NUMBER, service_type_code CHAR, resident_id NUMBER, property_id NUMBER, date_moved_in DATETIME)
CREATE TABLE Organizations (organization_id NUMBER, parent_organization_id NUMBER, organization_details VARCHAR2)
CREATE TABLE Things (thing_id NUMBER, organization_id NUMBER, Type_of_Thing_Code CHAR, service_type_code CHAR, service_details VARCHAR2)
CREATE TABLE Properties (property_id NUMBER, property_type_code CHAR, property_address VARCHAR2, other_details VARCHAR2)
| What are the number of the distinct move in dates of the residents?, could you show in ascending by the total number? | SELECT date_moved_in, COUNT(date_moved_in) FROM Residents ORDER BY COUNT(date_moved_in) | SELECT "date_moved_in", COUNT("date_moved_in") FROM "Residents" ORDER BY COUNT("date_moved_in") | 0.092773 |
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
| tell me the birth date of patient 88409? | SELECT patients.dob FROM patients WHERE patients.subject_id = 88409 | SELECT "patients"."dob" FROM "patients" WHERE "patients"."subject_id" = 88409 | 0.075195 |
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
| give me the difference between the total of the input and the output of patient 027-144847 on last month/27. | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-144847')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', intakeoutput.intakeoutputtime) = '27') - (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-144847')) AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', intakeoutput.intakeoutputtime) = '27') | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '027-144847' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid"), "_u_4" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_3" ON "_u_3"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_3"."" IS NULL GROUP BY "patientunitstayid") SELECT (SELECT SUM("intakeoutput"."cellvaluenumeric") FROM "intakeoutput" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."cellpath" LIKE '%intake%' AND DATETIME("intakeoutput"."intakeoutputtime", 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND NOT "_u_1"."" IS NULL AND STRFTIME('%d', "intakeoutput"."intakeoutputtime") = '27') - (SELECT SUM("intakeoutput"."cellvaluenumeric") FROM "intakeoutput" LEFT JOIN "_u_4" "_u_4" ON "_u_4"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."cellpath" LIKE '%output%' AND DATETIME("intakeoutput"."intakeoutputtime", 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND NOT "_u_4"."" IS NULL AND STRFTIME('%d', "intakeoutput"."intakeoutputtime") = '27') | 1.331055 |
CREATE TABLE table_1862 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" CLOB, "Directed by" CLOB, "Written by" CLOB, "Original air date" CLOB, "Production code" FLOAT)
| When 'c'est la vinnie' is the title what is the air date? | SELECT "Original air date" FROM table_1862 WHERE "Title" = 'C''est la Vinnie' | SELECT "Original air date" FROM "table_1862" WHERE "Title" = 'C''est la Vinnie' | 0.077148 |
CREATE TABLE table_20748 ("Home team" CLOB, "Home team score" CLOB, "Away team" CLOB, "Away team score" CLOB, "Ground" CLOB, "Date" CLOB, "Crowd" FLOAT)
| Name the away team score for carlton | SELECT "Away team score" FROM table_20748 WHERE "Home team" = 'Carlton' | SELECT "Away team score" FROM "table_20748" WHERE "Home team" = 'Carlton' | 0.071289 |
CREATE TABLE Manufacturers (Code NUMBER, Name VARCHAR2, Headquarter VARCHAR2, Founder VARCHAR2, Revenue FLOAT)
CREATE TABLE Products (Code NUMBER, Name VARCHAR2, Price NUMBER, Manufacturer NUMBER)
| For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the sum of code , and group by attribute name, and sort Y-axis in descending order. | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC | SELECT "T1"."Name", "T1"."Code" FROM "Products" "T1" JOIN "Manufacturers" "T2" ON "T1"."Manufacturer" = "T2"."Code" GROUP BY "T1"."Name" ORDER BY "T1"."Code" DESC | 0.158203 |
CREATE TABLE table_name_7 (date VARCHAR2, away_team VARCHAR2)
| What is Date, when Away Team is 'Barnet'? | SELECT date FROM table_name_7 WHERE away_team = "barnet" | SELECT "date" FROM "table_name_7" WHERE "away_team" = "barnet" | 0.060547 |
CREATE TABLE table_3201 ("District" CLOB, "Incumbent" CLOB, "Party" CLOB, "First elected" CLOB, "Result" CLOB, "Candidates" CLOB)
| Name the candidates for 1998 | SELECT "Candidates" FROM table_3201 WHERE "First elected" = '1998' | SELECT "Candidates" FROM "table_3201" WHERE "First elected" = '1998' | 0.066406 |
CREATE TABLE table_name_30 (constructor VARCHAR2, driver VARCHAR2)
| Who constructed pedro diniz's car? | SELECT constructor FROM table_name_30 WHERE driver = "pedro diniz" | SELECT "constructor" FROM "table_name_30" WHERE "driver" = "pedro diniz" | 0.070313 |
CREATE TABLE table_23248869_8 (score VARCHAR2, record VARCHAR2)
| What was the score when the record was 19 35 | SELECT score FROM table_23248869_8 WHERE record = "19–35" | SELECT "score" FROM "table_23248869_8" WHERE "19–35" = "record" | 0.061523 |
CREATE TABLE table_67711 ("Rank" FLOAT, "Games" FLOAT, "Player" CLOB, "Club/Clubs" CLOB, "Career span" CLOB)
| Which rank is Hawthorn? | SELECT "Rank" FROM table_67711 WHERE "Club/Clubs" = 'hawthorn' | SELECT "Rank" FROM "table_67711" WHERE "Club/Clubs" = 'hawthorn' | 0.0625 |
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
| Can I take 523 on Mondays and Wednesdays ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 523 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | SELECT COUNT(*) > 0 FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" AND "course_offering"."friday" = 'N' AND "course_offering"."monday" = 'Y' AND "course_offering"."thursday" = 'N' AND "course_offering"."tuesday" = 'N' AND "course_offering"."wednesday" = 'Y' JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'WN' AND "semester"."year" = 2016 WHERE "course"."department" = 'EECS' AND "course"."number" = 523 | 0.493164 |
CREATE TABLE table_30011_2 (example VARCHAR2, equivalent VARCHAR2)
| What is every example for the equivalent of NTE160? | SELECT example FROM table_30011_2 WHERE equivalent = "NTE160" | SELECT "example" FROM "table_30011_2" WHERE "NTE160" = "equivalent" | 0.06543 |
CREATE TABLE table_name_80 (ihsaa_class VARCHAR2, _number___county VARCHAR2, mascot VARCHAR2)
| What IHSAA clas is the school with a county number of 12 clinton and the hornets as their mascot? | SELECT ihsaa_class FROM table_name_80 WHERE _number___county = "12 clinton" AND mascot = "hornets" | SELECT "ihsaa_class" FROM "table_name_80" WHERE "12 clinton" = "_number___county" AND "hornets" = "mascot" | 0.103516 |
CREATE TABLE table_69569 ("Arena/Venue" CLOB, "Home Campus" CLOB, "Location" CLOB, "Province/Region" CLOB, "Maximum Seating Capacity" CLOB, "Year Opened" CLOB)
| Where is the Cagayan de Oro city located? | SELECT "Province/Region" FROM table_69569 WHERE "Location" = 'cagayan de oro city' | SELECT "Province/Region" FROM "table_69569" WHERE "Location" = 'cagayan de oro city' | 0.082031 |
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
| what is the cost of drug name aspirin chew tab 81 mg? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'aspirin chew tab 81 mg') | WITH "_u_0" AS (SELECT "medication"."medicationid" FROM "medication" WHERE "medication"."drugname" = 'aspirin chew tab 81 mg' GROUP BY "medicationid") SELECT DISTINCT "cost"."cost" FROM "cost" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "cost"."eventid" WHERE "cost"."eventtype" = 'medication' AND NOT "_u_0"."" IS NULL | 0.306641 |
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
| show me the four year survival rate of patients who were prescribed dextrose 5% after they were diagnosed with sarcoidosis? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'sarcoidosis') GROUP BY admissions.subject_id HAVING MIN(diagnoses_icd.charttime) = diagnoses_icd.charttime) AS t1 WHERE STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', t1.charttime) > 4 * 365) AS t2 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'dextrose 5%') AS t3 ON t2.subject_id = t3.subject_id WHERE t2.charttime < t3.startdate) AS t4 JOIN patients ON t4.subject_id = patients.subject_id | WITH "t1" AS (SELECT "admissions"."subject_id", "diagnoses_icd"."charttime" FROM "diagnoses_icd" JOIN "d_icd_diagnoses" ON "d_icd_diagnoses"."icd9_code" = "diagnoses_icd"."icd9_code" AND "d_icd_diagnoses"."short_title" = 'sarcoidosis' JOIN "admissions" ON "admissions"."hadm_id" = "diagnoses_icd"."hadm_id" GROUP BY "admissions"."subject_id" HAVING "diagnoses_icd"."charttime" = MIN("diagnoses_icd"."charttime")), "t3" AS (SELECT "admissions"."subject_id", "prescriptions"."startdate" FROM "prescriptions" JOIN "admissions" ON "admissions"."hadm_id" = "prescriptions"."hadm_id" WHERE "prescriptions"."drug" = 'dextrose 5%') SELECT SUM(CASE WHEN "patients"."dod" IS NULL THEN 1 WHEN STRFTIME('%j', "patients"."dod") - STRFTIME('%j', "t1"."charttime") > 1460 THEN 1 ELSE 0 END) * 100 / NULLIF(COUNT(*), 0) FROM "t1" "t1" JOIN "t3" "t3" ON "t1"."charttime" < "t3"."startdate" AND "t1"."subject_id" = "t3"."subject_id" JOIN "patients" ON "patients"."subject_id" = "t1"."subject_id" WHERE STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', "t1"."charttime") > 1460 | 1.03125 |
CREATE TABLE table_68880 ("Res." CLOB, "Record" CLOB, "Opponent" CLOB, "Method" CLOB, "Event" CLOB, "Round" FLOAT, "Time" CLOB, "Location" CLOB)
| What was the record after the fight that lasted 8:17? | SELECT "Record" FROM table_68880 WHERE "Time" = '8:17' | SELECT "Record" FROM "table_68880" WHERE "Time" = '8:17' | 0.054688 |
CREATE TABLE table_1602620_1 (type VARCHAR2, office VARCHAR2)
| What type are State Assemblyman | SELECT type FROM table_1602620_1 WHERE office = "State Assemblyman" | SELECT "type" FROM "table_1602620_1" WHERE "State Assemblyman" = "office" | 0.071289 |
CREATE TABLE table_49896 ("Round" FLOAT, "Pick" FLOAT, "Player" CLOB, "Position" CLOB, "School/Club Team" CLOB)
| What pick in a round earlier than 4 did UCLA choose their pick? | SELECT "Pick" FROM table_49896 WHERE "Round" < '4' AND "School/Club Team" = 'ucla' | SELECT "Pick" FROM "table_49896" WHERE "Round" < '4' AND "School/Club Team" = 'ucla' | 0.082031 |
CREATE TABLE table_41543 ("Date" CLOB, "Tournament" CLOB, "Winning score" CLOB, "Margin of victory" CLOB, "Runner ( s ) -up" CLOB)
| What date has yani tseng as the runner (s)-up? | SELECT "Date" FROM table_41543 WHERE "Runner(s)-up" = 'yani tseng' | SELECT "Date" FROM "table_41543" WHERE "Runner(s)-up" = 'yani tseng' | 0.066406 |
CREATE TABLE table_22301 ("Player" CLOB, "FCSL Team" CLOB, "Years Played" CLOB, "Year Drafted" FLOAT, "Round" CLOB, "MLB Team" CLOB)
| When winter pines is the fcsl team how many mlb teams are there? | SELECT COUNT("MLB Team") FROM table_22301 WHERE "FCSL Team" = 'Winter Pines' | SELECT COUNT("MLB Team") FROM "table_22301" WHERE "FCSL Team" = 'Winter Pines' | 0.076172 |
CREATE TABLE table_76598 ("Year" FLOAT, "Starts" FLOAT, "Wins" FLOAT, "Top 10" FLOAT, "Avg. Start" FLOAT, "Avg. Finish" FLOAT, "Winnings" CLOB, "Position" CLOB)
| How many wins for average start less than 25? | SELECT COUNT("Wins") FROM table_76598 WHERE "Avg. Start" < '25' | SELECT COUNT("Wins") FROM "table_76598" WHERE "Avg. Start" < '25' | 0.063477 |
CREATE TABLE table_12172 ("Outcome" CLOB, "Date" CLOB, "Tournament" CLOB, "Surface" CLOB, "Partner" CLOB, "Opponents" CLOB, "Score" CLOB)
| The tournament with a partner listed as Aurelija Misevi i t had what kind of surface? | SELECT "Surface" FROM table_12172 WHERE "Partner" = 'aurelija misevičiūtė' | SELECT "Surface" FROM "table_12172" WHERE "Partner" = 'aurelija misevičiūtė' | 0.074219 |
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
| how many patients whose admission year is less than 2184 and lab test fluid is pleural? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2184" AND lab.fluid = "Pleural" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "lab" ON "Pleural" = "lab"."fluid" AND "demographic"."hadm_id" = "lab"."hadm_id" WHERE "2184" > "demographic"."admityear" | 0.19043 |
CREATE TABLE table_55897 ("Date" CLOB, "Opponent" CLOB, "Score" CLOB, "Loss" CLOB, "Attendance" CLOB, "Record" CLOB)
| What is the record of the game with 18,084 in attendance? | SELECT "Record" FROM table_55897 WHERE "Attendance" = '18,084' | SELECT "Record" FROM "table_55897" WHERE "Attendance" = '18,084' | 0.0625 |
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
| Is RCARTS 285 required for RCARTS 289 ? | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_0.department = 'RCARTS' AND COURSE_0.number = 285 AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'RCARTS' AND COURSE_1.number = 289 | SELECT COUNT(*) > 0 FROM "course" "COURSE_0" JOIN "course_prerequisite" ON "COURSE_0"."course_id" = "course_prerequisite"."pre_course_id" JOIN "course" "COURSE_1" ON "COURSE_1"."course_id" = "course_prerequisite"."course_id" AND "COURSE_1"."department" = 'RCARTS' AND "COURSE_1"."number" = 289 WHERE "COURSE_0"."department" = 'RCARTS' AND "COURSE_0"."number" = 285 | 0.355469 |
CREATE TABLE table_60497 ("Week" CLOB, "Date" CLOB, "Opponent" CLOB, "Result" CLOB, "Record" CLOB, "Game site" CLOB)
| What week's game had a result of bye? | SELECT "Week" FROM table_60497 WHERE "Result" = 'bye' | SELECT "Week" FROM "table_60497" WHERE "Result" = 'bye' | 0.053711 |
CREATE TABLE table_name_88 (overs VARCHAR2, matches VARCHAR2)
| What is the overs when the matches are 10? | SELECT overs FROM table_name_88 WHERE matches = "10" | SELECT "overs" FROM "table_name_88" WHERE "10" = "matches" | 0.056641 |
CREATE TABLE table_12486 ("District" CLOB, "Incumbent" CLOB, "Party" CLOB, "First elected" FLOAT, "Results" CLOB, "Candidates" CLOB)
| What party has the district Georgia 7? | SELECT "Party" FROM table_12486 WHERE "District" = 'georgia 7' | SELECT "Party" FROM "table_12486" WHERE "District" = 'georgia 7' | 0.0625 |
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
| SELECT * FROM Sites. | SELECT * FROM Users | SELECT * FROM "Users" | 0.020508 |
CREATE TABLE table_38655 ("Discipline" CLOB, "Peter" FLOAT, "Adam" FLOAT, "Jade" FLOAT, "Plat'num" FLOAT)
| What is Adam's score when Peter's score is less than 3 and the plat'num is greater than 6? | SELECT MIN("Adam") FROM table_38655 WHERE "Peter" < '3' AND "Plat'num" > '6' | SELECT MIN("Adam") FROM "table_38655" WHERE "Peter" < '3' AND "Plat'num" > '6' | 0.076172 |
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
| what were the top three most commonly prescribed medications that patients were prescribed during the same hospital encounter after being diagnosed with septic arthritis? | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'septic arthritis') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | WITH "t2" AS (SELECT "patient"."uniquepid", "medication"."drugname", "medication"."drugstarttime", "patient"."patienthealthsystemstayid" FROM "medication" JOIN "patient" ON "medication"."patientunitstayid" = "patient"."patientunitstayid"), "t3" AS (SELECT "t2"."drugname", DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS "c1" FROM "diagnosis" JOIN "patient" ON "diagnosis"."patientunitstayid" = "patient"."patientunitstayid" JOIN "t2" "t2" ON "diagnosis"."diagnosistime" < "t2"."drugstarttime" AND "patient"."patienthealthsystemstayid" = "t2"."patienthealthsystemstayid" AND "patient"."uniquepid" = "t2"."uniquepid" WHERE "diagnosis"."diagnosisname" = 'septic arthritis' GROUP BY "t2"."drugname") SELECT "t3"."drugname" FROM "t3" "t3" WHERE "t3"."c1" <= 3 | 0.735352 |
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| Find out the time of admission and number of days for which the patient with patient id 15061 stayed in the hospital. | SELECT demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "15061" | SELECT "demographic"."days_stay", "demographic"."admittime" FROM "demographic" WHERE "15061" = "demographic"."subject_id" | 0.118164 |
CREATE TABLE table_name_16 (order__number VARCHAR2, week__number VARCHAR2)
| What is the order number that has top 20 (10 women) as the week number? | SELECT order__number FROM table_name_16 WHERE week__number = "top 20 (10 women)" | SELECT "order__number" FROM "table_name_16" WHERE "top 20 (10 women)" = "week__number" | 0.083984 |
CREATE TABLE table_52343 ("Driver" CLOB, "Constructor" CLOB, "Laps" FLOAT, "Time/Retired" CLOB, "Grid" FLOAT)
| what is the grid when the time/retired is 1:46:42.3? | SELECT SUM("Grid") FROM table_52343 WHERE "Time/Retired" = '1:46:42.3' | SELECT SUM("Grid") FROM "table_52343" WHERE "Time/Retired" = '1:46:42.3' | 0.070313 |
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
| what did patient 95280 have first as the output on the first icu visit? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95280) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) ORDER BY outputevents.charttime LIMIT 1) | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 95280 GROUP BY "hadm_id"), "_u_1" AS (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE NOT "_u_0"."" IS NULL AND NOT "icustays"."outtime" IS NULL GROUP BY "icustay_id" ORDER BY "icustays"."intime" FETCH FIRST 1 ROWS ONLY), "_u_2" AS (SELECT "outputevents"."itemid" FROM "outputevents" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "outputevents"."icustay_id" WHERE NOT "_u_1"."" IS NULL GROUP BY "itemid" ORDER BY "outputevents"."charttime" FETCH FIRST 1 ROWS ONLY) SELECT "d_items"."label" FROM "d_items" LEFT JOIN "_u_2" "_u_2" ON "_u_2"."" = "d_items"."itemid" WHERE NOT "_u_2"."" IS NULL | 0.728516 |
CREATE TABLE table_11583 ("Series" CLOB, "Monday" CLOB, "Tuesday" CLOB, "Wednesday" CLOB, "Thursday" CLOB, "Friday" CLOB, "Saturday" CLOB, "Sunday" CLOB)
| Who was the presenter on Monday of 'Big Brother 13' in which Alice Levine Jamie East presented on Sunday? | SELECT "Monday" FROM table_11583 WHERE "Sunday" = 'alice levine jamie east' AND "Series" = 'big brother 13' | SELECT "Monday" FROM "table_11583" WHERE "Series" = 'big brother 13' AND "Sunday" = 'alice levine jamie east' | 0.106445 |
CREATE TABLE table_43805 ("Release date" CLOB, "Album title" CLOB, "Record label" CLOB, "Disc number" CLOB, "Track number" CLOB, "Title" CLOB)
| Which Track number has a Album title of , and a Title of ? | SELECT "Track number" FROM table_43805 WHERE "Album title" = '文武双全升级版' AND "Title" = '老爸你别装酷' | SELECT "Track number" FROM "table_43805" WHERE "Album title" = '文武双全升级版' AND "Title" = '老爸你别装酷' | 0.092773 |
CREATE TABLE order_items (order_item_id NUMBER, order_id NUMBER, product_id NUMBER, product_quantity CLOB, other_order_item_details CLOB)
CREATE TABLE products (product_id NUMBER, parent_product_id NUMBER, production_type_code CLOB, unit_price NUMBER, product_name CLOB, product_color CLOB, product_size CLOB)
CREATE TABLE invoice_line_items (order_item_id NUMBER, invoice_number NUMBER, product_id NUMBER, product_title CLOB, product_quantity CLOB, product_price NUMBER, derived_product_cost NUMBER, derived_vat_payable NUMBER, derived_total_cost NUMBER)
CREATE TABLE accounts (account_id NUMBER, customer_id NUMBER, date_account_opened TIME, account_name CLOB, other_account_details CLOB)
CREATE TABLE product_categories (production_type_code CLOB, product_type_description CLOB, vat_rating NUMBER)
CREATE TABLE financial_transactions (transaction_id NUMBER, account_id NUMBER, invoice_number NUMBER, transaction_type CLOB, transaction_date TIME, transaction_amount NUMBER, transaction_comment CLOB, other_transaction_details CLOB)
CREATE TABLE invoices (invoice_number NUMBER, order_id NUMBER, invoice_date TIME)
CREATE TABLE orders (order_id NUMBER, customer_id NUMBER, date_order_placed TIME, order_details CLOB)
CREATE TABLE customers (customer_id NUMBER, customer_first_name CLOB, customer_middle_initial CLOB, customer_last_name CLOB, gender CLOB, email_address CLOB, login_name CLOB, login_password CLOB, phone_number CLOB, town_city CLOB, state_county_province CLOB, country CLOB)
| Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'. | SELECT T1.account_id, T1.date_account_opened, T1.account_name, T1.other_account_details FROM accounts AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | SELECT "T1"."account_id", "T1"."date_account_opened", "T1"."account_name", "T1"."other_account_details" FROM "accounts" "T1" JOIN "customers" "T2" ON "T1"."customer_id" = "T2"."customer_id" AND "T2"."customer_first_name" = 'Meaghan' | 0.226563 |
CREATE TABLE table_name_29 (championship_game VARCHAR2, conference VARCHAR2)
| Tell me the championship game for big eight | SELECT championship_game FROM table_name_29 WHERE conference = "big eight" | SELECT "championship_game" FROM "table_name_29" WHERE "big eight" = "conference" | 0.078125 |
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
| provide the number of patients whose primary disease is posterior communicating aneurysm/sda and age is less than 68? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" AND demographic.age < "68" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "68" > "demographic"."age" AND "POSTERIOR COMMUNICATING ANEURYSM/SDA" = "demographic"."diagnosis" | 0.167969 |
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
| what is the actual number of patients discharged from a hospital in 2102? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2102' | SELECT COUNT(DISTINCT "patient"."uniquepid") FROM "patient" WHERE NOT "patient"."hospitaldischargetime" IS NULL AND STRFTIME('%y', "patient"."hospitaldischargetime") = '2102' | 0.169922 |
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
| until 1 year ago, patient 032-14800 was diagnosed for the first time with what? | SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-14800')) AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY diagnosis.diagnosistime LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '032-14800' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "diagnosis"."diagnosisname" FROM "diagnosis" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "diagnosis"."patientunitstayid" WHERE DATETIME("diagnosis"."diagnosistime") <= DATETIME(CURRENT_TIME(), '-1 year') AND NOT "_u_1"."" IS NULL ORDER BY "diagnosis"."diagnosistime" FETCH FIRST 1 ROWS ONLY | 0.631836 |
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
| what is the last rdw in patient 025-44842 during their current hospital visit? | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44842' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'rdw' ORDER BY lab.labresulttime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."hospitaldischargetime" IS NULL AND "patient"."uniquepid" = '025-44842' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "lab"."labresult" FROM "lab" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "lab"."patientunitstayid" WHERE "lab"."labname" = 'rdw' AND NOT "_u_1"."" IS NULL ORDER BY "lab"."labresulttime" DESC FETCH FIRST 1 ROWS ONLY | 0.602539 |
CREATE TABLE table_1137694_3 (winning_driver VARCHAR2, winning_constructor VARCHAR2)
| Who drove the winning car constructed by Jordan - Mugen-Honda? | SELECT winning_driver FROM table_1137694_3 WHERE winning_constructor = "Jordan - Mugen-Honda" | SELECT "winning_driver" FROM "table_1137694_3" WHERE "Jordan - Mugen-Honda" = "winning_constructor" | 0.09668 |
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
| when has patient 025-19271 for the last time received the urine, voided specimen microbiology test in 09/this year? | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-19271')) AND microlab.culturesite = 'urine, voided specimen' AND DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', microlab.culturetakentime) = '09' ORDER BY microlab.culturetakentime DESC LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '025-19271' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "microlab"."culturetakentime" FROM "microlab" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "microlab"."patientunitstayid" WHERE "microlab"."culturesite" = 'urine, voided specimen' AND DATETIME("microlab"."culturetakentime", 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND NOT "_u_1"."" IS NULL AND STRFTIME('%m', "microlab"."culturetakentime") = '09' ORDER BY "microlab"."culturetakentime" DESC FETCH FIRST 1 ROWS ONLY | 0.783203 |
CREATE TABLE table_26015 ("Branding" CLOB, "Callsign" CLOB, "Ch. #" CLOB, "Power kW" CLOB, "Station Type" CLOB, "Location ( Transmitter site ) " CLOB)
| When dwhr-tv is the call sign how many station types are there? | SELECT COUNT("Station Type") FROM table_26015 WHERE "Callsign" = 'DWHR-TV' | SELECT COUNT("Station Type") FROM "table_26015" WHERE "Callsign" = 'DWHR-TV' | 0.074219 |
CREATE TABLE wedding (YEAR VARCHAR2)
| How many weddings are there in year 2016? | SELECT COUNT(*) FROM wedding WHERE YEAR = 2016 | SELECT COUNT(*) FROM "wedding" WHERE "YEAR" = 2016 | 0.048828 |
CREATE TABLE table_46603 ("Res." CLOB, "Record" CLOB, "Opponent" CLOB, "Method" CLOB, "Event" CLOB, "Round" CLOB, "Location" CLOB)
| What was the result fot the UFC 85 event? | SELECT "Res." FROM table_46603 WHERE "Event" = 'ufc 85' | SELECT "Res." FROM "table_46603" WHERE "Event" = 'ufc 85' | 0.055664 |
CREATE TABLE table_25518547_2 (mls_team VARCHAR2, player VARCHAR2)
| What team does Seth Sinovic play for? | SELECT mls_team FROM table_25518547_2 WHERE player = "Seth Sinovic" | SELECT "mls_team" FROM "table_25518547_2" WHERE "Seth Sinovic" = "player" | 0.071289 |
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
| give me the number of patients whose ethnicity is black/cape verdean and procedure icd9 code is 8674? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND procedures.icd9_code = "8674" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "procedures" ON "8674" = "procedures"."icd9_code" AND "demographic"."hadm_id" = "procedures"."hadm_id" WHERE "BLACK/CAPE VERDEAN" = "demographic"."ethnicity" | 0.225586 |
CREATE TABLE lab (subject_id CLOB, hadm_id CLOB, itemid CLOB, charttime CLOB, flag CLOB, value_unit CLOB, label CLOB, fluid CLOB)
CREATE TABLE demographic (subject_id CLOB, hadm_id CLOB, name CLOB, marital_status CLOB, age CLOB, dob CLOB, gender CLOB, language CLOB, religion CLOB, admission_type CLOB, days_stay CLOB, insurance CLOB, ethnicity CLOB, expire_flag CLOB, admission_location CLOB, discharge_location CLOB, diagnosis CLOB, dod CLOB, dob_year CLOB, dod_year CLOB, admittime CLOB, dischtime CLOB, admityear CLOB)
CREATE TABLE diagnoses (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE prescriptions (subject_id CLOB, hadm_id CLOB, icustay_id CLOB, drug_type CLOB, drug CLOB, formulary_drug_cd CLOB, route CLOB, drug_dose CLOB)
CREATE TABLE procedures (subject_id CLOB, hadm_id CLOB, icd9_code CLOB, short_title CLOB, long_title CLOB)
| which patients have prescription for milrinone? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Milrinone" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "Milrinone" = "prescriptions"."drug" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" | 0.180664 |
CREATE TABLE table_name_88 (part_4 VARCHAR2, class VARCHAR2)
| What is the part 4 entry for class 7b? | SELECT part_4 FROM table_name_88 WHERE class = "7b" | SELECT "part_4" FROM "table_name_88" WHERE "7b" = "class" | 0.055664 |
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
| Most upvoted answers of the past 6 months in a tag. | SELECT Posts.Id AS "post_link", Posts.Score FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Posts.PostTypeId = 1 AND Posts.CreationDate >= DATEADD(MONTH, -6, GETDATE()) AND Posts.CreationDate <= GETDATE() AND Tags.TagName = @TagName ORDER BY Score DESC | SELECT "Posts"."Id" AS "post_link", "Posts"."Score" FROM "Posts" JOIN "PostTags" ON "PostTags"."PostId" = "Posts"."Id" JOIN "Tags" ON "PostTags"."TagId" = "Tags"."Id" AND "Tags"."TagName" = @TagName WHERE "Posts"."CreationDate" <= GETDATE() AND "Posts"."CreationDate" >= DATEADD("MONTH", -6, GETDATE()) AND "Posts"."PostTypeId" = 1 ORDER BY "Score" DESC | 0.344727 |
CREATE TABLE table_20951 ("Year" FLOAT, "Edmonton Hundred" FLOAT, "Elthorne Hundred" FLOAT, "Gore Hundred" FLOAT, "Isleworth Hundred" FLOAT, "Holborn Division" FLOAT, "Finsbury Division" FLOAT, "Kensington Division" FLOAT, "Tower Division" FLOAT, "Spelthorne Hundred" FLOAT, "Within the Walls" FLOAT, "Without the Walls" FLOAT, "Inns of Court and Chancery" FLOAT, "Westminster City and Liberty" FLOAT, "Total" FLOAT)
| When 12743 is the spelthorne what is the largest gore hundred? | SELECT MAX("Gore Hundred") FROM table_20951 WHERE "Spelthorne Hundred" = '12743' | SELECT MAX("Gore Hundred") FROM "table_20951" WHERE "Spelthorne Hundred" = '12743' | 0.080078 |
CREATE TABLE table_train_127 ("id" NUMBER, "depression" BOOLEAN, "mini_mental_state_examination_mmse" NUMBER, "back_pain" BOOLEAN, "renal_disease" BOOLEAN, "osteoarthritis" BOOLEAN, "hamilton_depression_scale_hds" NUMBER, "liver_disease" BOOLEAN, "painful_condition" BOOLEAN, "other_chronic_musculoskeletal_pain" BOOLEAN, "major_depression" BOOLEAN, "NOUSE" FLOAT)
| history of liver or renal disease | SELECT * FROM table_train_127 WHERE liver_disease = 1 OR renal_disease = 1 | SELECT * FROM "table_train_127" WHERE "liver_disease" = 1 OR "renal_disease" = 1 | 0.078125 |
CREATE TABLE table_203_125 (id NUMBER, "club" CLOB, "winners" NUMBER, "runner-ups" NUMBER, "winning years" CLOB, "runner-up years" CLOB)
| what was the first year that grazer ak won a performance ? | SELECT "winning years" FROM table_203_125 WHERE "club" = 'grazer ak' ORDER BY "winning years" LIMIT 1 | SELECT "winning years" FROM "table_203_125" WHERE "club" = 'grazer ak' ORDER BY "winning years" FETCH FIRST 1 ROWS ONLY | 0.116211 |
CREATE TABLE table_name_24 (result VARCHAR2, game_site VARCHAR2, week VARCHAR2)
| What was the result for the game at Memorial Stadium in week 15? | SELECT result FROM table_name_24 WHERE game_site = "memorial stadium" AND week = 15 | SELECT "result" FROM "table_name_24" WHERE "game_site" = "memorial stadium" AND "week" = 15 | 0.088867 |
CREATE TABLE flight_leg (flight_id NUMBER, leg_number NUMBER, leg_flight NUMBER)
CREATE TABLE date_day (month_number NUMBER, day_number NUMBER, year NUMBER, day_name VARCHAR2)
CREATE TABLE food_service (meal_code CLOB, meal_number NUMBER, compartment CLOB, meal_description VARCHAR2)
CREATE TABLE time_interval (period CLOB, begin_time NUMBER, end_time NUMBER)
CREATE TABLE city (city_code VARCHAR2, city_name VARCHAR2, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2)
CREATE TABLE class_of_service (booking_class VARCHAR2, rank NUMBER, class_description CLOB)
CREATE TABLE airline (airline_code VARCHAR2, airline_name CLOB, note CLOB)
CREATE TABLE flight (aircraft_code_sequence CLOB, airline_code VARCHAR2, airline_flight CLOB, arrival_time NUMBER, connections NUMBER, departure_time NUMBER, dual_carrier CLOB, flight_days CLOB, flight_id NUMBER, flight_number NUMBER, from_airport VARCHAR2, meal_code CLOB, stops NUMBER, time_elapsed NUMBER, to_airport VARCHAR2)
CREATE TABLE flight_fare (flight_id NUMBER, fare_id NUMBER)
CREATE TABLE aircraft (aircraft_code VARCHAR2, aircraft_description VARCHAR2, manufacturer VARCHAR2, basic_type VARCHAR2, engines NUMBER, propulsion VARCHAR2, wide_body VARCHAR2, wing_span NUMBER, length NUMBER, weight NUMBER, capacity NUMBER, pay_load NUMBER, cruising_speed NUMBER, range_miles NUMBER, pressurized VARCHAR2)
CREATE TABLE ground_service (city_code CLOB, airport_code CLOB, transport_type CLOB, ground_fare NUMBER)
CREATE TABLE compartment_class (compartment VARCHAR2, class_type VARCHAR2)
CREATE TABLE airport (airport_code VARCHAR2, airport_name CLOB, airport_location CLOB, state_code VARCHAR2, country_name VARCHAR2, time_zone_code VARCHAR2, minimum_connect_time NUMBER)
CREATE TABLE dual_carrier (main_airline VARCHAR2, low_flight_number NUMBER, high_flight_number NUMBER, dual_airline VARCHAR2, service_name CLOB)
CREATE TABLE days (days_code VARCHAR2, day_name VARCHAR2)
CREATE TABLE restriction (restriction_code CLOB, advance_purchase NUMBER, stopovers CLOB, saturday_stay_required CLOB, minimum_stay NUMBER, maximum_stay NUMBER, application CLOB, no_discounts CLOB)
CREATE TABLE fare (fare_id NUMBER, from_airport VARCHAR2, to_airport VARCHAR2, fare_basis_code CLOB, fare_airline CLOB, restriction_code CLOB, one_direction_cost NUMBER, round_trip_cost NUMBER, round_trip_required VARCHAR2)
CREATE TABLE fare_basis (fare_basis_code CLOB, booking_class CLOB, class_type CLOB, premium CLOB, economy CLOB, discounted CLOB, night CLOB, season CLOB, basis_days CLOB)
CREATE TABLE flight_stop (flight_id NUMBER, stop_number NUMBER, stop_days CLOB, stop_airport CLOB, arrival_time NUMBER, arrival_airline CLOB, arrival_flight_number NUMBER, departure_time NUMBER, departure_airline CLOB, departure_flight_number NUMBER, stop_time NUMBER)
CREATE TABLE code_description (code VARCHAR2, description CLOB)
CREATE TABLE month (month_number NUMBER, month_name CLOB)
CREATE TABLE time_zone (time_zone_code CLOB, time_zone_name CLOB, hours_from_gmt NUMBER)
CREATE TABLE airport_service (city_code VARCHAR2, airport_code VARCHAR2, miles_distant NUMBER, direction VARCHAR2, minutes_distant NUMBER)
CREATE TABLE state (state_code CLOB, state_name CLOB, country_name CLOB)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR2, aircraft_code VARCHAR2)
| what airlines are there | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'DENVER' AND flight_stop.stop_airport = AIRPORT_SERVICE_2.airport_code AND flight.flight_id = flight_stop.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | SELECT DISTINCT "airline"."airline_code" FROM "airline" JOIN "flight" ON "airline"."airline_code" = "flight"."airline_code" JOIN "airport_service" "AIRPORT_SERVICE_0" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "flight_stop" ON "flight"."flight_id" = "flight_stop"."flight_id" JOIN "airport_service" "AIRPORT_SERVICE_2" ON "AIRPORT_SERVICE_2"."airport_code" = "flight_stop"."stop_airport" JOIN "city" "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'BOSTON' JOIN "city" "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'SAN FRANCISCO' JOIN "city" "CITY_2" ON "AIRPORT_SERVICE_2"."city_code" = "CITY_2"."city_code" AND "CITY_2"."city_name" = 'DENVER' | 0.849609 |
CREATE TABLE table_1184 ("No." FLOAT, "Date" CLOB, "Tournament" CLOB, "Winning score" CLOB, "To par" CLOB, "Margin of victory" CLOB, "Runner ( s ) -up" CLOB)
| What was the margin of victory at the Hawaiian Open tournament? | SELECT "Margin of victory" FROM table_1184 WHERE "Tournament" = 'Hawaiian Open' | SELECT "Margin of victory" FROM "table_1184" WHERE "Tournament" = 'Hawaiian Open' | 0.079102 |
CREATE TABLE table_name_42 (date VARCHAR2, opponent_number VARCHAR2)
| what is the date when the opponent# is iowa? | SELECT date FROM table_name_42 WHERE opponent_number = "iowa" | SELECT "date" FROM "table_name_42" WHERE "iowa" = "opponent_number" | 0.06543 |
CREATE TABLE cost (costid NUMBER, uniquepid CLOB, patienthealthsystemstayid NUMBER, eventtype CLOB, eventid NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE medication (medicationid NUMBER, patientunitstayid NUMBER, drugname CLOB, dosage CLOB, routeadmin CLOB, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE lab (labid NUMBER, patientunitstayid NUMBER, labname CLOB, labresult NUMBER, labresulttime TIME)
CREATE TABLE diagnosis (diagnosisid NUMBER, patientunitstayid NUMBER, diagnosisname CLOB, diagnosistime TIME, icd9code CLOB)
CREATE TABLE microlab (microlabid NUMBER, patientunitstayid NUMBER, culturesite CLOB, organism CLOB, culturetakentime TIME)
CREATE TABLE patient (uniquepid CLOB, patienthealthsystemstayid NUMBER, patientunitstayid NUMBER, gender CLOB, age CLOB, ethnicity CLOB, hospitalid NUMBER, wardid NUMBER, admissionheight NUMBER, admissionweight NUMBER, dischargeweight NUMBER, hospitaladmittime TIME, hospitaladmitsource CLOB, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus CLOB)
CREATE TABLE intakeoutput (intakeoutputid NUMBER, patientunitstayid NUMBER, cellpath CLOB, celllabel CLOB, cellvaluenumeric NUMBER, intakeoutputtime TIME)
CREATE TABLE allergy (allergyid NUMBER, patientunitstayid NUMBER, drugname CLOB, allergyname CLOB, allergytime TIME)
CREATE TABLE treatment (treatmentid NUMBER, patientunitstayid NUMBER, treatmentname CLOB, treatmenttime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid NUMBER, patientunitstayid NUMBER, temperature NUMBER, sao2 NUMBER, heartrate NUMBER, respiration NUMBER, systemicsystolic NUMBER, systemicdiastolic NUMBER, systemicmean NUMBER, observationtime TIME)
| when was the first time in their last hospital visit patient 015-35874 is prescribed metoprolol? | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-35874' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) AND medication.drugname = 'metoprolol' ORDER BY medication.drugstarttime LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '015-35874' AND NOT "patient"."hospitaldischargetime" IS NULL GROUP BY "patienthealthsystemstayid" ORDER BY "patient"."hospitaladmittime" DESC FETCH FIRST 1 ROWS ONLY), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "medication"."drugstarttime" FROM "medication" LEFT JOIN "_u_1" "_u_1" ON "_u_1"."" = "medication"."patientunitstayid" WHERE "medication"."drugname" = 'metoprolol' AND NOT "_u_1"."" IS NULL ORDER BY "medication"."drugstarttime" FETCH FIRST 1 ROWS ONLY | 0.713867 |
CREATE TABLE table_204_125 (id NUMBER, "state" CLOB, "type" CLOB, "name" CLOB, "title" CLOB, "royal house" CLOB, "from" CLOB, "to" CLOB)
| which ruler came first , si jun or min ? | SELECT "name" FROM table_204_125 WHERE "name" IN ('si jun', 'min') ORDER BY "from" LIMIT 1 | SELECT "name" FROM "table_204_125" WHERE "name" IN ('si jun', 'min') ORDER BY "from" FETCH FIRST 1 ROWS ONLY | 0.105469 |
CREATE TABLE table_name_93 (bb_pop VARCHAR2, riaa VARCHAR2, cb_cw VARCHAR2, year VARCHAR2)
| What is the BB pop of the song with a CB CW of 1, RIAA of P and was released more recently than 1976? | SELECT bb_pop FROM table_name_93 WHERE cb_cw = "1" AND year > 1976 AND riaa = "p" | SELECT "bb_pop" FROM "table_name_93" WHERE "1" = "cb_cw" AND "p" = "riaa" AND "year" > 1976 | 0.088867 |
CREATE TABLE admissions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, admittime TIME, dischtime TIME, admission_type CLOB, admission_location CLOB, discharge_location CLOB, insurance CLOB, language CLOB, marital_status CLOB, ethnicity CLOB, age NUMBER)
CREATE TABLE transfers (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, eventtype CLOB, careunit CLOB, wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE cost (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, event_type CLOB, event_id NUMBER, chargetime TIME, cost NUMBER)
CREATE TABLE microbiologyevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, charttime TIME, spec_type_desc CLOB, org_name CLOB)
CREATE TABLE d_icd_procedures (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE chartevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE inputevents_cv (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, amount NUMBER)
CREATE TABLE prescriptions (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, startdate TIME, enddate TIME, drug CLOB, dose_val_rx CLOB, dose_unit_rx CLOB, route CLOB)
CREATE TABLE labevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, itemid NUMBER, charttime TIME, valuenum NUMBER, valueuom CLOB)
CREATE TABLE d_labitems (row_id NUMBER, itemid NUMBER, label CLOB)
CREATE TABLE patients (row_id NUMBER, subject_id NUMBER, gender CLOB, dob TIME, dod TIME)
CREATE TABLE d_items (row_id NUMBER, itemid NUMBER, label CLOB, linksto CLOB)
CREATE TABLE d_icd_diagnoses (row_id NUMBER, icd9_code CLOB, short_title CLOB, long_title CLOB)
CREATE TABLE outputevents (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, charttime TIME, itemid NUMBER, value NUMBER)
CREATE TABLE icustays (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icustay_id NUMBER, first_careunit CLOB, last_careunit CLOB, first_wardid NUMBER, last_wardid NUMBER, intime TIME, outtime TIME)
CREATE TABLE procedures_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
CREATE TABLE diagnoses_icd (row_id NUMBER, subject_id NUMBER, hadm_id NUMBER, icd9_code CLOB, charttime TIME)
| what was the last type of the hospital admission of patient 60136 since 2105? | SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 60136 AND STRFTIME('%y', admissions.admittime) >= '2105' ORDER BY admissions.admittime DESC LIMIT 1 | SELECT "admissions"."admission_type" FROM "admissions" WHERE "admissions"."subject_id" = 60136 AND STRFTIME('%y', "admissions"."admittime") >= '2105' ORDER BY "admissions"."admittime" DESC FETCH FIRST 1 ROWS ONLY | 0.207031 |
CREATE TABLE PostNoticeTypes (Id NUMBER, ClassId NUMBER, Name CLOB, Body CLOB, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId NUMBER)
CREATE TABLE PostTags (PostId NUMBER, TagId NUMBER)
CREATE TABLE PostNotices (Id NUMBER, PostId NUMBER, PostNoticeTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body CLOB, OwnerUserId NUMBER, DeletionUserId NUMBER)
CREATE TABLE PostTypes (Id NUMBER, Name CLOB)
CREATE TABLE PendingFlags (Id NUMBER, FlagTypeId NUMBER, PostId NUMBER, CreationDate TIME, CloseReasonTypeId NUMBER, CloseAsOffTopicReasonTypeId NUMBER, DuplicateOfQuestionId NUMBER, BelongsOnBaseHostAddress CLOB)
CREATE TABLE ReviewTaskTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostLinks (Id NUMBER, CreationDate TIME, PostId NUMBER, RelatedPostId NUMBER, LinkTypeId NUMBER)
CREATE TABLE SuggestedEdits (Id NUMBER, PostId NUMBER, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId NUMBER, Comment CLOB, Text CLOB, Title CLOB, Tags CLOB, RevisionGUID other)
CREATE TABLE Votes (Id NUMBER, PostId NUMBER, VoteTypeId NUMBER, UserId NUMBER, CreationDate TIME, BountyAmount NUMBER)
CREATE TABLE FlagTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistoryTypes (Id NUMBER, Name CLOB)
CREATE TABLE PostsWithDeleted (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE ReviewTaskResults (Id NUMBER, ReviewTaskId NUMBER, ReviewTaskResultTypeId NUMBER, CreationDate TIME, RejectionReasonId NUMBER, Comment CLOB)
CREATE TABLE Tags (Id NUMBER, TagName CLOB, Count NUMBER, ExcerptPostId NUMBER, WikiPostId NUMBER)
CREATE TABLE ReviewTaskStates (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostHistory (Id NUMBER, PostHistoryTypeId NUMBER, PostId NUMBER, RevisionGUID other, CreationDate TIME, UserId NUMBER, UserDisplayName CLOB, Comment CLOB, Text CLOB, ContentLicense CLOB)
CREATE TABLE Comments (Id NUMBER, PostId NUMBER, Score NUMBER, Text CLOB, CreationDate TIME, UserDisplayName CLOB, UserId NUMBER, ContentLicense CLOB)
CREATE TABLE TagSynonyms (Id NUMBER, SourceTagName CLOB, TargetTagName CLOB, CreationDate TIME, OwnerUserId NUMBER, AutoRenameCount NUMBER, LastAutoRename TIME, Score NUMBER, ApprovedByUserId NUMBER, ApprovalDate TIME)
CREATE TABLE Posts (Id NUMBER, PostTypeId NUMBER, AcceptedAnswerId NUMBER, ParentId NUMBER, CreationDate TIME, DeletionDate TIME, Score NUMBER, ViewCount NUMBER, Body CLOB, OwnerUserId NUMBER, OwnerDisplayName CLOB, LastEditorUserId NUMBER, LastEditorDisplayName CLOB, LastEditDate TIME, LastActivityDate TIME, Title CLOB, Tags CLOB, AnswerCount NUMBER, CommentCount NUMBER, FavoriteCount NUMBER, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense CLOB)
CREATE TABLE VoteTypes (Id NUMBER, Name CLOB)
CREATE TABLE Badges (Id NUMBER, UserId NUMBER, Name CLOB, Date TIME, Class NUMBER, TagBased BOOLEAN)
CREATE TABLE SuggestedEditVotes (Id NUMBER, SuggestedEditId NUMBER, UserId NUMBER, VoteTypeId NUMBER, CreationDate TIME, TargetUserId NUMBER, TargetRepChange NUMBER)
CREATE TABLE CloseReasonTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE ReviewTasks (Id NUMBER, ReviewTaskTypeId NUMBER, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId NUMBER, PostId NUMBER, SuggestedEditId NUMBER, CompletedByReviewTaskId NUMBER)
CREATE TABLE ReviewTaskResultTypes (Id NUMBER, Name CLOB, Description CLOB)
CREATE TABLE PostFeedback (Id NUMBER, PostId NUMBER, IsAnonymous BOOLEAN, VoteTypeId NUMBER, CreationDate TIME)
CREATE TABLE Users (Id NUMBER, Reputation NUMBER, CreationDate TIME, DisplayName CLOB, LastAccessDate TIME, WebsiteUrl CLOB, Location CLOB, AboutMe CLOB, Views NUMBER, UpVotes NUMBER, DownVotes NUMBER, ProfileImageUrl CLOB, EmailHash CLOB, AccountId NUMBER)
CREATE TABLE CloseAsOffTopicReasonTypes (Id NUMBER, IsUniversal BOOLEAN, InputTitle CLOB, MarkdownInputGuidance CLOB, MarkdownPostOwnerGuidance CLOB, MarkdownPrivilegedUserGuidance CLOB, MarkdownConcensusDescription CLOB, CreationDate TIME, CreationModeratorId NUMBER, ApprovalDate TIME, ApprovalModeratorId NUMBER, DeactivationDate TIME, DeactivationModeratorId NUMBER)
CREATE TABLE ReviewRejectionReasons (Id NUMBER, Name CLOB, Description CLOB, PostTypeId NUMBER)
| HNQ-ed, de-HNQ-ed and community bumped questions since the last week. | SELECT PostHistory.PostId AS "post_link", PostHistoryTypes.Name, PostHistory.CreationDate FROM PostHistory, PostHistoryTypes WHERE PostHistory.PostHistoryTypeId >= 50 AND PostHistoryTypes.Id = PostHistory.PostHistoryTypeId AND PostHistory.CreationDate > @Since ORDER BY PostHistory.Id DESC | SELECT "PostHistory"."PostId" AS "post_link", "PostHistoryTypes"."Name", "PostHistory"."CreationDate" FROM "PostHistory" JOIN "PostHistoryTypes" ON "PostHistory"."PostHistoryTypeId" = "PostHistoryTypes"."Id" WHERE "PostHistory"."CreationDate" > @Since AND "PostHistory"."PostHistoryTypeId" >= 50 ORDER BY "PostHistory"."Id" DESC | 0.320313 |
CREATE TABLE table_15431 ("Rider" CLOB, "Manufacturer" CLOB, "Laps" FLOAT, "Time/Retired" CLOB, "Grid" FLOAT)
| with a Time/Retired of +47.376 what is the lap sum? | SELECT SUM("Laps") FROM table_15431 WHERE "Time/Retired" = '+47.376' | SELECT SUM("Laps") FROM "table_15431" WHERE "Time/Retired" = '+47.376' | 0.068359 |
CREATE TABLE table_name_37 (role VARCHAR2, year VARCHAR2)
| What role was played in 2007? | SELECT role FROM table_name_37 WHERE year = 2007 | SELECT "role" FROM "table_name_37" WHERE "year" = 2007 | 0.052734 |
CREATE TABLE table_name_58 (location VARCHAR2, score VARCHAR2)
| what is the location when the score is w 105-99? | SELECT location FROM table_name_58 WHERE score = "w 105-99" | SELECT "location" FROM "table_name_58" WHERE "score" = "w 105-99" | 0.063477 |
CREATE TABLE table_204_704 (id NUMBER, "province" CLOB, "map #" NUMBER, "iso 3166-2:af" CLOB, "centers" CLOB, "population" NUMBER, "area ( km2 ) " NUMBER, "language" CLOB, "notes" CLOB, "u.n. region" CLOB)
| what province is listed previous to ghor ? | SELECT "province" FROM table_204_704 WHERE id = (SELECT id FROM table_204_704 WHERE "province" = 'ghor') - 1 | SELECT "province" FROM "table_204_704" WHERE "id" = (SELECT "id" FROM "table_204_704" WHERE "province" = 'ghor') - 1 | 0.113281 |
CREATE TABLE table_26892 ("Date ( YYYY-MM-DD ) " CLOB, "Time ( UTC ) " CLOB, "Latitude" CLOB, "Longitude" CLOB, "Depth" CLOB, "Magnitude" CLOB)
| What is the depth of the aftershock at 18:00:22? | SELECT "Depth" FROM table_26892 WHERE "Time (UTC)" = '18:00:22' | SELECT "Depth" FROM "table_26892" WHERE "Time (UTC)" = '18:00:22' | 0.063477 |
CREATE TABLE table_7834 ("Date" CLOB, "Visitor" CLOB, "Score" CLOB, "Home" CLOB, "Record" CLOB)
| When did the Visiting San Antonio Spurs score 97-113? | SELECT "Date" FROM table_7834 WHERE "Visitor" = 'san antonio spurs' AND "Score" = '97-113' | SELECT "Date" FROM "table_7834" WHERE "Score" = '97-113' AND "Visitor" = 'san antonio spurs' | 0.089844 |
CREATE TABLE gsi (course_offering_id NUMBER, student_id NUMBER)
CREATE TABLE course_tags_count (course_id NUMBER, clear_grading NUMBER, pop_quiz NUMBER, group_projects NUMBER, inspirational NUMBER, long_lectures NUMBER, extra_credit NUMBER, few_tests NUMBER, good_feedback NUMBER, tough_tests NUMBER, heavy_papers NUMBER, cares_for_students NUMBER, heavy_assignments NUMBER, respected NUMBER, participation NUMBER, heavy_reading NUMBER, tough_grader NUMBER, hilarious NUMBER, would_take_again NUMBER, good_lecture NUMBER, no_skip NUMBER)
CREATE TABLE program_course (program_id NUMBER, course_id NUMBER, workload NUMBER, category VARCHAR2)
CREATE TABLE course_offering (offering_id NUMBER, course_id NUMBER, semester NUMBER, section_number NUMBER, start_time TIME, end_time TIME, monday VARCHAR2, tuesday VARCHAR2, wednesday VARCHAR2, thursday VARCHAR2, friday VARCHAR2, saturday VARCHAR2, sunday VARCHAR2, has_final_project VARCHAR2, has_final_exam VARCHAR2, textbook VARCHAR2, class_address VARCHAR2, allow_audit VARCHAR2)
CREATE TABLE course_prerequisite (pre_course_id NUMBER, course_id NUMBER)
CREATE TABLE student (student_id NUMBER, lastname VARCHAR2, firstname VARCHAR2, program_id NUMBER, declare_major VARCHAR2, total_credit NUMBER, total_gpa FLOAT, entered_as VARCHAR2, admit_term NUMBER, predicted_graduation_semester NUMBER, degree VARCHAR2, minor VARCHAR2, internship VARCHAR2)
CREATE TABLE instructor (instructor_id NUMBER, name VARCHAR2, uniqname VARCHAR2)
CREATE TABLE student_record (student_id NUMBER, course_id NUMBER, semester NUMBER, grade VARCHAR2, how VARCHAR2, transfer_source VARCHAR2, earn_credit VARCHAR2, repeat_term VARCHAR2, test_id VARCHAR2)
CREATE TABLE area (course_id NUMBER, area VARCHAR2)
CREATE TABLE jobs (job_id NUMBER, job_title VARCHAR2, description VARCHAR2, requirement VARCHAR2, city VARCHAR2, state VARCHAR2, country VARCHAR2, zip NUMBER)
CREATE TABLE offering_instructor (offering_instructor_id NUMBER, offering_id NUMBER, instructor_id NUMBER)
CREATE TABLE semester (semester_id NUMBER, semester VARCHAR2, year NUMBER)
CREATE TABLE course (course_id NUMBER, name VARCHAR2, department VARCHAR2, number VARCHAR2, credits VARCHAR2, advisory_requirement VARCHAR2, enforced_requirement VARCHAR2, description VARCHAR2, num_semesters NUMBER, num_enrolled NUMBER, has_discussion VARCHAR2, has_lab VARCHAR2, has_projects VARCHAR2, has_exams VARCHAR2, num_reviews NUMBER, clarity_score NUMBER, easiness_score NUMBER, helpfulness_score NUMBER)
CREATE TABLE program (program_id NUMBER, name VARCHAR2, college VARCHAR2, introduction VARCHAR2)
CREATE TABLE program_requirement (program_id NUMBER, category VARCHAR2, min_credit NUMBER, additional_req VARCHAR2)
CREATE TABLE comment_instructor (instructor_id NUMBER, student_id NUMBER, score NUMBER, comment_text VARCHAR2)
CREATE TABLE requirement (requirement_id NUMBER, requirement VARCHAR2, college VARCHAR2)
CREATE TABLE ta (campus_job_id NUMBER, student_id NUMBER, location VARCHAR2)
| During the Spring season , has the PHYSED 305 ever been offered ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'PHYSED' AND course.number = 305 AND semester.semester = 'Spring' AND semester.semester_id = course_offering.semester | SELECT COUNT(*) > 0 FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" AND "semester"."semester" = 'Spring' WHERE "course"."department" = 'PHYSED' AND "course"."number" = 305 | 0.28418 |
CREATE TABLE table_name_35 (time VARCHAR2, away VARCHAR2)
| What time was the away game played against the High Park Demons? | SELECT time FROM table_name_35 WHERE away = "high park demons" | SELECT "time" FROM "table_name_35" WHERE "away" = "high park demons" | 0.066406 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.