schema
stringlengths 28
5.65k
| question
stringlengths 0
990
| rejected
stringlengths 2
4.44k
| chosen
stringlengths 4
9.17k
| weight
float64 0
8.95
|
---|---|---|---|---|
CREATE TABLE table_24645 ("Year" FLOAT, "Starts" FLOAT, "Wins" FLOAT, "Top 5" FLOAT, "Top 10" FLOAT, "Poles" FLOAT, "Avg. Start" TEXT, "Avg. Finish" TEXT, "Winnings" TEXT, "Position" TEXT, "Team ( s ) " TEXT)
| What was the top 5 in the year with an average finish of 8.2? | SELECT MIN("Top 5") FROM table_24645 WHERE "Avg. Finish" = '8.2' | SELECT MIN("Top 5") FROM "table_24645" WHERE "Avg. Finish" = '8.2' | 0.064453 |
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
| All questions tagged HTML and CSS (and nothing else). | SELECT Id AS "post_link", Tags, CreationDate FROM Posts WHERE PostTypeId = 1 AND Tags = '<css><html>' ORDER BY CreationDate DESC LIMIT 100 | SELECT "Id" AS "post_link", "Tags", "CreationDate" FROM "Posts" WHERE "PostTypeId" = 1 AND "Tags" = '<css><html>' ORDER BY "CreationDate" DESC NULLS LAST LIMIT 100 | 0.15918 |
CREATE TABLE table_name_85 (fcc_info VARCHAR, frequency_mhz VARCHAR, city_of_license VARCHAR)
| What's the FCC info with a Frequency MHz thats smaller than 100.3 and a City of License as Lowville, NY? | SELECT fcc_info FROM table_name_85 WHERE frequency_mhz < 100.3 AND city_of_license = "lowville, ny" | SELECT "fcc_info" FROM "table_name_85" WHERE "city_of_license" = "lowville, ny" AND "frequency_mhz" < 100.3 | 0.104492 |
CREATE TABLE table_14603212_5 (school_year VARCHAR, class_aAAA VARCHAR, Gregory VARCHAR, Portland VARCHAR)
| What are all the school years where class AAAA is in Gregory-Portland? | SELECT school_year FROM table_14603212_5 WHERE class_aAAA = Gregory - Portland | SELECT "school_year" FROM "table_14603212_5" WHERE "class_aAAA" = "Gregory" - "Portland" | 0.085938 |
CREATE TABLE table_2668243_17 (candidates VARCHAR, district VARCHAR)
| Name the candidates for new york 21 | SELECT candidates FROM table_2668243_17 WHERE district = "New York 21" | SELECT "candidates" FROM "table_2668243_17" WHERE "New York 21" = "district" | 0.074219 |
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
| SI 760 has been in the course listings how many years ? | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SI' AND course.number = 760 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 | SELECT DISTINCT "semester"."year" FROM "course" JOIN "course_offering" ON "course"."course_id" = "course_offering"."course_id" JOIN "semester" ON "course_offering"."semester" = "semester"."semester_id" WHERE "course"."department" = 'SI' AND "course"."number" = 760 ORDER BY "semester"."year" NULLS FIRST LIMIT 1 | 0.303711 |
CREATE TABLE table_28386 ("No. in series" FLOAT, "No. in season" FLOAT, "Title" TEXT, "Directed by" TEXT, "Written by" TEXT, "Original air date" TEXT, "Production code" TEXT)
| What was the airdate of k0120? | SELECT "Original air date" FROM table_28386 WHERE "Production code" = 'K0120' | SELECT "Original air date" FROM "table_28386" WHERE "Production code" = 'K0120' | 0.077148 |
CREATE TABLE table_name_63 (player VARCHAR, position VARCHAR, pick VARCHAR)
| What is the name of the Outfielder that was picked prior to Pick 42? | SELECT player FROM table_name_63 WHERE position = "outfielder" AND pick < 42 | SELECT "player" FROM "table_name_63" WHERE "outfielder" = "position" AND "pick" < 42 | 0.082031 |
CREATE TABLE screen_mode (graphics_mode DECIMAL, char_cells TEXT, pixels TEXT, hardware_colours DECIMAL, used_kb DECIMAL, map TEXT, type TEXT)
CREATE TABLE chip_model (model_name TEXT, launch_year DECIMAL, ram_mib DECIMAL, rom_mib DECIMAL, slots TEXT, wifi TEXT, bluetooth TEXT)
CREATE TABLE phone (company_name TEXT, hardware_model_name TEXT, accreditation_type TEXT, accreditation_level TEXT, date TEXT, chip_model TEXT, screen_mode TEXT)
| List the hardware model name for the phones that have screen mode type 'Text' or RAM size greater than 32. | SELECT T2.hardware_model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.graphics_mode WHERE T3.type = "Text" OR T1.ram_mib > 32 | SELECT "T2"."hardware_model_name" FROM "chip_model" AS "T1" JOIN "phone" AS "T2" ON "T1"."model_name" = "T2"."chip_model" JOIN "screen_mode" AS "T3" ON ("T1"."ram_mib" > 32 OR "T3"."type" = "Text") AND "T2"."screen_mode" = "T3"."graphics_mode" | 0.237305 |
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
| in 2105, had lorazepam ever been prescribed to patient 11095? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11095) AND prescriptions.drug = 'lorazepam' AND STRFTIME('%y', prescriptions.startdate) = '2105' | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 11095 GROUP BY "hadm_id") SELECT COUNT(*) > 0 FROM "prescriptions" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "prescriptions"."hadm_id" WHERE "prescriptions"."drug" = 'lorazepam' AND NOT "_u_0"."" IS NULL AND STRFTIME('%y', "prescriptions"."startdate") = '2105' | 0.349609 |
CREATE TABLE table_203_467 (id DECIMAL, "year" DECIMAL, "numer of jamaicans\ granted british\ citizenship" DECIMAL, "naturalisation\ by residence" DECIMAL, "naturalisation\ by marriage" DECIMAL, "registration\ of a minor child" DECIMAL, "registration\ by other means" DECIMAL)
| how many jamaicans were granted british citizenship in 1998 ? | SELECT "numer of jamaicans\ngranted british\ncitizenship" FROM table_203_467 WHERE "year" = 1998 | SELECT "numer of jamaicans\ngranted british\ncitizenship" FROM "table_203_467" WHERE "year" = 1998 | 0.095703 |
CREATE TABLE tracklists (albumid DECIMAL, position DECIMAL, songid DECIMAL)
CREATE TABLE vocals (songid DECIMAL, bandmate DECIMAL, type TEXT)
CREATE TABLE songs (songid DECIMAL, title TEXT)
CREATE TABLE band (id DECIMAL, firstname TEXT, lastname TEXT)
CREATE TABLE instruments (songid DECIMAL, bandmateid DECIMAL, instrument TEXT)
CREATE TABLE albums (aid DECIMAL, title TEXT, year DECIMAL, label TEXT, type TEXT)
CREATE TABLE performance (songid DECIMAL, bandmate DECIMAL, stageposition TEXT)
| How many different instruments are used in the song 'Le Pop'? | SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | SELECT COUNT(DISTINCT "instrument") FROM "instruments" AS "T1" JOIN "songs" AS "T2" ON "T1"."songid" = "T2"."songid" WHERE "Le Pop" = "title" | 0.137695 |
CREATE TABLE table_name_26 (round INT, opponent VARCHAR)
| What is the highest round a fight lasted against masutatsu yano? | SELECT MAX(round) FROM table_name_26 WHERE opponent = "masutatsu yano" | SELECT MAX("round") FROM "table_name_26" WHERE "masutatsu yano" = "opponent" | 0.074219 |
CREATE TABLE table_25576 ("Rank" FLOAT, "Incorporated place" TEXT, "Metropolitan area" TEXT, "State" TEXT, "Population ( 2010 census ) " FLOAT, "Land area ( mi 2 ) " TEXT, "Population density ( people per mi 2 ) " TEXT)
| Which major metropolitan area had a land area of 23.80? | SELECT "Metropolitan area" FROM table_25576 WHERE "Land area (mi 2 )" = '23.80' | SELECT "Metropolitan area" FROM "table_25576" WHERE "Land area (mi 2 )" = '23.80' | 0.079102 |
CREATE TABLE courses (course_id DECIMAL, author_id DECIMAL, subject_id DECIMAL, course_name TEXT, course_description TEXT)
CREATE TABLE students (student_id DECIMAL, date_of_registration TIME, date_of_latest_logon TIME, login_name TEXT, password TEXT, personal_name TEXT, middle_name TEXT, family_name TEXT)
CREATE TABLE student_course_enrolment (registration_id DECIMAL, student_id DECIMAL, course_id DECIMAL, date_of_enrolment TIME, date_of_completion TIME)
CREATE TABLE student_tests_taken (registration_id DECIMAL, date_test_taken TIME, test_result TEXT)
CREATE TABLE course_authors_and_tutors (author_id DECIMAL, author_tutor_atb TEXT, login_name TEXT, password TEXT, personal_name TEXT, middle_name TEXT, family_name TEXT, gender_mf TEXT, address_line_1 TEXT)
CREATE TABLE subjects (subject_id DECIMAL, subject_name TEXT)
| Which course authors teach two or more courses? Give me their addresses and author IDs. | SELECT T1.address_line_1, T2.author_id FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id HAVING COUNT(*) >= 2 | SELECT "T1"."address_line_1", "T2"."author_id" FROM "course_authors_and_tutors" AS "T1" JOIN "courses" AS "T2" ON "T1"."author_id" = "T2"."author_id" GROUP BY "T2"."author_id" HAVING COUNT(*) >= 2 | 0.191406 |
CREATE TABLE table_3051 ("Seed" FLOAT, "Rank" FLOAT, "Player" TEXT, "Points" FLOAT, "Points defending" FLOAT, "Points won" FLOAT, "New points" FLOAT, "Status" TEXT)
| What is the highest points won when the player is aravane reza ? | SELECT MAX("Points won") FROM table_3051 WHERE "Player" = 'Aravane Rezaï' | SELECT MAX("Points won") FROM "table_3051" WHERE "Player" = 'Aravane Rezaï' | 0.073242 |
CREATE TABLE table_25042332_31 (incarceration_rate_total VARCHAR, prison_inmates_women VARCHAR)
| How many regions had 153 women prison inmates? | SELECT COUNT(incarceration_rate_total) FROM table_25042332_31 WHERE prison_inmates_women = 153 | SELECT COUNT("incarceration_rate_total") FROM "table_25042332_31" WHERE "prison_inmates_women" = 153 | 0.097656 |
CREATE TABLE table_name_53 (moving_from VARCHAR, name VARCHAR, type VARCHAR, nat VARCHAR)
| What's the moving of the Esp with a transfer and named De La Red? | SELECT moving_from FROM table_name_53 WHERE type = "transfer" AND nat = "esp" AND name = "de la red" | SELECT "moving_from" FROM "table_name_53" WHERE "de la red" = "name" AND "esp" = "nat" AND "transfer" = "type" | 0.107422 |
CREATE TABLE table_16654785_2 (name VARCHAR, length__m_ VARCHAR)
| How many had a length of 455? | SELECT COUNT(name) FROM table_16654785_2 WHERE length__m_ = 455 | SELECT COUNT("name") FROM "table_16654785_2" WHERE "length__m_" = 455 | 0.067383 |
CREATE TABLE month (month_number INT, month_name TEXT)
CREATE TABLE flight_fare (flight_id INT, fare_id INT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note TEXT)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
CREATE TABLE fare (fare_id INT, from_airport VARCHAR, to_airport VARCHAR, fare_basis_code TEXT, fare_airline TEXT, restriction_code TEXT, one_direction_cost INT, round_trip_cost INT, round_trip_required VARCHAR)
CREATE TABLE airport (airport_code VARCHAR, airport_name TEXT, airport_location TEXT, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR, minimum_connect_time INT)
CREATE TABLE flight (aircraft_code_sequence TEXT, airline_code VARCHAR, airline_flight TEXT, arrival_time INT, connections INT, departure_time INT, dual_carrier TEXT, flight_days TEXT, flight_id INT, flight_number INT, from_airport VARCHAR, meal_code TEXT, stops INT, time_elapsed INT, to_airport VARCHAR)
CREATE TABLE ground_service (city_code TEXT, airport_code TEXT, transport_type TEXT, ground_fare INT)
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
CREATE TABLE code_description (code VARCHAR, description TEXT)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
CREATE TABLE dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
CREATE TABLE restriction (restriction_code TEXT, advance_purchase INT, stopovers TEXT, saturday_stay_required TEXT, minimum_stay INT, maximum_stay INT, application TEXT, no_discounts TEXT)
CREATE TABLE aircraft (aircraft_code VARCHAR, aircraft_description VARCHAR, manufacturer VARCHAR, basic_type VARCHAR, engines INT, propulsion VARCHAR, wide_body VARCHAR, wing_span INT, length INT, weight INT, capacity INT, pay_load INT, cruising_speed INT, range_miles INT, pressurized VARCHAR)
CREATE TABLE flight_stop (flight_id INT, stop_number INT, stop_days TEXT, stop_airport TEXT, arrival_time INT, arrival_airline TEXT, arrival_flight_number INT, departure_time INT, departure_airline TEXT, departure_flight_number INT, stop_time INT)
CREATE TABLE class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
CREATE TABLE fare_basis (fare_basis_code TEXT, booking_class TEXT, class_type TEXT, premium TEXT, economy TEXT, discounted TEXT, night TEXT, season TEXT, basis_days TEXT)
| i am looking to get one air fare from BALTIMORE to SAN FRANCISCO on a 747 leaving 8 27 | SELECT DISTINCT fare.fare_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, equipment_sequence, fare, fare_basis, flight, flight_fare WHERE ((aircraft.basic_type = '747' AND DATE_DAY_1.day_number = 27 AND DATE_DAY_1.month_number = 8 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.flight_days = DAYS_1.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND DATE_DAY_0.day_number = 27 AND DATE_DAY_0.month_number = 8 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND fare_basis.basis_days = DAYS_0.days_code AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | SELECT DISTINCT "fare"."fare_id" FROM "aircraft" JOIN "date_day" AS "DATE_DAY_0" ON "DATE_DAY_0"."day_number" = 27 AND "DATE_DAY_0"."month_number" = 8 AND "DATE_DAY_0"."year" = 1991 JOIN "date_day" AS "DATE_DAY_1" ON "DATE_DAY_1"."day_number" = 27 AND "DATE_DAY_1"."month_number" = 8 AND "DATE_DAY_1"."year" = 1991 JOIN "days" AS "DAYS_0" ON "DATE_DAY_0"."day_name" = "DAYS_0"."day_name" JOIN "days" AS "DAYS_1" ON "DATE_DAY_1"."day_name" = "DAYS_1"."day_name" JOIN "equipment_sequence" ON "aircraft"."aircraft_code" = "equipment_sequence"."aircraft_code" JOIN "fare_basis" ON "DAYS_0"."days_code" = "fare_basis"."basis_days" JOIN "flight" ON "DAYS_1"."days_code" = "flight"."flight_days" AND "equipment_sequence"."aircraft_code_sequence" = "flight"."aircraft_code_sequence" JOIN "airport_service" AS "AIRPORT_SERVICE_0" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" AS "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "flight_fare" ON "flight"."flight_id" = "flight_fare"."flight_id" JOIN "city" AS "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'BALTIMORE' JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'SAN FRANCISCO' JOIN "fare" ON "fare"."fare_basis_code" = "fare_basis"."fare_basis_code" AND "fare"."fare_id" = "flight_fare"."fare_id" WHERE "aircraft"."basic_type" = '747' | 1.432617 |
CREATE TABLE table_name_45 (laps VARCHAR, rider VARCHAR, grid VARCHAR)
| What is the total number of laps done by Massimo Roccoli when his grid was smaller than 4? | SELECT COUNT(laps) FROM table_name_45 WHERE rider = "massimo roccoli" AND grid < 4 | SELECT COUNT("laps") FROM "table_name_45" WHERE "grid" < 4 AND "massimo roccoli" = "rider" | 0.087891 |
CREATE TABLE table_27653955_1 (colors VARCHAR, enrollment VARCHAR)
| What are the colors for the enrollment of 2020? | SELECT colors FROM table_27653955_1 WHERE enrollment = 2020 | SELECT "colors" FROM "table_27653955_1" WHERE "enrollment" = 2020 | 0.063477 |
CREATE TABLE Investors (investor_id INT, Investor_details VARCHAR)
CREATE TABLE Lots (lot_id INT, investor_id INT, lot_details VARCHAR)
CREATE TABLE Purchases (purchase_transaction_id INT, purchase_details VARCHAR)
CREATE TABLE Transactions_Lots (transaction_id INT, lot_id INT)
CREATE TABLE Transactions (transaction_id INT, investor_id INT, transaction_type_code VARCHAR, date_of_transaction DATETIME, amount_of_transaction DECIMAL, share_count VARCHAR, other_details VARCHAR)
CREATE TABLE Sales (sales_transaction_id INT, sales_details VARCHAR)
CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR, transaction_type_description VARCHAR)
| Show the number of the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000, could you list from high to low by the Y? | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count > 100 OR amount_of_transaction > 1000 ORDER BY COUNT(date_of_transaction) DESC | SELECT "date_of_transaction", COUNT("date_of_transaction") FROM "Transactions" WHERE "amount_of_transaction" > 1000 OR "share_count" > 100 ORDER BY COUNT("date_of_transaction") DESC NULLS LAST | 0.1875 |
CREATE TABLE table_203_296 (id DECIMAL, "country" TEXT, "total gdp ( nominal ) \ ( billion us$ ) " TEXT, "gdp per capita\ ( us$ , ppp ) " TEXT, "gdp growth , \ 2007-2011\ ( in % ) " DECIMAL, "hdi" TEXT)
| who has the larger gdp growth angola or ethiopia ? | SELECT "country" FROM table_203_296 WHERE "country" IN ('angola', 'ethiopia') ORDER BY "gdp growth,\n2007-2011\n(in %)" DESC LIMIT 1 | SELECT "country" FROM "table_203_296" WHERE "country" IN ('angola', 'ethiopia') ORDER BY "gdp growth,\n2007-2011\n(in %)" DESC NULLS LAST LIMIT 1 | 0.141602 |
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| calculate the maximum age of unmarried patients who have gangrene primary disease. | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "GANGRENE" | SELECT MAX("demographic"."age") FROM "demographic" WHERE "GANGRENE" = "demographic"."diagnosis" AND "SINGLE" = "demographic"."marital_status" | 0.137695 |
CREATE TABLE table_name_52 (goals INT, position VARCHAR, first_appearance VARCHAR, last_appearance VARCHAR, appearances VARCHAR)
| What is the average goals when the last appearance was before 1984, there were more than 17 appearances, the first appearance was before 1961 and the position was mf? | SELECT AVG(goals) FROM table_name_52 WHERE last_appearance < 1984 AND appearances > 17 AND first_appearance < 1961 AND position = "mf" | SELECT AVG("goals") FROM "table_name_52" WHERE "appearances" > 17 AND "first_appearance" < 1961 AND "last_appearance" < 1984 AND "mf" = "position" | 0.142578 |
CREATE TABLE table_name_41 (total INT, matches VARCHAR, rank VARCHAR)
| What is the total when matches is less than 3, and rank is smaller than 2? | SELECT MIN(total) FROM table_name_41 WHERE matches < 3 AND rank < 2 | SELECT MIN("total") FROM "table_name_41" WHERE "matches" < 3 AND "rank" < 2 | 0.073242 |
CREATE TABLE table_name_56 (nation VARCHAR, time__sec_ VARCHAR)
| Which nation finished with a time of 47.049? | SELECT nation FROM table_name_56 WHERE time__sec_ = 47.049 | SELECT "nation" FROM "table_name_56" WHERE "time__sec_" = 47.049 | 0.0625 |
CREATE TABLE table_22133191_3 (date_of_vacancy VARCHAR, manner_of_departure VARCHAR)
| What is the date of vacancy for the person that left because of end of caretaker contract? | SELECT date_of_vacancy FROM table_22133191_3 WHERE manner_of_departure = "End of caretaker contract" | SELECT "date_of_vacancy" FROM "table_22133191_3" WHERE "End of caretaker contract" = "manner_of_departure" | 0.103516 |
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
| what are the methods of consumption of ascorbic acid 500 mg tab? | SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'ascorbic acid 500 mg tab' | SELECT DISTINCT "medication"."routeadmin" FROM "medication" WHERE "medication"."drugname" = 'ascorbic acid 500 mg tab' | 0.115234 |
CREATE TABLE table_name_48 (position VARCHAR, college_hall_of_fame VARCHAR)
| What Position has no College Hall of Fame? | SELECT position FROM table_name_48 WHERE college_hall_of_fame = "no" | SELECT "position" FROM "table_name_48" WHERE "college_hall_of_fame" = "no" | 0.072266 |
CREATE TABLE table_23874 ("Game" FLOAT, "Date" TEXT, "Opponent" TEXT, "Result" TEXT, "Tar Heels points" FLOAT, "Opponents" FLOAT, "Record" TEXT)
| How many losses were there when the record was 4-0? | SELECT MAX("Opponents") FROM table_23874 WHERE "Record" = '4-0' | SELECT MAX("Opponents") FROM "table_23874" WHERE "Record" = '4-0' | 0.063477 |
CREATE TABLE table_22170495_7 (top_50_ranking VARCHAR, original_airing VARCHAR)
| How many of the episodes in the top 50 rankings were originally aired on June 28, 2010? | SELECT COUNT(top_50_ranking) FROM table_22170495_7 WHERE original_airing = "June 28, 2010" | SELECT COUNT("top_50_ranking") FROM "table_22170495_7" WHERE "June 28, 2010" = "original_airing" | 0.09375 |
CREATE TABLE table_name_97 (station_name VARCHAR, arrival VARCHAR)
| What Station Name has an Arrival time of 01:10? | SELECT station_name FROM table_name_97 WHERE arrival = "01:10" | SELECT "station_name" FROM "table_name_97" WHERE "01:10" = "arrival" | 0.066406 |
CREATE TABLE table_17627 ("Municipality" TEXT, "Population" FLOAT, "Police officers" FLOAT, "Residents per officer" FLOAT, "Total costs ( 2005 ) " TEXT, "Cost per capita" TEXT, "Case burden" FLOAT, "Crime rate per 1 , 000 people" FLOAT, "Police force" TEXT)
| What is the cost per capita in the Courtenay municipality? | SELECT "Cost per capita" FROM table_17627 WHERE "Municipality" = 'Courtenay' | SELECT "Cost per capita" FROM "table_17627" WHERE "Municipality" = 'Courtenay' | 0.076172 |
CREATE TABLE table_name_79 (result VARCHAR, year VARCHAR, category VARCHAR)
| WHAT IS THE RESULT FOR 2003, IN best urban/alternative performance? | SELECT result FROM table_name_79 WHERE year = 2003 AND category = "best urban/alternative performance" | SELECT "result" FROM "table_name_79" WHERE "best urban/alternative performance" = "category" AND "year" = 2003 | 0.107422 |
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
| is the heart rate in patient 3403 last measured on the last icu visit greater than first measured on the last icu visit? | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3403) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime DESC LIMIT 1) > (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3403) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1) | WITH "_u_2" AS (SELECT "d_items"."itemid" FROM "d_items" WHERE "d_items"."label" = 'heart rate' AND "d_items"."linksto" = 'chartevents' GROUP BY "itemid"), "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 3403 GROUP BY "hadm_id") SELECT (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_2" ON "_u_2"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE NOT "_u_0"."" IS NULL AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" DESC NULLS LAST LIMIT 1) AND NOT "_u_2"."" IS NULL ORDER BY "chartevents"."charttime" DESC NULLS LAST LIMIT 1) > (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_6" ON "_u_6"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_4" ON "_u_4"."" = "icustays"."hadm_id" WHERE NOT "_u_4"."" IS NULL AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" DESC NULLS LAST LIMIT 1) AND NOT "_u_6"."" IS NULL ORDER BY "chartevents"."charttime" NULLS FIRST LIMIT 1) | 1.1875 |
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
| count the number of people who were prescribed albuterol neb soln within 2 months following a diagnosis of acute necrosis of liver since 3 years ago. | SELECT COUNT(DISTINCT t1.subject_id) 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 = 'acute necrosis of liver') AND DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'albuterol neb soln' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') | WITH "t2" AS (SELECT "admissions"."subject_id", "prescriptions"."startdate" FROM "prescriptions" JOIN "admissions" ON "admissions"."hadm_id" = "prescriptions"."hadm_id" WHERE "prescriptions"."drug" = 'albuterol neb soln' AND DATETIME("prescriptions"."startdate") >= DATETIME(CURRENT_TIME(), '-3 year')) SELECT COUNT(DISTINCT "admissions"."subject_id") FROM "diagnoses_icd" JOIN "d_icd_diagnoses" ON "d_icd_diagnoses"."icd9_code" = "diagnoses_icd"."icd9_code" AND "d_icd_diagnoses"."short_title" = 'acute necrosis of liver' JOIN "admissions" ON "admissions"."hadm_id" = "diagnoses_icd"."hadm_id" JOIN "t2" AS "t2" ON "admissions"."subject_id" = "t2"."subject_id" AND "diagnoses_icd"."charttime" < "t2"."startdate" AND DATETIME("diagnoses_icd"."charttime") <= DATETIME("t2"."startdate") AND DATETIME("diagnoses_icd"."charttime", '+2 month') >= DATETIME("t2"."startdate") WHERE DATETIME("diagnoses_icd"."charttime") >= DATETIME(CURRENT_TIME(), '-3 year') | 0.928711 |
CREATE TABLE Customer_Policies (Policy_ID INT, Customer_ID INT, Policy_Type_Code CHAR, Start_Date DATE, End_Date DATE)
CREATE TABLE Payments (Payment_ID INT, Settlement_ID INT, Payment_Method_Code VARCHAR, Date_Payment_Made DATE, Amount_Payment INT)
CREATE TABLE Claims (Claim_ID INT, Policy_ID INT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INT, Amount_Settled INT)
CREATE TABLE Customers (Customer_ID INT, Customer_Details VARCHAR)
CREATE TABLE Settlements (Settlement_ID INT, Claim_ID INT, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INT, Amount_Settled INT, Customer_Policy_ID INT)
| Bar graph to show the average of amount payment from different payment method code, display from high to low by the X. | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code DESC | SELECT "Payment_Method_Code", AVG("Amount_Payment") FROM "Payments" GROUP BY "Payment_Method_Code" ORDER BY "Payment_Method_Code" DESC NULLS LAST | 0.141602 |
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
| what is average age of patients whose age is greater than or equal to 63 and admission year is greater than or equal to 2150? | SELECT AVG(demographic.age) FROM demographic WHERE demographic.age >= "63" AND demographic.admityear >= "2150" | SELECT AVG("demographic"."age") FROM "demographic" WHERE "2150" <= "demographic"."admityear" AND "63" <= "demographic"."age" | 0.121094 |
CREATE TABLE table_10141 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| Who was the away team when the home team scored 10.8 (68)? | SELECT "Away team" FROM table_10141 WHERE "Home team score" = '10.8 (68)' | SELECT "Away team" FROM "table_10141" WHERE "Home team score" = '10.8 (68)' | 0.073242 |
CREATE TABLE order_items (order_item_id DECIMAL, order_id DECIMAL, product_id DECIMAL, product_quantity TEXT, other_order_item_details TEXT)
CREATE TABLE accounts (account_id DECIMAL, customer_id DECIMAL, date_account_opened TIME, account_name TEXT, other_account_details TEXT)
CREATE TABLE customers (customer_id DECIMAL, customer_first_name TEXT, customer_middle_initial TEXT, customer_last_name TEXT, gender TEXT, email_address TEXT, login_name TEXT, login_password TEXT, phone_number TEXT, town_city TEXT, state_county_province TEXT, country TEXT)
CREATE TABLE financial_transactions (transaction_id DECIMAL, account_id DECIMAL, invoice_number DECIMAL, transaction_type TEXT, transaction_date TIME, transaction_amount DECIMAL, transaction_comment TEXT, other_transaction_details TEXT)
CREATE TABLE orders (order_id DECIMAL, customer_id DECIMAL, date_order_placed TIME, order_details TEXT)
CREATE TABLE product_categories (production_type_code TEXT, product_type_description TEXT, vat_rating DECIMAL)
CREATE TABLE products (product_id DECIMAL, parent_product_id DECIMAL, production_type_code TEXT, unit_price DECIMAL, product_name TEXT, product_color TEXT, product_size TEXT)
CREATE TABLE invoices (invoice_number DECIMAL, order_id DECIMAL, invoice_date TIME)
CREATE TABLE invoice_line_items (order_item_id DECIMAL, invoice_number DECIMAL, product_id DECIMAL, product_title TEXT, product_quantity TEXT, product_price DECIMAL, derived_product_cost DECIMAL, derived_vat_payable DECIMAL, derived_total_cost DECIMAL)
| What are total transaction amounts for each transaction type? | SELECT transaction_type, SUM(transaction_amount) FROM financial_transactions GROUP BY transaction_type | SELECT "transaction_type", SUM("transaction_amount") FROM "financial_transactions" GROUP BY "transaction_type" | 0.107422 |
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
| what was patient 027-32001's first output today? | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-32001')) AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') ORDER BY intakeoutput.intakeoutputtime LIMIT 1 | WITH "_u_0" AS (SELECT "patient"."patienthealthsystemstayid" FROM "patient" WHERE "patient"."uniquepid" = '027-32001' GROUP BY "patienthealthsystemstayid"), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patienthealthsystemstayid" WHERE NOT "_u_0"."" IS NULL GROUP BY "patientunitstayid") SELECT "intakeoutput"."celllabel" FROM "intakeoutput" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "intakeoutput"."patientunitstayid" WHERE "intakeoutput"."cellpath" LIKE '%output%' AND DATETIME("intakeoutput"."intakeoutputtime", 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') AND NOT "_u_1"."" IS NULL ORDER BY "intakeoutput"."intakeoutputtime" NULLS FIRST LIMIT 1 | 0.724609 |
CREATE TABLE program_requirement (program_id INT, category VARCHAR, min_credit INT, additional_req VARCHAR)
CREATE TABLE offering_instructor (offering_instructor_id INT, offering_id INT, instructor_id INT)
CREATE TABLE program (program_id INT, name VARCHAR, college VARCHAR, introduction VARCHAR)
CREATE TABLE course_prerequisite (pre_course_id INT, course_id INT)
CREATE TABLE course_offering (offering_id INT, course_id INT, semester INT, section_number INT, start_time TIME, end_time TIME, monday VARCHAR, tuesday VARCHAR, wednesday VARCHAR, thursday VARCHAR, friday VARCHAR, saturday VARCHAR, sunday VARCHAR, has_final_project VARCHAR, has_final_exam VARCHAR, textbook VARCHAR, class_address VARCHAR, allow_audit VARCHAR)
CREATE TABLE jobs (job_id INT, job_title VARCHAR, description VARCHAR, requirement VARCHAR, city VARCHAR, state VARCHAR, country VARCHAR, zip INT)
CREATE TABLE student (student_id INT, lastname VARCHAR, firstname VARCHAR, program_id INT, declare_major VARCHAR, total_credit INT, total_gpa FLOAT, entered_as VARCHAR, admit_term INT, predicted_graduation_semester INT, degree VARCHAR, minor VARCHAR, internship VARCHAR)
CREATE TABLE gsi (course_offering_id INT, student_id INT)
CREATE TABLE instructor (instructor_id INT, name VARCHAR, uniqname VARCHAR)
CREATE TABLE semester (semester_id INT, semester VARCHAR, year INT)
CREATE TABLE area (course_id INT, area VARCHAR)
CREATE TABLE course_tags_count (course_id INT, clear_grading INT, pop_quiz INT, group_projects INT, inspirational INT, long_lectures INT, extra_credit INT, few_tests INT, good_feedback INT, tough_tests INT, heavy_papers INT, cares_for_students INT, heavy_assignments INT, respected INT, participation INT, heavy_reading INT, tough_grader INT, hilarious INT, would_take_again INT, good_lecture INT, no_skip INT)
CREATE TABLE comment_instructor (instructor_id INT, student_id INT, score INT, comment_text VARCHAR)
CREATE TABLE student_record (student_id INT, course_id INT, semester INT, grade VARCHAR, how VARCHAR, transfer_source VARCHAR, earn_credit VARCHAR, repeat_term VARCHAR, test_id VARCHAR)
CREATE TABLE requirement (requirement_id INT, requirement VARCHAR, college VARCHAR)
CREATE TABLE ta (campus_job_id INT, student_id INT, location VARCHAR)
CREATE TABLE program_course (program_id INT, course_id INT, workload INT, category VARCHAR)
CREATE TABLE course (course_id INT, name VARCHAR, department VARCHAR, number VARCHAR, credits VARCHAR, advisory_requirement VARCHAR, enforced_requirement VARCHAR, description VARCHAR, num_semesters INT, num_enrolled INT, has_discussion VARCHAR, has_lab VARCHAR, has_projects VARCHAR, has_exams VARCHAR, num_reviews INT, clarity_score INT, easiness_score INT, helpfulness_score INT)
| For EECS 478 , how many credits is it ? | SELECT DISTINCT credits FROM course WHERE department = 'EECS' AND number = 478 | SELECT DISTINCT "credits" FROM "course" WHERE "department" = 'EECS' AND "number" = 478 | 0.083984 |
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE month (month_number INT, month_name TEXT)
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note TEXT)
CREATE TABLE flight (aircraft_code_sequence TEXT, airline_code VARCHAR, airline_flight TEXT, arrival_time INT, connections INT, departure_time INT, dual_carrier TEXT, flight_days TEXT, flight_id INT, flight_number INT, from_airport VARCHAR, meal_code TEXT, stops INT, time_elapsed INT, to_airport VARCHAR)
CREATE TABLE ground_service (city_code TEXT, airport_code TEXT, transport_type TEXT, ground_fare INT)
CREATE TABLE aircraft (aircraft_code VARCHAR, aircraft_description VARCHAR, manufacturer VARCHAR, basic_type VARCHAR, engines INT, propulsion VARCHAR, wide_body VARCHAR, wing_span INT, length INT, weight INT, capacity INT, pay_load INT, cruising_speed INT, range_miles INT, pressurized VARCHAR)
CREATE TABLE class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
CREATE TABLE fare_basis (fare_basis_code TEXT, booking_class TEXT, class_type TEXT, premium TEXT, economy TEXT, discounted TEXT, night TEXT, season TEXT, basis_days TEXT)
CREATE TABLE code_description (code VARCHAR, description TEXT)
CREATE TABLE fare (fare_id INT, from_airport VARCHAR, to_airport VARCHAR, fare_basis_code TEXT, fare_airline TEXT, restriction_code TEXT, one_direction_cost INT, round_trip_cost INT, round_trip_required VARCHAR)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE airport (airport_code VARCHAR, airport_name TEXT, airport_location TEXT, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR, minimum_connect_time INT)
CREATE TABLE dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE flight_stop (flight_id INT, stop_number INT, stop_days TEXT, stop_airport TEXT, arrival_time INT, arrival_airline TEXT, arrival_flight_number INT, departure_time INT, departure_airline TEXT, departure_flight_number INT, stop_time INT)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
CREATE TABLE flight_fare (flight_id INT, fare_id INT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE restriction (restriction_code TEXT, advance_purchase INT, stopovers TEXT, saturday_stay_required TEXT, minimum_stay INT, maximum_stay INT, application TEXT, no_discounts TEXT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
| what airlines fly between ATLANTA and SAN FRANCISCO | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | SELECT DISTINCT "airline"."airline_code" FROM "airline" JOIN "flight" ON "airline"."airline_code" = "flight"."airline_code" JOIN "airport_service" AS "AIRPORT_SERVICE_0" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" AS "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" AS "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'ATLANTA' JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'SAN FRANCISCO' | 0.571289 |
CREATE TABLE table_204_236 (id DECIMAL, "title" TEXT, "release date" TEXT, "developer ( s ) " TEXT, "publisher ( s ) " TEXT, "genre ( s ) " TEXT)
| what was the first game released ? | SELECT "title" FROM table_204_236 ORDER BY "release date" LIMIT 1 | SELECT "title" FROM "table_204_236" ORDER BY "release date" NULLS FIRST LIMIT 1 | 0.077148 |
CREATE TABLE table_56504 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| How many people in total have attended games at Kardinia Park? | SELECT SUM("Crowd") FROM table_56504 WHERE "Venue" = 'kardinia park' | SELECT SUM("Crowd") FROM "table_56504" WHERE "Venue" = 'kardinia park' | 0.068359 |
CREATE TABLE table_name_55 (date VARCHAR, winning_score VARCHAR)
| What is the Date of the Tournament with a Winning score of 9 (65-71-68-67=271)? | SELECT date FROM table_name_55 WHERE winning_score = −9(65 - 71 - 68 - 67 = 271) | SELECT "date" FROM "table_name_55" WHERE "winning_score" = −9(FALSE) | 0.066406 |
CREATE TABLE table_name_47 (publisher VARCHAR, release_title VARCHAR)
| Which publisher released Martial Law: Substitutes? | SELECT publisher FROM table_name_47 WHERE release_title = "martial law: substitutes" | SELECT "publisher" FROM "table_name_47" WHERE "martial law: substitutes" = "release_title" | 0.087891 |
CREATE TABLE table_16409745_1 (interface VARCHAR, pages_per_minute__color_ VARCHAR)
| What interface is used on the scanner that has a 36 pages per minute? | SELECT interface FROM table_16409745_1 WHERE pages_per_minute__color_ = 36 | SELECT "interface" FROM "table_16409745_1" WHERE "pages_per_minute__color_" = 36 | 0.078125 |
CREATE TABLE table_203_348 (id DECIMAL, "number" DECIMAL, "name" TEXT, "team" TEXT, "position" TEXT, "years with franchise" TEXT, "note" TEXT)
| which nba team has more retired jerseys than any other nba team ? | SELECT "team" FROM table_203_348 GROUP BY "team" ORDER BY COUNT(*) DESC LIMIT 1 | SELECT "team" FROM "table_203_348" GROUP BY "team" ORDER BY COUNT(*) DESC NULLS LAST LIMIT 1 | 0.089844 |
CREATE TABLE table_70799 ("Date" TEXT, "Opponents" TEXT, "Result F\\u2013A" TEXT, "Attendance" FLOAT, "Group position" TEXT)
| Attendance larger than 63,439, and an Opponent of bayer leverkusen had what result? | SELECT "Result F\u2013A" FROM table_70799 WHERE "Attendance" > '63,439' AND "Opponents" = 'bayer leverkusen' | SELECT "Result F\u2013A" FROM "table_70799" WHERE "Attendance" > '63,439' AND "Opponents" = 'bayer leverkusen' | 0.107422 |
CREATE TABLE table_name_17 (championship VARCHAR, year VARCHAR, winning_score VARCHAR)
| Which championship after 1985 had a winning score of 8 (68-72-69-71=280)? | SELECT championship FROM table_name_17 WHERE year > 1985 AND winning_score = –8(68 - 72 - 69 - 71 = 280) | SELECT "championship" FROM "table_name_17" WHERE "winning_score" = –8(FALSE) AND "year" > 1985 | 0.091797 |
CREATE TABLE table_39406 ("Round" FLOAT, "Pick #" FLOAT, "Overall" FLOAT, "Name" TEXT, "Position" TEXT, "College" TEXT)
| Which Position has an Overall larger than 147, and a Pick # of 21? | SELECT "Position" FROM table_39406 WHERE "Overall" > '147' AND "Pick #" = '21' | SELECT "Position" FROM "table_39406" WHERE "Overall" > '147' AND "Pick #" = '21' | 0.078125 |
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
| How many patients with icd9 code 7098 died in the year or before 2180. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2180.0" AND diagnoses.icd9_code = "7098" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "diagnoses" ON "7098" = "diagnoses"."icd9_code" AND "demographic"."hadm_id" = "diagnoses"."hadm_id" WHERE "2180.0" >= "demographic"."dod_year" | 0.210938 |
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
| Find the list of questions with a given tag without accepted answer. This will print a list of questions that are marked with a given tag, are not closed, don't have an accepted answer, have less that 'maxanswer' answers. | SELECT q.CreationDate, q.Id AS "post_link", q.Tags, q.AnswerCount AS "number_of_answers", SUM(a.Score) AS "sum_of_score_of_answers" FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE q.PostTypeId = 1 AND q.AnswerCount < '##maxanswers?4##' AND q.Tags LIKE @tagname AND COALESCE(q.AcceptedAnswerId, 0) = 0 AND COALESCE(q.ClosedDate, 0) = 0 GROUP BY q.CreationDate, q.Id, q.Tags, q.AnswerCount ORDER BY q.CreationDate DESC | SELECT "q"."CreationDate", "q"."Id" AS "post_link", "q"."Tags", "q"."AnswerCount" AS "number_of_answers", SUM("a"."Score") AS "sum_of_score_of_answers" FROM "Posts" AS "q" JOIN "Posts" AS "a" ON "a"."ParentId" = "q"."Id" WHERE ("q"."AcceptedAnswerId" = 0 OR "q"."AcceptedAnswerId" IS NULL) AND "q"."AnswerCount" < '##maxanswers?4##' AND ("q"."ClosedDate" = 0 OR "q"."ClosedDate" IS NULL) AND "q"."PostTypeId" = 1 AND "q"."Tags" LIKE $tagname GROUP BY "q"."CreationDate", "q"."Id", "q"."Tags", "q"."AnswerCount" ORDER BY "q"."CreationDate" DESC NULLS LAST | 0.541016 |
CREATE TABLE table_58841 ("Season" TEXT, "Club" TEXT, "Country" TEXT, "Apps." TEXT, "Goals" TEXT)
| What season had Belgium and 1 goal? | SELECT "Season" FROM table_58841 WHERE "Country" = 'belgium' AND "Goals" = '1' | SELECT "Season" FROM "table_58841" WHERE "Country" = 'belgium' AND "Goals" = '1' | 0.078125 |
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
| what were the new drugs prescribed to patient 53176 today compared to what was prescribed yesterday? | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 53176) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 53176) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day') | WITH "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 53176 GROUP BY "hadm_id") SELECT "prescriptions"."drug" FROM "prescriptions" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "prescriptions"."hadm_id" WHERE DATETIME("prescriptions"."startdate", 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') AND NOT "_u_0"."" IS NULL EXCEPT SELECT "prescriptions"."drug" FROM "prescriptions" LEFT JOIN "_u_0" AS "_u_1" ON "_u_1"."" = "prescriptions"."hadm_id" WHERE DATETIME("prescriptions"."startdate", 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day') AND NOT "_u_1"."" IS NULL | 0.630859 |
CREATE TABLE PostHistory (Id DECIMAL, PostHistoryTypeId DECIMAL, PostId DECIMAL, RevisionGUID other, CreationDate TIME, UserId DECIMAL, UserDisplayName TEXT, Comment TEXT, Text TEXT, ContentLicense TEXT)
CREATE TABLE Comments (Id DECIMAL, PostId DECIMAL, Score DECIMAL, Text TEXT, CreationDate TIME, UserDisplayName TEXT, UserId DECIMAL, ContentLicense TEXT)
CREATE TABLE PostFeedback (Id DECIMAL, PostId DECIMAL, IsAnonymous BOOLEAN, VoteTypeId DECIMAL, CreationDate TIME)
CREATE TABLE PostsWithDeleted (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE ReviewTaskResultTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE CloseAsOffTopicReasonTypes (Id DECIMAL, IsUniversal BOOLEAN, InputTitle TEXT, MarkdownInputGuidance TEXT, MarkdownPostOwnerGuidance TEXT, MarkdownPrivilegedUserGuidance TEXT, MarkdownConcensusDescription TEXT, CreationDate TIME, CreationModeratorId DECIMAL, ApprovalDate TIME, ApprovalModeratorId DECIMAL, DeactivationDate TIME, DeactivationModeratorId DECIMAL)
CREATE TABLE PostNoticeTypes (Id DECIMAL, ClassId DECIMAL, Name TEXT, Body TEXT, IsHidden BOOLEAN, Predefined BOOLEAN, PostNoticeDurationId DECIMAL)
CREATE TABLE SuggestedEditVotes (Id DECIMAL, SuggestedEditId DECIMAL, UserId DECIMAL, VoteTypeId DECIMAL, CreationDate TIME, TargetUserId DECIMAL, TargetRepChange DECIMAL)
CREATE TABLE ReviewTaskStates (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE Posts (Id DECIMAL, PostTypeId DECIMAL, AcceptedAnswerId DECIMAL, ParentId DECIMAL, CreationDate TIME, DeletionDate TIME, Score DECIMAL, ViewCount DECIMAL, Body TEXT, OwnerUserId DECIMAL, OwnerDisplayName TEXT, LastEditorUserId DECIMAL, LastEditorDisplayName TEXT, LastEditDate TIME, LastActivityDate TIME, Title TEXT, Tags TEXT, AnswerCount DECIMAL, CommentCount DECIMAL, FavoriteCount DECIMAL, ClosedDate TIME, CommunityOwnedDate TIME, ContentLicense TEXT)
CREATE TABLE FlagTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE ReviewTaskResults (Id DECIMAL, ReviewTaskId DECIMAL, ReviewTaskResultTypeId DECIMAL, CreationDate TIME, RejectionReasonId DECIMAL, Comment TEXT)
CREATE TABLE Badges (Id DECIMAL, UserId DECIMAL, Name TEXT, Date TIME, Class DECIMAL, TagBased BOOLEAN)
CREATE TABLE PostLinks (Id DECIMAL, CreationDate TIME, PostId DECIMAL, RelatedPostId DECIMAL, LinkTypeId DECIMAL)
CREATE TABLE PostNotices (Id DECIMAL, PostId DECIMAL, PostNoticeTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ExpiryDate TIME, Body TEXT, OwnerUserId DECIMAL, DeletionUserId DECIMAL)
CREATE TABLE Users (Id DECIMAL, Reputation DECIMAL, CreationDate TIME, DisplayName TEXT, LastAccessDate TIME, WebsiteUrl TEXT, Location TEXT, AboutMe TEXT, Views DECIMAL, UpVotes DECIMAL, DownVotes DECIMAL, ProfileImageUrl TEXT, EmailHash TEXT, AccountId DECIMAL)
CREATE TABLE Votes (Id DECIMAL, PostId DECIMAL, VoteTypeId DECIMAL, UserId DECIMAL, CreationDate TIME, BountyAmount DECIMAL)
CREATE TABLE ReviewTaskTypes (Id DECIMAL, Name TEXT, Description TEXT)
CREATE TABLE PostTags (PostId DECIMAL, TagId DECIMAL)
CREATE TABLE PendingFlags (Id DECIMAL, FlagTypeId DECIMAL, PostId DECIMAL, CreationDate TIME, CloseReasonTypeId DECIMAL, CloseAsOffTopicReasonTypeId DECIMAL, DuplicateOfQuestionId DECIMAL, BelongsOnBaseHostAddress TEXT)
CREATE TABLE Tags (Id DECIMAL, TagName TEXT, Count DECIMAL, ExcerptPostId DECIMAL, WikiPostId DECIMAL)
CREATE TABLE TagSynonyms (Id DECIMAL, SourceTagName TEXT, TargetTagName TEXT, CreationDate TIME, OwnerUserId DECIMAL, AutoRenameCount DECIMAL, LastAutoRename TIME, Score DECIMAL, ApprovedByUserId DECIMAL, ApprovalDate TIME)
CREATE TABLE ReviewTasks (Id DECIMAL, ReviewTaskTypeId DECIMAL, CreationDate TIME, DeletionDate TIME, ReviewTaskStateId DECIMAL, PostId DECIMAL, SuggestedEditId DECIMAL, CompletedByReviewTaskId DECIMAL)
CREATE TABLE SuggestedEdits (Id DECIMAL, PostId DECIMAL, CreationDate TIME, ApprovalDate TIME, RejectionDate TIME, OwnerUserId DECIMAL, Comment TEXT, Text TEXT, Title TEXT, Tags TEXT, RevisionGUID other)
CREATE TABLE PostTypes (Id DECIMAL, Name TEXT)
CREATE TABLE VoteTypes (Id DECIMAL, Name TEXT)
CREATE TABLE PostHistoryTypes (Id DECIMAL, Name TEXT)
CREATE TABLE ReviewRejectionReasons (Id DECIMAL, Name TEXT, Description TEXT, PostTypeId DECIMAL)
CREATE TABLE CloseReasonTypes (Id DECIMAL, Name TEXT, Description TEXT)
| Questions with stack trace pattern. | SELECT CASE WHEN DeletionDate IS NULL THEN 1 ELSE 0 END, CASE WHEN ClosedDate IS NULL THEN 1 ELSE 0 END, COUNT(*) AS Questions, AVG(CAST(Score AS FLOAT)) AS AvgScore, AVG(CAST(ViewCount AS FLOAT)) AS AvgViewCount, AVG(CAST(AnswerCount AS FLOAT)) AS AvgAnswerCount, AVG(CAST(FavoriteCount AS FLOAT)) AS AvgFavoriteCount FROM Posts WHERE PostTypeId = 1 AND DeletionDate IS NULL AND ClosedDate IS NULL AND NOT AcceptedAnswerId IS NULL AND Tags LIKE '%java%' AND CreationDate >= '2017-10-01' AND CreationDate < '2018-01-01' AND Body LIKE '%at %.java:% %at %.java:%' GROUP BY CASE WHEN DeletionDate IS NULL THEN 1 ELSE 0 END, CASE WHEN ClosedDate IS NULL THEN 1 ELSE 0 END | SELECT CASE WHEN "DeletionDate" IS NULL THEN 1 ELSE 0 END, CASE WHEN "ClosedDate" IS NULL THEN 1 ELSE 0 END, COUNT(*) AS "Questions", AVG(CAST("Score" AS FLOAT)) AS "AvgScore", AVG(CAST("ViewCount" AS FLOAT)) AS "AvgViewCount", AVG(CAST("AnswerCount" AS FLOAT)) AS "AvgAnswerCount", AVG(CAST("FavoriteCount" AS FLOAT)) AS "AvgFavoriteCount" FROM "Posts" WHERE "Body" LIKE '%at %.java:% %at %.java:%' AND "ClosedDate" IS NULL AND "CreationDate" < '2018-01-01' AND "CreationDate" >= '2017-10-01' AND "DeletionDate" IS NULL AND "PostTypeId" = 1 AND "Tags" LIKE '%java%' AND NOT "AcceptedAnswerId" IS NULL GROUP BY CASE WHEN "DeletionDate" IS NULL THEN 1 ELSE 0 END, CASE WHEN "ClosedDate" IS NULL THEN 1 ELSE 0 END | 0.694336 |
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| Calculate the patients who are prescribed additive drugs that have stayed in the hospital for more than 5 days. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "5" AND prescriptions.drug_type = "ADDITIVE" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" JOIN "prescriptions" ON "ADDITIVE" = "prescriptions"."drug_type" AND "demographic"."hadm_id" = "prescriptions"."hadm_id" WHERE "5" < "demographic"."days_stay" | 0.22168 |
CREATE TABLE table_11960944_6 (high_points VARCHAR, team VARCHAR)
| How many players had the most points in the game @ Milwaukee? | SELECT COUNT(high_points) FROM table_11960944_6 WHERE team = "@ Milwaukee" | SELECT COUNT("high_points") FROM "table_11960944_6" WHERE "@ Milwaukee" = "team" | 0.078125 |
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
| specify the details of procedure icd9 code 640 | SELECT procedures.long_title FROM procedures WHERE procedures.icd9_code = "640" | SELECT "procedures"."long_title" FROM "procedures" WHERE "640" = "procedures"."icd9_code" | 0.086914 |
CREATE TABLE table_name_7 (county VARCHAR, name VARCHAR)
| Which county is named broderick wood products? | SELECT county FROM table_name_7 WHERE name = "broderick wood products" | SELECT "county" FROM "table_name_7" WHERE "broderick wood products" = "name" | 0.074219 |
CREATE TABLE table_72050 ("Year" FLOAT, "Office" TEXT, "Candidate" TEXT, "Popular Votes" FLOAT, "Percentage" TEXT)
| How many votes did candice sjostrom receive? | SELECT AVG("Popular Votes") FROM table_72050 WHERE "Candidate" = 'candice sjostrom' | SELECT AVG("Popular Votes") FROM "table_72050" WHERE "Candidate" = 'candice sjostrom' | 0.083008 |
CREATE TABLE table_49887 ("Race Name" TEXT, "Circuit" TEXT, "City/Location" TEXT, "Date" TEXT, "Pole position" TEXT, "Fastest lap" TEXT, "Winning driver" TEXT, "Winning team" TEXT, "Report" TEXT)
| Which Date had a City/Location of vancouver, british columbia? | SELECT "Date" FROM table_49887 WHERE "City/Location" = 'vancouver, british columbia' | SELECT "Date" FROM "table_49887" WHERE "City/Location" = 'vancouver, british columbia' | 0.083984 |
CREATE TABLE table_43410 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Record" TEXT)
| What is the High assists for march 25? | SELECT "High assists" FROM table_43410 WHERE "Date" = 'march 25' | SELECT "High assists" FROM "table_43410" WHERE "Date" = 'march 25' | 0.064453 |
CREATE TABLE table_name_10 (state VARCHAR, title VARCHAR, name VARCHAR)
| Which state has a king named xiang? | SELECT state FROM table_name_10 WHERE title = "king" AND name = "xiang" | SELECT "state" FROM "table_name_10" WHERE "king" = "title" AND "name" = "xiang" | 0.077148 |
CREATE TABLE table_57247 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What was the average amount of spectators when the home team scored 11.14 (80)? | SELECT AVG("Crowd") FROM table_57247 WHERE "Home team score" = '11.14 (80)' | SELECT AVG("Crowd") FROM "table_57247" WHERE "Home team score" = '11.14 (80)' | 0.075195 |
CREATE TABLE table_name_45 (height__m_ INT, peak VARCHAR, class VARCHAR, prom__m_ VARCHAR)
| What is the average height for hewitt class, with prom less than 86, and a Peak of gragareth? | SELECT AVG(height__m_) FROM table_name_45 WHERE class = "hewitt" AND prom__m_ < 86 AND peak = "gragareth" | SELECT AVG("height__m_") FROM "table_name_45" WHERE "class" = "hewitt" AND "gragareth" = "peak" AND "prom__m_" < 86 | 0.112305 |
CREATE TABLE table_8848 ("Rider" TEXT, "Manufacturer" TEXT, "Laps" FLOAT, "Time" TEXT, "Grid" FLOAT)
| Can you tell me the sum of Grid that has the Laps of 30, and the Rider of toni elias? | SELECT SUM("Grid") FROM table_8848 WHERE "Laps" = '30' AND "Rider" = 'toni elias' | SELECT SUM("Grid") FROM "table_8848" WHERE "Laps" = '30' AND "Rider" = 'toni elias' | 0.081055 |
CREATE TABLE table_27734 ("Pick #" FLOAT, "MLS Team" TEXT, "Player" TEXT, "Position" TEXT, "Affiliation" TEXT)
| What MLS team drafted samuel appiah? | SELECT "MLS Team" FROM table_27734 WHERE "Player" = 'Samuel Appiah' | SELECT "MLS Team" FROM "table_27734" WHERE "Player" = 'Samuel Appiah' | 0.067383 |
CREATE TABLE table_21072 ("Name" TEXT, "Latitude" TEXT, "Longitude" TEXT, "Diameter ( km ) " TEXT, "Year named" FLOAT, "Name origin" TEXT)
| What is the name origin of Nike Fossae? | SELECT "Name origin" FROM table_21072 WHERE "Name" = 'Nike Fossae' | SELECT "Name origin" FROM "table_21072" WHERE "Name" = 'Nike Fossae' | 0.066406 |
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
| what is the marital status of patient 43052 during the first hospital encounter? | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 43052 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | SELECT "admissions"."marital_status" FROM "admissions" WHERE "admissions"."subject_id" = 43052 AND NOT "admissions"."dischtime" IS NULL ORDER BY "admissions"."admittime" NULLS FIRST LIMIT 1 | 0.18457 |
CREATE TABLE table_4657 ("Home team" TEXT, "Home team score" TEXT, "Away team" TEXT, "Away team score" TEXT, "Venue" TEXT, "Crowd" FLOAT, "Date" TEXT)
| What away team scored 14.7 (91)? | SELECT "Away team" FROM table_4657 WHERE "Away team score" = '14.7 (91)' | SELECT "Away team" FROM "table_4657" WHERE "Away team score" = '14.7 (91)' | 0.072266 |
CREATE TABLE table_59581 ("Tie no" TEXT, "Home team" TEXT, "Score" TEXT, "Away team" TEXT, "Date" TEXT)
| What is the score of the game home team gillingham played on 23 january 1982? | SELECT "Score" FROM table_59581 WHERE "Date" = '23 january 1982' AND "Home team" = 'gillingham' | SELECT "Score" FROM "table_59581" WHERE "Date" = '23 january 1982' AND "Home team" = 'gillingham' | 0.094727 |
CREATE TABLE table_name_86 (rank VARCHAR, qual VARCHAR)
| What was the rank with the qual of 115.095? | SELECT rank FROM table_name_86 WHERE qual = "115.095" | SELECT "rank" FROM "table_name_86" WHERE "115.095" = "qual" | 0.057617 |
CREATE TABLE table_49509 ("Position" FLOAT, "Name" TEXT, "Played" FLOAT, "Drawn" FLOAT, "Lost" FLOAT, "Points" FLOAT)
| What was the average amount of losses for teams with played less than 14? | SELECT AVG("Lost") FROM table_49509 WHERE "Played" < '14' | SELECT AVG("Lost") FROM "table_49509" WHERE "Played" < '14' | 0.057617 |
CREATE TABLE table_29527 ("Episode air date" TEXT, "Audition city" TEXT, "First audition date" TEXT, "Audition venue" TEXT, "Callback audition date" TEXT, "Callback venue" TEXT, "Golden tickets" TEXT)
| When were the callback auditions at Hilton Riverside Hotel held? | SELECT "Callback audition date" FROM table_29527 WHERE "Callback venue" = 'Hilton Riverside Hotel' | SELECT "Callback audition date" FROM "table_29527" WHERE "Callback venue" = 'Hilton Riverside Hotel' | 0.097656 |
CREATE TABLE table_13169 ("Opposing Teams" TEXT, "Against" FLOAT, "Date" TEXT, "Venue" TEXT, "Status" TEXT)
| Which venue had a status of five nations, an against larger than 12 and took place on 15/02/1975? | SELECT "Venue" FROM table_13169 WHERE "Status" = 'five nations' AND "Against" > '12' AND "Date" = '15/02/1975' | SELECT "Venue" FROM "table_13169" WHERE "Against" > '12' AND "Date" = '15/02/1975' AND "Status" = 'five nations' | 0.109375 |
CREATE TABLE table_12625 ("7:00 am" TEXT, "7:30 am" TEXT, "8:00 am" TEXT, "9:00 am" TEXT, "10:00 am" TEXT, "11:00 am" TEXT, "noon" TEXT, "12:30 pm" TEXT, "1:00 pm" TEXT, "1:30 pm" TEXT, "2:00 pm" TEXT, "3:30 pm" TEXT, "4:00 pm" TEXT, "5:00 pm" TEXT, "6:30 pm" TEXT)
| what is at 8:00 am when at 3:30 pm is general hospital? | SELECT "8:00 am" FROM table_12625 WHERE "3:30 pm" = 'general hospital' | SELECT "8:00 am" FROM "table_12625" WHERE "3:30 pm" = 'general hospital' | 0.070313 |
CREATE TABLE table_name_12 (runners INT, placing INT)
| What is the lowest number of Runners that has a Placing that isn't 1? | SELECT MIN(runners) FROM table_name_12 WHERE placing < 1 | SELECT MIN("runners") FROM "table_name_12" WHERE "placing" < 1 | 0.060547 |
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
| how many patients have been prescribed for sodium chloride 0.9%solp (1000 ml)? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'sodium chloride 0.9%solp (1000 ml)') | WITH "_u_0" AS (SELECT "medication"."patientunitstayid" FROM "medication" WHERE "medication"."drugname" = 'sodium chloride 0.9%solp (1000 ml)' GROUP BY "patientunitstayid") SELECT COUNT(DISTINCT "patient"."uniquepid") FROM "patient" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "patient"."patientunitstayid" WHERE NOT "_u_0"."" IS NULL | 0.324219 |
CREATE TABLE Products (Code INT, Name VARCHAR, Price DECIMAL, Manufacturer INT)
CREATE TABLE Manufacturers (Code INT, Name VARCHAR, Headquarter VARCHAR, Founder VARCHAR, Revenue FLOAT)
| Give me a bar chart to show the names and revenue of the company that earns the highest revenue in each headquarter city, list in asc by the y axis. | SELECT Name, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter ORDER BY MAX(Revenue) | SELECT "Name", MAX("Revenue") FROM "Manufacturers" GROUP BY "Headquarter" ORDER BY MAX("Revenue") NULLS FIRST | 0.106445 |
CREATE TABLE ground_service (city_code TEXT, airport_code TEXT, transport_type TEXT, ground_fare INT)
CREATE TABLE fare_basis (fare_basis_code TEXT, booking_class TEXT, class_type TEXT, premium TEXT, economy TEXT, discounted TEXT, night TEXT, season TEXT, basis_days TEXT)
CREATE TABLE compartment_class (compartment VARCHAR, class_type VARCHAR)
CREATE TABLE airport_service (city_code VARCHAR, airport_code VARCHAR, miles_distant INT, direction VARCHAR, minutes_distant INT)
CREATE TABLE time_zone (time_zone_code TEXT, time_zone_name TEXT, hours_from_gmt INT)
CREATE TABLE flight_leg (flight_id INT, leg_number INT, leg_flight INT)
CREATE TABLE flight_fare (flight_id INT, fare_id INT)
CREATE TABLE restriction (restriction_code TEXT, advance_purchase INT, stopovers TEXT, saturday_stay_required TEXT, minimum_stay INT, maximum_stay INT, application TEXT, no_discounts TEXT)
CREATE TABLE food_service (meal_code TEXT, meal_number INT, compartment TEXT, meal_description VARCHAR)
CREATE TABLE city (city_code VARCHAR, city_name VARCHAR, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR)
CREATE TABLE equipment_sequence (aircraft_code_sequence VARCHAR, aircraft_code VARCHAR)
CREATE TABLE state (state_code TEXT, state_name TEXT, country_name TEXT)
CREATE TABLE class_of_service (booking_class VARCHAR, rank INT, class_description TEXT)
CREATE TABLE code_description (code VARCHAR, description TEXT)
CREATE TABLE airline (airline_code VARCHAR, airline_name TEXT, note TEXT)
CREATE TABLE time_interval (period TEXT, begin_time INT, end_time INT)
CREATE TABLE days (days_code VARCHAR, day_name VARCHAR)
CREATE TABLE airport (airport_code VARCHAR, airport_name TEXT, airport_location TEXT, state_code VARCHAR, country_name VARCHAR, time_zone_code VARCHAR, minimum_connect_time INT)
CREATE TABLE flight (aircraft_code_sequence TEXT, airline_code VARCHAR, airline_flight TEXT, arrival_time INT, connections INT, departure_time INT, dual_carrier TEXT, flight_days TEXT, flight_id INT, flight_number INT, from_airport VARCHAR, meal_code TEXT, stops INT, time_elapsed INT, to_airport VARCHAR)
CREATE TABLE flight_stop (flight_id INT, stop_number INT, stop_days TEXT, stop_airport TEXT, arrival_time INT, arrival_airline TEXT, arrival_flight_number INT, departure_time INT, departure_airline TEXT, departure_flight_number INT, stop_time INT)
CREATE TABLE dual_carrier (main_airline VARCHAR, low_flight_number INT, high_flight_number INT, dual_airline VARCHAR, service_name TEXT)
CREATE TABLE date_day (month_number INT, day_number INT, year INT, day_name VARCHAR)
CREATE TABLE fare (fare_id INT, from_airport VARCHAR, to_airport VARCHAR, fare_basis_code TEXT, fare_airline TEXT, restriction_code TEXT, one_direction_cost INT, round_trip_cost INT, round_trip_required VARCHAR)
CREATE TABLE aircraft (aircraft_code VARCHAR, aircraft_description VARCHAR, manufacturer VARCHAR, basic_type VARCHAR, engines INT, propulsion VARCHAR, wide_body VARCHAR, wing_span INT, length INT, weight INT, capacity INT, pay_load INT, cruising_speed INT, range_miles INT, pressurized VARCHAR)
CREATE TABLE month (month_number INT, month_name TEXT)
| what are your flights from DALLAS to BALTIMORE | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | SELECT DISTINCT "flight"."flight_id" FROM "airport_service" AS "AIRPORT_SERVICE_0" JOIN "city" AS "CITY_0" ON "AIRPORT_SERVICE_0"."city_code" = "CITY_0"."city_code" AND "CITY_0"."city_name" = 'DALLAS' JOIN "flight" ON "AIRPORT_SERVICE_0"."airport_code" = "flight"."from_airport" JOIN "airport_service" AS "AIRPORT_SERVICE_1" ON "AIRPORT_SERVICE_1"."airport_code" = "flight"."to_airport" JOIN "city" AS "CITY_1" ON "AIRPORT_SERVICE_1"."city_code" = "CITY_1"."city_code" AND "CITY_1"."city_name" = 'BALTIMORE' | 0.495117 |
CREATE TABLE table_name_3 (away_team VARCHAR)
| What did the Melbourne team score in their away game? | SELECT away_team AS score FROM table_name_3 WHERE away_team = "melbourne" | SELECT "away_team" AS "score" FROM "table_name_3" WHERE "away_team" = "melbourne" | 0.079102 |
CREATE TABLE status (station_id DECIMAL, bikes_available DECIMAL, docks_available DECIMAL, time TEXT)
CREATE TABLE trip (id DECIMAL, duration DECIMAL, start_date TEXT, start_station_name TEXT, start_station_id DECIMAL, end_date TEXT, end_station_name TEXT, end_station_id DECIMAL, bike_id DECIMAL, subscription_type TEXT, zip_code DECIMAL)
CREATE TABLE station (id DECIMAL, name TEXT, lat DECIMAL, long DECIMAL, dock_count DECIMAL, city TEXT, installation_date TEXT)
CREATE TABLE weather (date TEXT, max_temperature_f DECIMAL, mean_temperature_f DECIMAL, min_temperature_f DECIMAL, max_dew_point_f DECIMAL, mean_dew_point_f DECIMAL, min_dew_point_f DECIMAL, max_humidity DECIMAL, mean_humidity DECIMAL, min_humidity DECIMAL, max_sea_level_pressure_inches DECIMAL, mean_sea_level_pressure_inches DECIMAL, min_sea_level_pressure_inches DECIMAL, max_visibility_miles DECIMAL, mean_visibility_miles DECIMAL, min_visibility_miles DECIMAL, max_wind_speed_mph DECIMAL, mean_wind_speed_mph DECIMAL, max_gust_speed_mph DECIMAL, precipitation_inches DECIMAL, cloud_cover DECIMAL, events TEXT, wind_dir_degrees DECIMAL, zip_code DECIMAL)
| Give me the dates when the max temperature was higher than 85. | SELECT date FROM weather WHERE max_temperature_f > 85 | SELECT "date" FROM "weather" WHERE "max_temperature_f" > 85 | 0.057617 |
CREATE TABLE table_name_78 (rank INT, total VARCHAR, silver VARCHAR, gold VARCHAR)
| What is the sum of rank with more than 1 silver medal, 1 gold medal, and less than 6? | SELECT SUM(rank) FROM table_name_78 WHERE silver > 1 AND gold = 1 AND total < 6 | SELECT SUM("rank") FROM "table_name_78" WHERE "gold" = 1 AND "silver" > 1 AND "total" < 6 | 0.086914 |
CREATE TABLE table_75920 ("Game" FLOAT, "Date" TEXT, "Team" TEXT, "Score" TEXT, "High points" TEXT, "High rebounds" TEXT, "High assists" TEXT, "Location Attendance" TEXT, "Record" TEXT)
| What is the Team with a game of more than 56, and the score is l 85 90 (ot)? | SELECT "Team" FROM table_75920 WHERE "Game" > '56' AND "Score" = 'l 85–90 (ot)' | SELECT "Team" FROM "table_75920" WHERE "Game" > '56' AND "Score" = 'l 85–90 (ot)' | 0.079102 |
CREATE TABLE table_15026994_2 (original_air_date VARCHAR, viewing_figure VARCHAR)
| What original air dates are associated with a viewing figure of 7.27 million? | SELECT original_air_date FROM table_15026994_2 WHERE viewing_figure = "7.27 million" | SELECT "original_air_date" FROM "table_15026994_2" WHERE "7.27 million" = "viewing_figure" | 0.087891 |
CREATE TABLE vitalperiodic (vitalperiodicid DECIMAL, patientunitstayid DECIMAL, temperature DECIMAL, sao2 DECIMAL, heartrate DECIMAL, respiration DECIMAL, systemicsystolic DECIMAL, systemicdiastolic DECIMAL, systemicmean DECIMAL, observationtime TIME)
CREATE TABLE medication (medicationid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, dosage TEXT, routeadmin TEXT, drugstarttime TIME, drugstoptime TIME)
CREATE TABLE allergy (allergyid DECIMAL, patientunitstayid DECIMAL, drugname TEXT, allergyname TEXT, allergytime TIME)
CREATE TABLE diagnosis (diagnosisid DECIMAL, patientunitstayid DECIMAL, diagnosisname TEXT, diagnosistime TIME, icd9code TEXT)
CREATE TABLE patient (uniquepid TEXT, patienthealthsystemstayid DECIMAL, patientunitstayid DECIMAL, gender TEXT, age TEXT, ethnicity TEXT, hospitalid DECIMAL, wardid DECIMAL, admissionheight DECIMAL, admissionweight DECIMAL, dischargeweight DECIMAL, hospitaladmittime TIME, hospitaladmitsource TEXT, unitadmittime TIME, unitdischargetime TIME, hospitaldischargetime TIME, hospitaldischargestatus TEXT)
CREATE TABLE cost (costid DECIMAL, uniquepid TEXT, patienthealthsystemstayid DECIMAL, eventtype TEXT, eventid DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE intakeoutput (intakeoutputid DECIMAL, patientunitstayid DECIMAL, cellpath TEXT, celllabel TEXT, cellvaluenumeric DECIMAL, intakeoutputtime TIME)
CREATE TABLE microlab (microlabid DECIMAL, patientunitstayid DECIMAL, culturesite TEXT, organism TEXT, culturetakentime TIME)
CREATE TABLE lab (labid DECIMAL, patientunitstayid DECIMAL, labname TEXT, labresult DECIMAL, labresulttime TIME)
CREATE TABLE treatment (treatmentid DECIMAL, patientunitstayid DECIMAL, treatmentname TEXT, treatmenttime TIME)
| did patient 003-48563 have immunosuppressives - mycophenolate in 2105 in another hospital? | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '003-48563' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '003-48563' AND patient.hospitaldischargetime IS NULL)) AND treatment.treatmentname = 'immunosuppressives - mycophenolate' AND STRFTIME('%y', treatment.treatmenttime) = '2105' | WITH "_u_0" AS (SELECT DISTINCT "patient"."hospitalid" FROM "patient" WHERE "patient"."hospitaldischargetime" IS NULL AND "patient"."uniquepid" = '003-48563'), "_u_1" AS (SELECT "patient"."patientunitstayid" FROM "patient" JOIN "_u_0" AS "_u_0" ON "_u_0"."hospitalid" <> "patient"."hospitalid" WHERE "patient"."uniquepid" = '003-48563' GROUP BY "patientunitstayid") SELECT COUNT(*) > 0 FROM "treatment" LEFT JOIN "_u_1" AS "_u_1" ON "_u_1"."" = "treatment"."patientunitstayid" WHERE "treatment"."treatmentname" = 'immunosuppressives - mycophenolate' AND NOT "_u_1"."" IS NULL AND STRFTIME('%y', "treatment"."treatmenttime") = '2105' | 0.617188 |
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
| what is date of birth and language of subject name james sloan? | SELECT demographic.dob, demographic.language FROM demographic WHERE demographic.name = "James Sloan" | SELECT "demographic"."dob", "demographic"."language" FROM "demographic" WHERE "James Sloan" = "demographic"."name" | 0.111328 |
CREATE TABLE table_60719 ("Greek Designation" TEXT, "Collegiate Institution" TEXT, "Charter Date" TEXT, "Status" TEXT, "City" TEXT, "U.S. State/District" TEXT)
| What collegiate institution has an active status and a charter date of march 30, 2002? | SELECT "Collegiate Institution" FROM table_60719 WHERE "Status" = 'active' AND "Charter Date" = 'march 30, 2002' | SELECT "Collegiate Institution" FROM "table_60719" WHERE "Charter Date" = 'march 30, 2002' AND "Status" = 'active' | 0.111328 |
CREATE TABLE university (School_ID INT, School TEXT, Location TEXT, Founded FLOAT, Affiliation TEXT, Enrollment FLOAT, Nickname TEXT, Primary_conference TEXT)
CREATE TABLE basketball_match (Team_ID INT, School_ID INT, Team_Name TEXT, ACC_Regular_Season TEXT, ACC_Percent TEXT, ACC_Home TEXT, ACC_Road TEXT, All_Games TEXT, All_Games_Percent INT, All_Home TEXT, All_Road TEXT, All_Neutral TEXT)
| Show me about the distribution of ACC_Road and Team_ID , and group by attribute ACC_Home in a bar chart, and show by the x-axis in asc please. | SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road | SELECT "ACC_Road", "Team_ID" FROM "basketball_match" GROUP BY "ACC_Home", "ACC_Road" ORDER BY "ACC_Road" NULLS FIRST | 0.113281 |
CREATE TABLE schedule (Cinema_ID INT, Film_ID INT, Date TEXT, Show_times_per_day INT, Price FLOAT)
CREATE TABLE film (Film_ID INT, Rank_in_series INT, Number_in_season INT, Title TEXT, Directed_by TEXT, Original_air_date TEXT, Production_code TEXT)
CREATE TABLE cinema (Cinema_ID INT, Name TEXT, Openning_year INT, Capacity INT, Location TEXT)
| What is the number of films of each director? Return a bar chart. | SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by | SELECT "Directed_by", COUNT("Directed_by") FROM "film" GROUP BY "Directed_by" | 0.075195 |
CREATE TABLE procedures_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE admissions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, admittime TIME, dischtime TIME, admission_type TEXT, admission_location TEXT, discharge_location TEXT, insurance TEXT, language TEXT, marital_status TEXT, ethnicity TEXT, age DECIMAL)
CREATE TABLE d_labitems (row_id DECIMAL, itemid DECIMAL, label TEXT)
CREATE TABLE d_icd_procedures (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE prescriptions (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, startdate TIME, enddate TIME, drug TEXT, dose_val_rx TEXT, dose_unit_rx TEXT, route TEXT)
CREATE TABLE transfers (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, eventtype TEXT, careunit TEXT, wardid DECIMAL, intime TIME, outtime TIME)
CREATE TABLE chartevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE microbiologyevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, charttime TIME, spec_type_desc TEXT, org_name TEXT)
CREATE TABLE labevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, itemid DECIMAL, charttime TIME, valuenum DECIMAL, valueuom TEXT)
CREATE TABLE diagnoses_icd (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icd9_code TEXT, charttime TIME)
CREATE TABLE patients (row_id DECIMAL, subject_id DECIMAL, gender TEXT, dob TIME, dod TIME)
CREATE TABLE outputevents (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, value DECIMAL)
CREATE TABLE inputevents_cv (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, charttime TIME, itemid DECIMAL, amount DECIMAL)
CREATE TABLE d_items (row_id DECIMAL, itemid DECIMAL, label TEXT, linksto TEXT)
CREATE TABLE d_icd_diagnoses (row_id DECIMAL, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE cost (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, event_type TEXT, event_id DECIMAL, chargetime TIME, cost DECIMAL)
CREATE TABLE icustays (row_id DECIMAL, subject_id DECIMAL, hadm_id DECIMAL, icustay_id DECIMAL, first_careunit TEXT, last_careunit TEXT, first_wardid DECIMAL, last_wardid DECIMAL, intime TIME, outtime TIME)
| did patient 20165 have a greater arterial bp mean value second measured on the first intensive care unit visit compared to the first value measured on the first intensive care unit visit? | SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20165) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1 OFFSET 1) > (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20165) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' AND d_items.linksto = 'chartevents') ORDER BY chartevents.charttime LIMIT 1) | WITH "_u_2" AS (SELECT "d_items"."itemid" FROM "d_items" WHERE "d_items"."label" = 'arterial bp mean' AND "d_items"."linksto" = 'chartevents' GROUP BY "itemid"), "_u_0" AS (SELECT "admissions"."hadm_id" FROM "admissions" WHERE "admissions"."subject_id" = 20165 GROUP BY "hadm_id") SELECT (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_2" ON "_u_2"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "icustays"."hadm_id" WHERE NOT "_u_0"."" IS NULL AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" NULLS FIRST LIMIT 1) AND NOT "_u_2"."" IS NULL ORDER BY "chartevents"."charttime" NULLS FIRST LIMIT 1 OFFSET 1) > (SELECT "chartevents"."valuenum" FROM "chartevents" LEFT JOIN "_u_2" AS "_u_6" ON "_u_6"."" = "chartevents"."itemid" WHERE "chartevents"."icustay_id" IN (SELECT "icustays"."icustay_id" FROM "icustays" LEFT JOIN "_u_0" AS "_u_4" ON "_u_4"."" = "icustays"."hadm_id" WHERE NOT "_u_4"."" IS NULL AND NOT "icustays"."outtime" IS NULL ORDER BY "icustays"."intime" NULLS FIRST LIMIT 1) AND NOT "_u_6"."" IS NULL ORDER BY "chartevents"."charttime" NULLS FIRST LIMIT 1) | 1.191406 |
CREATE TABLE employees (EMPLOYEE_ID DECIMAL, FIRST_NAME VARCHAR, LAST_NAME VARCHAR, EMAIL VARCHAR, PHONE_NUMBER VARCHAR, HIRE_DATE DATE, JOB_ID VARCHAR, SALARY DECIMAL, COMMISSION_PCT DECIMAL, MANAGER_ID DECIMAL, DEPARTMENT_ID DECIMAL)
CREATE TABLE regions (REGION_ID DECIMAL, REGION_NAME VARCHAR)
CREATE TABLE locations (LOCATION_ID DECIMAL, STREET_ADDRESS VARCHAR, POSTAL_CODE VARCHAR, CITY VARCHAR, STATE_PROVINCE VARCHAR, COUNTRY_ID VARCHAR)
CREATE TABLE countries (COUNTRY_ID VARCHAR, COUNTRY_NAME VARCHAR, REGION_ID DECIMAL)
CREATE TABLE jobs (JOB_ID VARCHAR, JOB_TITLE VARCHAR, MIN_SALARY DECIMAL, MAX_SALARY DECIMAL)
CREATE TABLE job_history (EMPLOYEE_ID DECIMAL, START_DATE DATE, END_DATE DATE, JOB_ID VARCHAR, DEPARTMENT_ID DECIMAL)
CREATE TABLE departments (DEPARTMENT_ID DECIMAL, DEPARTMENT_NAME VARCHAR, MANAGER_ID DECIMAL, LOCATION_ID DECIMAL)
| For all employees who have the letters D or S in their first name, draw a line chart about the change of employee_id over hire_date , and sort HIRE_DATE in asc order. | SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE | SELECT "HIRE_DATE", "EMPLOYEE_ID" FROM "employees" WHERE "FIRST_NAME" LIKE '%D%' OR "FIRST_NAME" LIKE '%S%' ORDER BY "HIRE_DATE" NULLS FIRST | 0.136719 |
CREATE TABLE table_204_383 (id DECIMAL, "rank" DECIMAL, "nation" TEXT, "gold" DECIMAL, "silver" DECIMAL, "bronze" DECIMAL, "total" DECIMAL)
| which nation came in first place ? | SELECT "nation" FROM table_204_383 WHERE "rank" = 1 | SELECT "nation" FROM "table_204_383" WHERE "rank" = 1 | 0.051758 |
CREATE TABLE captain (Captain_ID INT, Name TEXT, Ship_ID INT, age TEXT, Class TEXT, Rank TEXT)
CREATE TABLE Ship (Ship_ID INT, Name TEXT, Type TEXT, Built_Year FLOAT, Class TEXT, Flag TEXT)
| Compare the total number of different ranks using a bar graph, and sort from low to high by the Y. | SELECT Rank, COUNT(Rank) FROM captain GROUP BY Rank ORDER BY COUNT(Rank) | SELECT "Rank", COUNT("Rank") FROM "captain" GROUP BY "Rank" ORDER BY COUNT("Rank") NULLS FIRST | 0.091797 |
CREATE TABLE diagnoses (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
CREATE TABLE demographic (subject_id TEXT, hadm_id TEXT, name TEXT, marital_status TEXT, age TEXT, dob TEXT, gender TEXT, language TEXT, religion TEXT, admission_type TEXT, days_stay TEXT, insurance TEXT, ethnicity TEXT, expire_flag TEXT, admission_location TEXT, discharge_location TEXT, diagnosis TEXT, dod TEXT, dob_year TEXT, dod_year TEXT, admittime TEXT, dischtime TEXT, admityear TEXT)
CREATE TABLE lab (subject_id TEXT, hadm_id TEXT, itemid TEXT, charttime TEXT, flag TEXT, value_unit TEXT, label TEXT, fluid TEXT)
CREATE TABLE prescriptions (subject_id TEXT, hadm_id TEXT, icustay_id TEXT, drug_type TEXT, drug TEXT, formulary_drug_cd TEXT, route TEXT, drug_dose TEXT)
CREATE TABLE procedures (subject_id TEXT, hadm_id TEXT, icd9_code TEXT, short_title TEXT, long_title TEXT)
| give the number of female patients whose primary disease is squamous cell carcinoma oral tongue/sda. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" | SELECT COUNT(DISTINCT "demographic"."subject_id") FROM "demographic" WHERE "F" = "demographic"."gender" AND "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" = "demographic"."diagnosis" | 0.172852 |
CREATE TABLE table_name_90 (december VARCHAR, opponent VARCHAR)
| How many Decembers have calgary flames as the opponent? | SELECT COUNT(december) FROM table_name_90 WHERE opponent = "calgary flames" | SELECT COUNT("december") FROM "table_name_90" WHERE "calgary flames" = "opponent" | 0.079102 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.