instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_75057 ( "Team" text, "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8 Final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the week 3 for team of mark/jennifer
SELECT "Week 3" FROM table_75057 WHERE "Team" = 'mark/jennifer'
wikisql
CREATE TABLE table_202_271 ( id number, "party" text, "candidate" text, "votes" number, "%" number, "\u00b1%" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many votes did both the conservative party and the rainbow dream ticket party receive ?
SELECT SUM("votes") FROM table_202_271 WHERE "party" IN ('conservative', 'rainbow dream ticket')
squall
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 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 offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location 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 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 program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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 course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which courses in Advanced Portuguese satisfy the requirement for Core ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Advanced Portuguese%' OR course.description LIKE '%Advanced Portuguese%' OR course.name LIKE '%Advanced Portuguese%') AND program_course.category LIKE '%Core%'
advising
CREATE TABLE table_204_522 ( id number, "boat #" text, "name" text, "builder" text, "laid down" text, "launched" text, "completed" text, "fate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which boat was laid down on the same day as ha-202 ?
SELECT "name" FROM table_204_522 WHERE "name" <> 'ha-202' AND "laid down" = (SELECT "laid down" FROM table_204_522 WHERE "name" = 'ha-202')
squall
CREATE TABLE table_204_161 ( id number, "name" text, "1968 cf\ndesignator" text, "place of\nmanufacture" text, "primary\nrole(s)" text, "service\nperiod" text, "#\nused" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many airco dh .4 's did the uk use in their period of service ?
SELECT "#\nused" FROM table_204_161 WHERE "name" = 'airco dh.4'
squall
CREATE TABLE table_1776 ( "Parish ( Prestegjeld )" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" real, "Location of the Church" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number for sub parish sokn for 1865
SELECT COUNT("Sub-Parish (Sokn)") FROM table_1776 WHERE "Year Built" = '1865'
wikisql
CREATE TABLE table_name_77 ( date VARCHAR, against VARCHAR, opposing_teams VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What day was the opposing team Australia and the against 25?
SELECT date FROM table_name_77 WHERE against = 25 AND opposing_teams = "australia"
sql_create_context
CREATE TABLE table_name_83 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record on Feb 25?
SELECT record FROM table_name_83 WHERE date = "feb 25"
sql_create_context
CREATE TABLE table_33069 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team when Hawthorn was the home team?
SELECT "Away team score" FROM table_33069 WHERE "Home team" = 'hawthorn'
wikisql
CREATE TABLE table_19053 ( "Call sign" text, "Frequency MHz" text, "City of license" text, "ERP W" real, "Height m ( ft )" text, "FCC info" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the frequency mhz with city of license being chattanooga, tennessee
SELECT "Frequency MHz" FROM table_19053 WHERE "City of license" = 'Chattanooga, Tennessee'
wikisql
CREATE TABLE table_name_74 ( country VARCHAR, year_s__won VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country won in 2004?
SELECT country FROM table_name_74 WHERE year_s__won = "2004"
sql_create_context
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Return a bar chart on how many wines are there for each grape?, and I want to list the total number in desc order.
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_79351 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many draws did Mortlake have when the losses were more than 5?
SELECT COUNT("Draws") FROM table_79351 WHERE "Losses" > '5' AND "Club" = 'mortlake'
wikisql
CREATE TABLE Contacts ( contact_id INTEGER, customer_id INTEGER, gender VARCHAR(1), first_name VARCHAR(80), last_name VARCHAR(50), contact_phone VARCHAR(80) ) CREATE TABLE Customer_Address_History ( customer_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Customer_Orders ( order_id INTEGER, customer_id INTEGER, order_date DATETIME, order_status_code VARCHAR(15) ) CREATE TABLE Addresses ( address_id INTEGER, line_1_number_building VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50) ) CREATE TABLE Customers ( customer_id INTEGER, payment_method_code VARCHAR(15), customer_number VARCHAR(20), customer_name VARCHAR(80), customer_address VARCHAR(255), customer_phone VARCHAR(80), customer_email VARCHAR(80) ) CREATE TABLE Products ( product_id INTEGER, product_type_code VARCHAR(15), product_name VARCHAR(80), product_price DOUBLE ) CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTEGER, product_id INTEGER, order_quantity VARCHAR(80) ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show me a bar chart with the product name and their frequency, and show by the y axis in desc please.
SELECT product_name, COUNT(product_name) FROM Products GROUP BY product_name ORDER BY COUNT(product_name) DESC
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, SBBM text, SHRGH text, SHRXM text, YLJGDM text, YQBH text, YQMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JYKSBM text, JYKSMC text, JYLX number, JYRQ time, JYSQJGMC text, JYXMDM text, JYXMMC text, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SHRGH text, SHRXM text, SHSJ time, SQKS text, SQKSMC text, SQRGH text, SQRQ time, SQRXM text, YLJGDM text, YLJGDM_ZYJZJLB text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC text, NLS number, NLY number, QTJZYSGH text, SG number, SSY number, SZY number, TW number, TXBZ number, TZ number, WDBZ number, XL number, YLJGDM text, ZSEBZ number, ZZBZ number, ZZYSGH text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM text, RYCWH text, RYDJSJ time, RYSJ time, RYTJDM number, RYTJMC text, RZBQDM text, RZBQMC text, WDBZ number, YLJGDM text, ZYBMLX number, ZYZDBM text, ZYZDMC text, ZYZYZDZZBM text, ZYZYZDZZMC text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 二零零五年二月二十七日到二零一零年四月三十日,编号为0357577的医院中多少科室在门诊就诊中开出了12张以上的检验报告单
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.BGDH WHERE mzjzjlb.YLJGDM = '0357577' AND jybgb.BGRQ BETWEEN '2005-02-27' AND '2010-04-30' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 12) AS T
css
CREATE TABLE table_204_959 ( id number, "club" text, "founded" number, "nickname" text, "location" text, "home ground" text, "entered competition" number, "most recent promotion" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many clubs entered competition after 1945 ?
SELECT COUNT("club") FROM table_204_959 WHERE "entered competition" > 1945
squall
CREATE TABLE table_41410 ( "Name" text, "Status" text, "Authors" text, "Location" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where has a Name of zhongornis?
SELECT "Location" FROM table_41410 WHERE "Name" = 'zhongornis'
wikisql
CREATE TABLE table_76987 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the To par of the Player with a Score of 73-70-71-72=286?
SELECT "To par" FROM table_76987 WHERE "Score" = '73-70-71-72=286'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Date of first question with Bounty.
SELECT PostId, MIN(CreationDate) AS DaDate FROM (SELECT PostId, CreationDate FROM Votes WHERE NOT BountyAmount IS NULL AND VoteTypeId = 8) AS B GROUP BY PostId ORDER BY DaDate LIMIT 10
sede
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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is admission type of subject id 42963?
SELECT demographic.admission_type FROM demographic WHERE demographic.subject_id = "42963"
mimicsql_data
CREATE TABLE table_name_73 ( date VARCHAR, game VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date has a game smaller than 4, and a score of 116-114?
SELECT date FROM table_name_73 WHERE game < 4 AND score = "116-114"
sql_create_context
CREATE TABLE table_name_16 ( champion VARCHAR, llws VARCHAR, city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which champion has a Group Stage LLWS in Russellville?
SELECT champion FROM table_name_16 WHERE llws = "group stage" AND city = "russellville"
sql_create_context
CREATE TABLE table_53263 ( "NATO member" text, "Aircraft carriers" text, "Battleships" text, "Cruisers" text, "Escorts" text, "Submarines" text, "Torpedo boat squadrons" text, "s Motor ship / s Naval trawler" text, "Grand Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ships for the nation with grand total of 20?
SELECT "s Motor ship / s Naval trawler" FROM table_53263 WHERE "Grand Total" = '20'
wikisql
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_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 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 airline ( airline_code varchar, airline_name text, note 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 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 city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) 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 code_description ( code varchar, description text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) 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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE time_interval ( period text, begin_time int, end_time 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- can you tell me the cheapest one way fare from BOSTON to SAN FRANCISCO
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'BOSTON' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'SAN FRANCISCO' AND FAREalias1.round_trip_required = 'NO' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND fare.round_trip_required = 'NO' 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 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code
atis
CREATE TABLE table_name_42 ( silver VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many silver medals were won in 1938?
SELECT silver FROM table_name_42 WHERE year = "1938"
sql_create_context
CREATE TABLE available_policies ( policy_type_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which policy type has the most records in the database?
SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the maximum hospital cost for a patient suffering from acute respiratory failure - due to atelectasis this year?
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute respiratory failure - due to atelectasis')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY cost.patienthealthsystemstayid) AS t1
eicu
CREATE TABLE table_name_76 ( opponent_in_the_final VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Opponent in the final had a Partner of Gast n Etlis?
SELECT opponent_in_the_final FROM table_name_76 WHERE partner = "gastón etlis"
sql_create_context
CREATE TABLE table_name_77 ( time VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Time has a Year of 1984?
SELECT time FROM table_name_77 WHERE year = 1984
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC text, NLS number, NLY number, QTJZYSGH text, SG number, SSY number, SZY number, TW number, TXBZ number, TZ number, WDBZ number, XL number, YLJGDM text, ZSEBZ number, ZZBZ number, ZZYSGH text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, SBBM text, SHRGH text, SHRXM text, YLJGDM text, YQBH text, YQMC text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JYKSBM text, JYKSMC text, JYLX number, JYRQ time, JYSQJGMC text, JYXMDM text, JYXMMC text, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SHRGH text, SHRXM text, SHSJ time, SQKS text, SQKSMC text, SQRGH text, SQRQ time, SQRXM text, YLJGDM text, YLJGDM_ZYJZJLB text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM text, RYCWH text, RYDJSJ time, RYSJ time, RYTJDM number, RYTJMC text, RZBQDM text, RZBQMC text, WDBZ number, YLJGDM text, ZYBMLX number, ZYZDBM text, ZYZDMC text, ZYZYZDZZBM text, ZYZYZDZZMC text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 列出名称不包含科的科室开出的所有检验报告单在医疗就诊67577996810中的编号都是啥?
SELECT jybgb.BGDH FROM jybgb WHERE jybgb.JZLSH = '67577996810' AND NOT jybgb.KSMC LIKE '%科%'
css
CREATE TABLE table_259 ( "University Name" text, "Acronym" text, "Date founded" real, "Website" text, "Official registration notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the acronym used for Beirut Arab University?
SELECT "Acronym" FROM table_259 WHERE "University Name" = 'Beirut Arab University'
wikisql
CREATE TABLE table_name_96 ( laps INTEGER, bike VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total laps were ridden when the grid was 7 and the rider rode the Honda CBR600RR?
SELECT SUM(laps) FROM table_name_96 WHERE bike = "honda cbr600rr" AND grid = 7
sql_create_context
CREATE TABLE table_58398 ( "Event Name" text, "Established" real, "Category" text, "Sub Category" text, "Main Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Established groups have a multicultural sub category?
SELECT COUNT("Established") FROM table_58398 WHERE "Sub Category" = 'multicultural'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- until 4 years ago, did patient 027-53836 go to an er?
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '027-53836' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-4 year')
eicu
CREATE TABLE table_28188239_1 ( incumbent VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many incumbents are in district la-1?
SELECT COUNT(incumbent) FROM table_28188239_1 WHERE district = "LA-1"
sql_create_context
CREATE TABLE table_70616 ( "Member" text, "Party" text, "Electorate" text, "State" text, "Term in office" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the term in office for liberal and state of sa for ian mclachlan
SELECT "Term in office" FROM table_70616 WHERE "Party" = 'liberal' AND "State" = 'sa' AND "Member" = 'ian mclachlan'
wikisql
CREATE TABLE table_name_66 ( margin_of_victory VARCHAR, winning_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the Winning score was 9 (69-72-68-70=279), what was the Margin of victory?
SELECT margin_of_victory FROM table_name_66 WHERE winning_score = –9(69 - 72 - 68 - 70 = 279)
sql_create_context
CREATE TABLE table_name_1 ( wheel_arrangement VARCHAR, year_made VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What wheel arrangement was made in 1910?
SELECT wheel_arrangement FROM table_name_1 WHERE year_made = "1910"
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- until 08/2105, how many times was prescribed potassium phosphate 3 mmol/ml15 ml inj to patient 022-151182?
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-151182')) AND medication.drugname = 'potassium phosphate 3 mmol/ml15 ml inj' AND STRFTIME('%y-%m', medication.drugstarttime) <= '2105-08'
eicu
CREATE TABLE table_42150 ( "Location" text, "Aircraft" text, "Tail number" text, "Aircraft damage" text, "Fatalities" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location for the an-12b aircraft?
SELECT "Location" FROM table_42150 WHERE "Aircraft" = 'an-12b'
wikisql
CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE medicine ( id number, name text, trade_name text, fda_approved text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the names and the locations that the enzymes can make an effect.
SELECT name, location FROM enzyme
spider
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tags that shouldn't be used.
SELECT t.TagName, p.Body AS Excerpt, DATEDIFF(d, p.LastEditDate, GETDATE()) AS DaysNotEdited FROM Tags AS t INNER JOIN Posts AS p ON t.ExcerptPostId = p.Id WHERE p.Body LIKE 'DO NOT USE%' COLLATE Latin1_General_CI_AI ORDER BY p.LastEditDate
sede
CREATE TABLE table_name_53 ( round INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest round for anthony gonzalez?
SELECT MAX(round) FROM table_name_53 WHERE name = "anthony gonzalez"
sql_create_context
CREATE TABLE table_name_68 ( result VARCHAR, road_team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE RESULT WITH THE BOSTON ROAD TEAM, ON APRIL 23?
SELECT result FROM table_name_68 WHERE road_team = "boston" AND date = "april 23"
sql_create_context
CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE field ( fieldid int ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is there a paper on multiuser receiver and decision feedback ?
SELECT DISTINCT paperkeyphrase.paperid FROM keyphrase, paperkeyphrase WHERE keyphrase.keyphrasename IN ('multiuser receiver', 'decision feedback') GROUP BY paperkeyphrase.paperid HAVING COUNT(DISTINCT keyphrase.keyphraseid) = 1
scholar
CREATE TABLE table_62713 ( "Year" real, "Class" text, "Team" text, "Machine" text, "Points" real, "Rank" text, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the machine that ranked 4th and has 2 wins?
SELECT "Machine" FROM table_62713 WHERE "Rank" = '4th' AND "Wins" = '2'
wikisql
CREATE TABLE table_204_978 ( id number, "position" number, "nation" number, "number" number, "name" text, "soproni liga" number, "uefa cup" number, "hungarian cup" number, "league cup" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- whom is listed first on the chart ?
SELECT "name" FROM table_204_978 WHERE id = 1
squall
CREATE TABLE customer_payments ( customer_id number, datetime_payment time, payment_method_code text, amount_payment number ) CREATE TABLE customers ( customer_id number, customer_address_id number, customer_status_code text, date_became_customer time, date_of_birth time, first_name text, last_name text, amount_outstanding number, email_address text, phone_number text, cell_mobile_phone_number text ) CREATE TABLE lessons ( lesson_id number, customer_id number, lesson_status_code text, staff_id number, vehicle_id number, lesson_date time, lesson_time text, price number ) CREATE TABLE staff ( staff_id number, staff_address_id number, nickname text, first_name text, middle_name text, last_name text, date_of_birth time, date_joined_staff time, date_left_staff time ) CREATE TABLE vehicles ( vehicle_id number, vehicle_details text ) CREATE TABLE addresses ( address_id number, line_1_number_building text, city text, zip_postcode text, state_province_county text, country text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the last names that are used by customers and staff?
SELECT last_name FROM customers INTERSECT SELECT last_name FROM staff
spider
CREATE TABLE table_36370 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" text, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Frequency MHz that is on farwell, texas?
SELECT AVG("Frequency MHz") FROM table_36370 WHERE "City of license" = 'farwell, texas'
wikisql
CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE movie ( mid number, title text, year number, director text ) CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?
SELECT DISTINCT T3.name, T2.title, T1.stars FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid JOIN reviewer AS T3 ON T1.rid = T3.rid WHERE T2.director = T3.name
spider
CREATE TABLE location ( restaurant_id int, house_number int, street_name varchar, city_name varchar ) CREATE TABLE geographic ( city_name varchar, county varchar, region varchar ) CREATE TABLE restaurant ( id int, name varchar, food_type varchar, city_name varchar, rating "decimal ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are some good restaurants in the yosemite and mono lake area for french food ?
SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'yosemite and mono lake area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5
restaurants
CREATE TABLE table_name_86 ( driver VARCHAR, class VARCHAR, navigator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the driver of the vehicle having class of CM22 and navigator of Macneall?
SELECT driver FROM table_name_86 WHERE class = "cm22" AND navigator = "macneall"
sql_create_context
CREATE TABLE table_30922 ( "Stage" real, "Winner" text, "General classification" text, "Mountains Classification" text, "Points classification" text, "Sprints Classification" text, "Team Classification" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the general classification for steven kruijswijk
SELECT "General classification" FROM table_30922 WHERE "Winner" = 'Steven Kruijswijk'
wikisql
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC text, NLS number, NLY number, QTJZYSGH text, SG number, SSY number, SZY number, TW number, TXBZ number, TZ number, WDBZ number, XL number, YLJGDM text, ZSEBZ number, ZZBZ number, ZZYSGH text ) CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JYKSBM text, JYKSMC text, JYLX number, JYRQ time, JYSQJGMC text, JYXMDM text, JYXMMC text, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, KSBM text, KSMC text, SHRGH text, SHRXM text, SHSJ time, SQKS text, SQKSMC text, SQRGH text, SQRQ time, SQRXM text, YLJGDM number, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM text, RYCWH text, RYDJSJ time, RYSJ time, RYTJDM number, RYTJMC text, RZBQDM text, RZBQMC text, WDBZ number, YLJGDM text, ZYBMLX number, ZYZDBM text, ZYZDMC text, ZYZYZDZZBM text, ZYZYZDZZMC text ) CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, SBBM text, SHRGH text, SHRXM text, YLJGDM text, YQBH text, YQMC text ) CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JYKSBM text, JYKSMC text, JYLX number, JYRQ time, JYSQJGMC text, JYXMDM text, JYXMMC text, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, KSBM text, KSMC text, SHRGH text, SHRXM text, SHSJ time, SQKS text, SQKSMC text, SQRGH text, SQRQ time, SQRXM text, YLJGDM number, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 在79056847817的这次医疗就诊中,为病人葛清怡的检验报告做审核的人员姓名及工号
SELECT zyjybgb.SHRGH, zyjybgb.SHRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '79056847817' UNION SELECT mzjybgb.SHRGH, mzjybgb.SHRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '79056847817'
css
CREATE TABLE table_name_95 ( total VARCHAR, set_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total when the set 1 is 21 25?
SELECT total FROM table_name_95 WHERE set_1 = "21–25"
sql_create_context
CREATE TABLE table_name_60 ( total_fertility_rate VARCHAR, deaths INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total fertility rate that had a death rate larger than 7.8?
SELECT total_fertility_rate FROM table_name_60 WHERE deaths > 7.8
sql_create_context
CREATE TABLE procedures ( 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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid 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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many patients who stayed in the hospital for more than 7 days have a bilirubin lab test done?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "7" AND lab.label = "Bilirubin"
mimicsql_data
CREATE TABLE table_24466191_1 ( flaps INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least flaps
SELECT MIN(flaps) FROM table_24466191_1
sql_create_context
CREATE TABLE club ( clubid number, clubname text, clubdesc text, clublocation text ) CREATE TABLE member_of_club ( stuid number, clubid number, position text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of the club that has the most female students.
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = "F" GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_51640 ( "Year" real, "Franchise" text, "League" text, "Percentage" real, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?
SELECT AVG("Year") FROM table_51640 WHERE "Finish" = 'lost 2001 alcs' AND "Percentage" > '0.716'
wikisql
CREATE TABLE table_77486 ( "Actor in London, 2002" text, "Actor in New York, 2006" text, "Actor in Moscow, 2007" text, "Voyage" text, "Shipwreck" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the 2007 actor from Moscow for the shipwreck of Leonty Ibayev?
SELECT "Actor in Moscow, 2007" FROM table_77486 WHERE "Shipwreck" = 'leonty ibayev'
wikisql
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For those records from the products and each product's manufacturer, show me about the distribution of name and price , and group by attribute founder in a bar chart, I want to rank by the y axis from low to high please.
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Price
nvbench
CREATE TABLE table_name_44 ( country VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country had an opponent of Sampdoria?
SELECT country FROM table_name_44 WHERE opponent = "sampdoria"
sql_create_context
CREATE TABLE table_name_16 ( race_name VARCHAR, winning_team VARCHAR, pole_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What race did the team Mi-Jack Conquest racing win with a pole position of andreas wirth?
SELECT race_name FROM table_name_16 WHERE winning_team = "mi-jack conquest racing" AND pole_position = "andreas wirth"
sql_create_context
CREATE TABLE table_62228 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the round when the position is (c)?
SELECT MAX("Round") FROM table_62228 WHERE "Position" = '(c)'
wikisql
CREATE TABLE table_41195 ( "Game" real, "Date" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Result (sets)" text, "Result (Pts)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Set 5 with a Set 3 that is 25-23 and a Set 4 that is 23-25?
SELECT "Set 5" FROM table_41195 WHERE "Set 3" = '25-23' AND "Set 4" = '23-25'
wikisql
CREATE TABLE table_16103 ( "Date" text, "Album name" text, "Track" text, "Track title" text, "Lyricist" text, "Music genre/style" text, "Major instrument(s)" text, "Lyrics theme/style" text, "Duration" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the track that lasts 5:30?
SELECT "Track title" FROM table_16103 WHERE "Duration" = '5:30'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- among the patients diagnosed with hypercalcemia - moderate, calculate the two year survival probability.
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypercalcemia - moderate' GROUP BY patient.uniquepid HAVING MIN(diagnosis.diagnosistime) = diagnosis.diagnosistime) AS t1 WHERE STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', t1.diagnosistime) > 2 * 365) AS t2 JOIN patient ON t2.uniquepid = patient.uniquepid
eicu
CREATE TABLE table_11359 ( "Year" real, "Organization" text, "Award" text, "Work" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where Award is best actress and Work is first kiss, what is the average Year?
SELECT AVG("Year") FROM table_11359 WHERE "Award" = 'best actress' AND "Work" = 'first kiss'
wikisql
CREATE TABLE table_name_47 ( internet_explorer VARCHAR, firefox VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the internet explorer % when firefox was 24.98%?
SELECT internet_explorer FROM table_name_47 WHERE firefox = "24.98%"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the three most frequent drugs prescribed to the female patients 30s after they have been diagnosed with hypertension nos until 1 year ago in the same hospital visit?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id 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 = 'hypertension nos') AND DATETIME(diagnoses_icd.charttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN (SELECT patients.subject_id FROM patients WHERE patients.gender = 'f') AND admissions.age BETWEEN 30 AND 39 AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND t1.hadm_id = t2.hadm_id GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 3
mimic_iii
CREATE TABLE table_204_70 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the difference in pick numbers between greg schaum and ed bauer ?
SELECT ABS((SELECT "pick #" FROM table_204_70 WHERE "player" = 'greg schaum') - (SELECT "pick #" FROM table_204_70 WHERE "player" = 'ed bauer'))
squall
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Visualize the relationship between Team_ID and ACC_Percent , and group by attribute ACC_Home.
SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Home
nvbench
CREATE TABLE table_220 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which races did Paul Greifzu win?
SELECT "Race Name" FROM table_220 WHERE "Winning driver" = 'Paul Greifzu'
wikisql
CREATE TABLE table_56171 ( "Rd #" real, "Pick #" real, "Player" text, "Team (League)" text, "Reg GP" real, "Pl GP" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest regular GP Larry Courville, who has a PI GP smaller than 0, has?
SELECT MIN("Reg GP") FROM table_56171 WHERE "Player" = 'larry courville' AND "Pl GP" < '0'
wikisql
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 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- give me the number of patients whose marital status is widowed and drug route is oral?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "ORAL"
mimicsql_data
CREATE TABLE table_45667 ( "Macedonian population in Vojvodina" text, "1961" real, "Number 1971" real, "1981" real, "1991" real, "2002" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748?
SELECT "1981" FROM table_45667 WHERE "Number 1971" > '192' AND "1991" = '1748'
wikisql
CREATE TABLE table_62207 ( "Date From" text, "Date To" text, "Pos." text, "Name" text, "Moving To" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was ron-robert zieler loaned out until ?
SELECT "Date To" FROM table_62207 WHERE "Name" = 'ron-robert zieler'
wikisql
CREATE TABLE table_52855 ( "Station Number" text, "District" text, "Location" text, "Type" text, "Appliances" text, "Registrations" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the appliance at the station in St Neots?
SELECT "Appliances" FROM table_52855 WHERE "Location" = 'st neots'
wikisql
CREATE TABLE table_22989 ( "Name" text, "Completions" real, "Attempts" real, "Completion %" text, "Yards" real, "Touchdowns" real, "Interceptions" real, "QB Rating" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many yardage figures for the player with 72.3 QB rating?
SELECT COUNT("Yards") FROM table_22989 WHERE "QB Rating" = '72.3'
wikisql
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- My top comments (eligible for Pundit badge). Show comments with 10 or more upvotes
SELECT ROW_NUMBER() OVER (ORDER BY Score) AS rownum, PostId AS "post_link", Score, Text FROM Comments WHERE UserId = '##userid##' ORDER BY Score DESC
sede
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) 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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) 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 time_interval ( period text, begin_time int, end_time 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 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 equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) 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 code_description ( code varchar, description text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description 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 month ( month_number int, month_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights from TORONTO to CINCINNATI
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 = 'TORONTO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code
atis
CREATE TABLE table_name_81 ( number_of_electorates__2009_ INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Beohari's highest number of electorates?
SELECT MAX(number_of_electorates__2009_) FROM table_name_81 WHERE name = "beohari"
sql_create_context
CREATE TABLE table_204_922 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- name all the nations that did not win any gold medals .
SELECT "nation" FROM table_204_922 WHERE "gold" = 0
squall
CREATE TABLE table_11656578_2 ( area_km²__1998_ VARCHAR, abbreviation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How big (in km2) is the voivodenship also known by the abbreviation KN?
SELECT area_km²__1998_ FROM table_11656578_2 WHERE abbreviation = "kn"
sql_create_context
CREATE TABLE table_train_80 ( "id" int, "mini_mental_state_examination_mmse" int, "uncontrolled_diabetes" bool, "glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int, "cornell_scale_for_depression_in_dementia_csdd" int, "clinical_dementia_rating_cdr" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- cdr score > or equal to 0.5 and < or equal to1
SELECT * FROM table_train_80 WHERE clinical_dementia_rating_cdr >= 0.5 AND clinical_dementia_rating_cdr <= 1
criteria2sql
CREATE TABLE table_29566606_11 ( programme VARCHAR, original_channel_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which programs were originally broadcast on CITV?
SELECT programme FROM table_29566606_11 WHERE original_channel_s_ = "CITV"
sql_create_context
CREATE TABLE table_22338 ( "City of license /Market" text, "Station" text, "Channel ( TV / RF )" text, "Owned Since" real, "Affiliation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What station is affiliated with kmgh-tv?
SELECT "Affiliation" FROM table_22338 WHERE "Station" = 'KMGH-TV'
wikisql
CREATE TABLE table_533 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the first series in this list that Jack Orman wrote?
SELECT MIN("Series #") FROM table_533 WHERE "Written by" = 'Jack Orman'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and revenue , and group by attribute founder, and could you list in descending by the y axis?
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T2.Revenue DESC
nvbench
CREATE TABLE table_name_74 ( wins INTEGER, reds_season VARCHAR, finish VARCHAR, win_percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest wins in a season less than 1915 with a 7th finish and 0.429 win %?
SELECT MIN(wins) FROM table_name_74 WHERE finish = "7th" AND win_percentage > 0.429 AND reds_season < 1915
sql_create_context
CREATE TABLE sampledata15 ( sample_pk number, state text, year text, month text, day text, site text, commod text, source_id text, variety text, origin text, country text, disttype text, commtype text, claim text, quantity number, growst text, packst text, distst text ) CREATE TABLE resultsdata15 ( sample_pk number, commod text, commtype text, lab text, pestcode text, testclass text, concen number, lod number, conunit text, confmethod text, confmethod2 text, annotate text, quantitate text, mean text, extract text, determin text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country is the safest in terms of the pesticide concentration found in imported foods?
SELECT T1.country FROM sampledata15 AS T1 JOIN resultsdata15 AS T2 ON T1.sample_pk = T2.sample_pk GROUP BY T1.country ORDER BY SUM(T2.concen) LIMIT 1
pesticide
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 airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) 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 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 state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE month ( month_number int, month_name text ) 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 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 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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) 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 days ( days_code varchar, day_name varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i'd like a flight leaving ATLANTA 8 7 and arriving in DENVER colorado 8 7 leaving in the afternoon
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, date_day, days, flight WHERE (((date_day.day_number = 7 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND NOT (flight.arrival_time < flight.departure_time)) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 1200 AND 1800
atis
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) -- Using valid SQLite, answer the following questions for the tables provided above. -- From whom I got downvotes.
SELECT u.UpVotes + u.DownVotes FROM Users AS u WHERE u.Id = '566193'
sede
CREATE TABLE table_name_39 ( round VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which round has an opponent of Freiburg?
SELECT round FROM table_name_39 WHERE opponent = "freiburg"
sql_create_context
CREATE TABLE customers ( payment_method VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which payment method is used by most customers?
SELECT payment_method FROM customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text, VAL_UNIT text, DOSE_UNIT text, DOSE_FORM text, SPEC text, USE_FRE text, EACH_DOSAGE text, QTY number, UNIVALENT number, AMOUNT number, SELF_PAY_PRO number, RER_SOL number, SELF_PAY_AMO number, UP_LIMIT_AMO number, OVE_SELF_AMO number, EXP_OCC_DATE time, RECIPE_BILL_ID text, FLX_MED_ORG_ID text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, HOSP_DOC_CD text, HOSP_DOC_NM text, REF_STA_FLG number, DATA_ID text, SYNC_TIME time, PRESCRIPTION_CODE text, PRESCRIPTION_ID text, TRADE_TYPE number, STA_FLG number, STA_DATE time, REIMBURS_TYPE number, FXBZ number, REMOTE_SETTLE_FLG text ) CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY number, ILL_PAY number, CIVIL_SUBSIDY number, PER_SOL number, PER_EXP number, DATA_ID text, SYNC_TIME time, OUT_HOSP_DATE time, CLINIC_ID text, MED_TYPE number, INSURED_STS text, INSURED_IDENTITY number, TRADE_TYPE number, RECIPE_BILL_ID text, ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, REIMBURS_FLG number, SENDER_DEAL_ID text, RECEIVER_DEAL_ID text, SENDER_REVOKE_ID text, RECEIVER_REVOKE_ID text, SENDER_OFFSET_ID text, RECEIVER_OFFSET_ID text, LAS_OVE_PAY number, OVE_ADD_PAY number, SUP_ADD_PAY number, CKC102 number, CASH_PAY number, COM_ACC_PAY number, ENT_ACC_PAY number, ENT_PAY number, COM_PAY number, OLDC_FUND_PAY number, SPE_FUND_PAY number ) CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG number, FLX_MED_ORG_ID text, MED_SER_ORG_NO text, CLINIC_TYPE text, MED_TYPE number, CLINIC_ID text, IN_DIAG_DIS_CD text, IN_DIAG_DIS_NM text, OUT_DIAG_DIS_CD text, OUT_DIAG_DIS_NM text, INPT_AREA_BED text, MED_ORG_DEPT_CD text, MED_ORG_DEPT_NM text, OUT_DIAG_DOC_CD text, OUT_DIAG_DOC_NM text, MAIN_COND_DES text, INSU_TYPE text, IN_HOSP_DAYS number, MED_AMOUT number, FERTILITY_STS number, DATA_ID text, SYNC_TIME time, REIMBURSEMENT_FLG number, HOSP_LEV number, HOSP_STS number, INSURED_IDENTITY number, SERVANT_FLG text, TRADE_TYPE number, INSURED_STS text, REMOTE_SETTLE_FLG text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- 编码为18795530病人在医院0561875入院诊断疾病名称不包含分裂的医疗就诊记录号码是多少?
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '18795530' AND MED_SER_ORG_NO = '0561875' AND NOT IN_DIAG_DIS_NM LIKE '%分裂%'
css
CREATE TABLE table_69876 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final score for the game on May 4?
SELECT "Score" FROM table_69876 WHERE "Date" = 'may 4'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the price for orthopedics consultation?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'treatment' AND cost.eventid IN (SELECT treatment.treatmentid FROM treatment WHERE treatment.treatmentname = 'orthopedics consultation')
eicu
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Visualize a bar chart for simply displaying the email address of the employee and the corresponding salary.
SELECT EMAIL, SALARY FROM employees
nvbench