schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti... | SELECT t1.`<table8>`name FROM ( SELECT `<table8>`.`<table8>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table8>` WHERE `<table8>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.age BETWEEN 20 AND 29 ) AND DATETIME( `<table8>`.`<table8>`resulttime... | until 1 year ago, what is the five most commonly taken test for patients aged 20s? |
<table0>[enroll] { <col0>[class_code]:[text] <col1>[stu_num]:[number] <col2>[enroll_grade]:[text] } <table1>[course] { <col0>[crs_code]:[text] <col1>[dept_code]:[text] <col2>[crs_description]:[text] <col3>[crs_credit]:[number] } <table2>[department] { <col0>[dept_code]:[text] <col1>[dept_name]:[text] <col2>[school_co... | SELECT COUNT( * ), `<table5>`_room FROM `<table5>` GROUP BY `<table5>`_room HAVING COUNT( * ) >= 2 | For each classroom with at least 2 classes, how many classes are offered?
|
<table0>[Students] { <col0>[first_name]:[VARCHAR] <col1>[middle_name]:[VARCHAR] <col2>[last_name]:[VARCHAR] <col3>[student_id]:[VARCHAR] } <table1>[Student_Enrolment] { <col0>[student_id]:[VARCHAR] } | SELECT T1.first_name, T1.middle_name, T1.last_name, T1.student_id FROM `<table0>` AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING COUNT( * ) = 2 | Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id. |
<table0>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table1>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table2>[ground_service] { <co... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( flight.airline_code = 'YX' ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DETROIT' AND flight.to_airport = AIRPORT... | does YX have any flights from MONTREAL to DETROIT |
<table0>[races] { <col0>[raceid]:[number] <col1>[year]:[number] <col2>[round]:[number] <col3>[circuitid]:[number] <col4>[name]:[text] <col5>[date]:[text] <col6>[time]:[text] <col7>[url]:[text] } <table1>[driverstandings] { <col0>[driverstandingsid]:[number] <col1>[raceid]:[number] <col2>[driverid]:[number] <col3>[poin... | SELECT T2.driverid, T3.forename FROM `<table0>` AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid, T3.forename FROM `<table0>` AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.d... | What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix? |
<table0>[table_10838] { <col0>[Rank]:[real] <col1>[Constituency]:[text] <col2>[Winning]:[party] <col3>[2007]:[text] <col4>[Swing]:[gain] <col5>[real]:[place] <col6>[2007]:[text] <col7>[Result]:[text] } | SELECT SUM( "Swing to gain" ) FROM `<table0>` WHERE "Winning party 2007" = 'conservative' AND "Rank" < '5' | What's the sum of swing to gain with a winning party 2007 of Conservative with a rank smaller than 5?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND procedures.icd9_code = "46" | what is the number of patients whose admission location is transfer from hosp/extram and procedure icd9 code is 46?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT `<table2>`.gender FROM `<table2>` WHERE `<table2>`.subject_id = "17787" | what is the gender of subject id 17787?
|
<table0>[table_10577579_3] { <col0>[joined]:[VARCHAR] <col1>[women]:[s_nickname] } | SELECT `<col0>` FROM `<table0>` WHERE women’s_nickname = "Wolfpack" | Name the joined for the wolfpack women's nickname
|
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT `<table0>`.discharge_location, `<table0>`.dischtime FROM `<table0>` WHERE `<table0>`.subject_id = "7273" | what is the discharge location and discharge time of the patient id 7273? |
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } | SELECT T1.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | For those records from the products and each product's manufacturer, show me about the distribution of name and price , and group by attribute name in a bar chart, show by the X in asc please. |
<table0>[table_name_60] { <col0>[game]:[VARCHAR] <col1>[location_attendance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "los angeles memorial sports arena" | What game was located at the Los Angeles Memorial Sports Arena? |
<table0>[vessels] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[imo]:[INT] } <table1>[events] { <col0>[INT]:[vessel_id] <col1>[INT]:[event_type] <col2>[VARCHAR]:[255] <col3>[event_date]:[DATE] } | SELECT v.name FROM `<table0>` v JOIN events e ON v.id = e.vessel_id WHERE e.event_type = 'Speeding' AND e.event_date >= CURDATE( ) - INTERVAL 30 DAY; | Which vessels had a speeding event in the last 30 days? |
<table0>[Air] { <col0>[Carriers]:[Code] <col1>[integer]:[Description] } <table1>[Airports] { <col0>[Code]:[text] <col1>[Description]:[text] } <table2>[Airlines] { <col0>[FL_DATE]:[text] <col1>[OP_CARRIER_AIRLINE_ID]:[integer] <col2>[TAIL_NUM]:[text] <col3>[OP_CARRIER_FL_NUM]:[integer] <col4>[ORIGIN_AIRPORT_ID]:[integ... | SELECT COUNT( * ) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20' | From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there? |
<table0>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table1>[Votes] { <col0>[number]:[Post... | SELECT age, 'posttypeid', AVG( Score ) AS average_score FROM ( SELECT CAST( ( DATEDIFF( m, CreationDate, GETDATE( ) ) / 12 ) AS VARCHAR ) + ' Y' AS Age, Score, PostTypeId FROM `<table24>` WHERE Score >= 101 ) AS t GROUP BY age, PostTypeId ORDER BY PostTypeId, age | How old are the best scored posts (ie score>= 101)?.
|
<table0>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Birth] <col3>[text]:[Height] <col4>[real]:[Weight] } <table1>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6... | SELECT Sex, SUM( Weight ) FROM `<table0>` GROUP BY `<col1>` | Give me the comparison about the sum of Weight over the Sex , and group by attribute Sex.
|
<table0>[Donors] { <col0>[DonorID]:[INT] <col1>[DonorName]:[VARCHAR] <col2>[DonationAmount]:[DECIMAL] <col3>[CauseID]:[INT] <col4>[Age]:[INT] } <table1>[Causes] { <col0>[CauseID]:[INT] <col1>[CauseName]:[VARCHAR] } | SELECT C.CauseName, SUM( D.DonationAmount ) FROM `<table0>` D JOIN Causes C ON D.CauseID = C.CauseID WHERE D.Age BETWEEN 30 AND 40 GROUP BY C.CauseName ORDER BY SUM( D.DonationAmount ) DESC; | Which causes received the most donations from donors aged 30-40? |
<table0>[table_28091] { <col0>[Entered]:[text] <col1>[Weeks]:[real] <col2>[Single]:[text] <col3>[Artist]:[text] <col4>[Peak]:[real] <col5>[Peak]:[reached] <col6>[text]:[Weeks] <col7>[number]:[real] } | SELECT MIN( "Weeks at `<col7>` 1" ) FROM `<table0>` | error (see notes)
|
<table0>[table_66990] { <col0>[Riding]:[text] <col1>[Candidate]:[text] <col2>[Gender]:[text] <col3>[Residence]:[text] <col4>[Occupation]:[text] <col5>[Votes]:[real] <col6>[Rank]:[text] } | SELECT "Riding" FROM `<table0>` WHERE "Votes" > '484' AND "Candidate's Name" = 'harold j. ludwig' | where is harold j. ludwig riding when the votes are more than 484?
|
<table0>[table_name_41] { <col0>[sport]:[VARCHAR] <col1>[medal]:[VARCHAR] <col2>[games]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "gold" AND `<col2>` = "2000 sydney" | Which sport resulted in a gold medal in the 2000 Sydney games? |
<table0>[table_204_236] { <col0>[number]:[title] <col1>[text]:[release] <col2>[date]:[text] <col3>[developer]:[text] <col4>[publisher]:[text] <col5>[genre]:[text] } | SELECT "title" FROM `<table0>` WHERE "title" <> '50 cent: bulletproof' AND "release date" = 2005 | other than 50 cent : bulletproof , what game was released in 2005 ?
|
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.expire_flag = "0" AND lab.label = "Cortisol" | how many patients with death status 0 had lab test named cortisol? |
<table0>[VoteTypes] { <col0>[number]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <... | SELECT Id AS "user_link", UpVotes, DownVotes FROM `<table15>` WHERE Id = '##id##' | Number of upvotes and downvotes by a given user.
|
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[View... | SELECT 'user_link', MAX( accepts ) AS Highest_accepts_in_a_day FROM ( SELECT `<table9>`.Id AS "user_link", Votes.CreationDate, COUNT( Votes.Id ) AS accepts FROM `<table9>` INNER JOIN Posts ON Posts.OwnerUserId = `<table9>`.Id INNER JOIN Votes ON Posts.Id = Votes.PostId AND Votes.VoteTypeId = 1 GROUP BY `<table9>`.Id, V... | How many accepts have I gotten in a day?.
|
<table0>[school_performance] { <col0>[school_id]:[number] <col1>[school_year]:[text] <col2>[class_a]:[text] <col3>[class_aa]:[text] } <table1>[player] { <col0>[player_id]:[number] } <table2>[school] { <col0>[school_id]:[number] } <table3>[school_details] { <col0>[school_id]:[number] <col1>[nickname]:[text] <col2>[co... | SELECT location FROM `<table2>` ORDER BY enrollment | What is the list of school locations sorted in ascending order of school enrollment?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.discharge_location = "HOME HEALTH CARE" AND procedures.short_title = "Fiber-optic bronchoscopy" | give me the number of patients whose discharge location is home health care and procedure short title is fiber-optic bronchoscopy?
|
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varcha... | SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table2>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col0>` ) DESC | For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, could you show in descending by the Y-axis?
|
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[ti... | SELECT COUNT( * ) > 0 FROM `<table5>` WHERE `<table5>`.uniquepid = '013-33898' AND `<table5>`.hospitaladmitsource = 'emergency department' AND DATETIME( `<table5>`.unitadmittime ) >= DATETIME( CURRENT_TIME( ), '-1 year' ) | since 1 year ago patient 013-33898 had been in an er? |
<table0>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table1>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <c... | SELECT q.ViewCount AS Views, q.Score AS score, q.Id AS "post_link" FROM `<table6>` AS q INNER JOIN PostHistory AS h ON q.Id = h.PostId WHERE h.PostHistoryTypeId = 10 AND h.Comment = 103 AND NOT q.ClosedDate IS NULL ORDER BY Score LIMIT 20 | Most upvoted questions closed as unclear what you'are asking and then reopened. |
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } | SELECT T2.Name, AVG( T1.Price ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY AVG( T1.Price ) DESC | What are the average prices of products, grouped by manufacturer name, could you show in desc by the y-axis? |
<table0>[table_203_114] { <col0>[number]:[week] <col1>[number]:[date] <col2>[text]:[time] <col3>[text]:[opponent] <col4>[text]:[result] <col5>[text]:[game] <col6>[site]:[text] <col7>[record]:[text] <col8>[attendance]:[number] <col9>[bye]:[text] } | SELECT "attendance" FROM `<table0>` ORDER BY id DESC LIMIT 1 | what was the total attendance at the end of the last week ?
|
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id... | SELECT t1.drug FROM ( SELECT `<table16>`.drug, COUNT( `<table16>`.startdate ) AS c1 FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.subject_id = 96429 ) AND STRFTIME( '%y-%m', `<table16>`.startdate ) <= '2104-03' GROUP BY `<table16>`.drug ) AS t1 WHERE t1.c1 = ... | what's the name of the drug that patient 96429 was prescribed two times until 03/2104? |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[chartt... | SELECT MIN( `<table3>`.valuenum ) FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table6>`.icustay_id FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table14>`.hadm_id FROM `<table14>` WHERE `<table14>`.subject_id = 29666 ) ) AND `<table3>`.itemid IN ( SELECT `<table2>`.itemid FROM `<table2>` WHERE `<t... | on 08/04/last year', what was minimum arterial bp [systolic] of patient 29666? |
<table0>[table_name_29] { <col0>[entrant]:[VARCHAR] <col1>[engine]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "maserati straight-6" AND `<col2>` = 1952 | What Entrant has a 1952 maserati straight-6 engine? |
<table0>[customer_usage] { <col0>[usage_id]:[INT] <col1>[customer_id]:[INT] <col2>[usage_date]:[DATE] <col3>[data_usage]:[DECIMAL] } | INSERT INTO `<table0>` ( usage_id, customer_id, usage_date, `<col3>` ) VALUES ( ( SELECT MAX( `<col0>` ) FROM `<table0>` ) + 1, 1001, '2023-03-01', 500.00 ); | Insert a new record in the customer_usage table for a customer with id 1001, who used 500 MB of data on 2023-03-01 |
<table0>[injury_accident] { <col0>[game_id]:[int] <col1>[int]:[Player] <col2>[text]:[Injury] <col3>[text]:[Number_of_matches] <col4>[text]:[Source] } <table1>[game] { <col0>[stadium_id]:[int] <col1>[int]:[Season] <col2>[int]:[Date] <col3>[text]:[Home_team] <col4>[text]:[Away_team] <col5>[text]:[Score] <col6>[text]:[Co... | SELECT Season, COUNT( Season ) FROM `<table1>` GROUP BY Away_team, Season ORDER BY Season DESC | Give me line charts of worldwide gross the number of season over year season by major genres Away_team, and order Season from high to low order please. |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Abn react-procedure NOS" AND lab."CATEGORY" = "Chemistry" | count the number of patients whose diagnoses short title is abn react-procedure nos and lab test category is chemistry?
|
<table0>[table_4821] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] } | SELECT COUNT( "Crowd" ) FROM `<table0>` WHERE "Away `<col2>` score" = '10.19 ( 79 )' | How many attended the game when the away team's score is 10.19 (79)?
|
<table0>[table_name_20] { <col0>[population]:[INTEGER] <col1>[colour]:[VARCHAR] <col2>[construction_commenced]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "blue" AND `<col2>` < 1987 | What is the lowest population for the neighborhood with the color blue that commenced its construction before 1987?
|
<table0>[table_name_7] { <col0>[attendance]:[INTEGER] <col1>[record]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "9–26" | What is the lowest number of people in attendance when the record was 9 26?
|
<table0>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table1>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <col2>[airport_location]:[text] <col3>[state_code]:[varcha... | SELECT DISTINCT flight.flight_id FROM `<table15>` AS AIRPORT_SERVICE_0, `<table15>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND fare.round_trip_cost < 1288 AND flight_fare.fare_id = fare.fare_... | show me the flights from INDIANAPOLIS to ORLANDO with round trip fares less than 1288 |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.gender = "F" AND diagnoses.short_title = "Preterm NEC 2500+g" | what is the number of patients whose gender is f and diagnoses short title is preterm nec 2500+g? |
<table0>[table_name_65] { <col0>[others__number]:[VARCHAR] <col1>[kerry__percentage]:[VARCHAR] <col2>[bush__number]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "44.6%" AND `<col2>` > 163 OFFSET 650 | How many votes did Others receive where Kerry has 44.6%, and Bush more than 163,650 votes? |
<table0>[table_16185956_1] { <col0>[status]:[VARCHAR] <col1>[results]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "63% 37%" | What is the status of the district where the result is 63% 37%? |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[diagnoses_icd] { <col0>[row_id]:[number] ... | SELECT COUNT( * ) > 0 FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 45612 ) AND `<table14>`.drug = 'propofol' AND STRFTIME( '%y', `<table14>`.startdate ) <= '2101' | did patient 45612 have propofol prescribed until 2101?
|
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[mete... | SELECT name, meter_100 FROM `<table1>` ORDER BY name DESC | Draw a bar chart about the distribution of name and meter_100 , and display from high to low by the names. |
<table0>[table_10342194_3] { <col0>[amount_of_trees]:[VARCHAR] <col1>[that_require_replacement]:[VARCHAR] <col2>[district]:[VARCHAR] } | SELECT amount_of_trees, _that_require_replacement FROM `<table0>` WHERE `<col2>` = "Motovilikhinsky" | What is the amount of trees, that require replacement when the district is motovilikhinsky? |
<table0>[table_14951643_1] { <col0>[record]:[VARCHAR] <col1>[result]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "W 52–19" | what's the record with result being w 52 19 |
<table0>[WeatherData] { <col0>[crop_type]:[VARCHAR] <col1>[temperature]:[FLOAT] <col2>[record_date]:[DATE] } | SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'Cassava' AND `<col2>` >= DATEADD( day, -30, GETDATE( ) ); | What is the maximum temperature recorded for crop 'Cassava' in the last 30 days? |
<table0>[month] { } | SELECT month.month, SUM( green_buildings.annual_energy_savings_kWh ) FROM green_buildings JOIN green_buildings_timeline ON green_buildings.id = green_buildings_timeline.building_id JOIN month ON MONTH( green_buildings_timeline.start_date ) = month.id GROUP BY month.month; | Calculate the total annual energy savings for green buildings constructed in each month of the year |
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1... | SELECT All_Neutral, `<col8>` FROM `<table0>` | Visualize a pie chart about the proportion of All_Neutral and All_Games_Percent.
|
<table0>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table1>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text] <col7>[... | SELECT DISTINCT flight.flight_id FROM `<table7>` AS AIRPORT_SERVICE_0, `<table7>` AS AIRPORT_SERVICE_1, `<table7>` AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CITY_2.city_code ... | PHILADELPHIA to SAN FRANCISCO with one stop in DALLAS please |
<table0>[table_39336] { <col0>[Rank]:[real] <col1>[Country]:[Territory] <col2>[text]:[Miss] <col3>[World]:[real] <col4>[1st]:[Runner] <col5>[real]:[2nd] <col6>[Runner]:[real] <col7>[3rd]:[Runner] <col8>[real]:[4th] <col9>[Runner]:[real] <col10>[5th]:[Runner] <col11>[real]:[6th] <col12>[Runner]:[real] <col13>[Semifinali... | SELECT MIN( "1st Runner-up" ) FROM `<table0>` WHERE "Rank" > '3' AND "6th Runner-up" > '0' AND "5th Runner-up" < '1' | Rank larger than 3, and a 6th Runner-up larger than 0, and a 5th Runner-up smaller than 1 has which lowest 1st Runner-up?
|
<table0>[party] { <col0>[Party_ID]:[int] <col1>[Party_Theme]:[text] <col2>[Location]:[text] <col3>[First_year]:[text] <col4>[Last_year]:[text] <col5>[Number_of_hosts]:[int] } <table1>[host] { <col0>[Host_ID]:[int] <col1>[text]:[Nationality] <col2>[text]:[Age] } <table2>[party_host] { <col0>[Party_ID]:[int] <col1>[Hos... | SELECT Nationality, COUNT( * ) FROM `<table1>` GROUP BY Nationality ORDER BY Nationality | How many hosts does each nationality have? List the nationality and the count with a bar chart, and could you order names in asc order please?
|
<table0>[table_204_577] { <col0>[number]:[name] <col1>[text]:[operational] <col2>[text]:[numeral] <col3>[system]:[text] <col4>[computing]:[mechanism] <col5>[text]:[programming] <col6>[text]:[turing] <col7>[complete]:[text] } | SELECT "first operational" FROM `<table0>` WHERE "name" = 'zuse z3' | what operational date is next to zuse z3 ? |
<table0>[table_name_99] { <col0>[game]:[INTEGER] <col1>[record]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "27–30" | Which Game has a Record of 27–30? |
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[mete... | SELECT meter_200, AVG( ID ) FROM `<table1>` GROUP BY meter_200 ORDER BY AVG( ID ) DESC | A bar chart shows the distribution of meter_200 and the average of ID , and group by attribute meter_200, and list Y in desc order. |
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[In... | SELECT Tags, COUNT( DISTINCT Id ) AS post_cnt FROM `<table5>` WHERE YEAR( CreationDate ) = '2017' GROUP BY Tags ORDER BY post_cnt DESC LIMIT 10 | Top 10 Tags Associated with Posts Created in 2017.
|
<table0>[location] { <col0>[restaurant_id]:[int] <col1>[house_number]:[int] <col2>[street_name]:[varchar] <col3>[city_name]:[varchar] } <table1>[restaurant] { <col0>[int]:[name] <col1>[varchar]:[food_type] <col2>[varchar]:[city_name] <col3>[varchar]:[rating] } <table2>[geographic] { <col0>[city_name]:[varchar] <col1>... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE restaurant.city_name IN ( SELECT GEOGRAPHICalias0.city_name FROM `<table2>` AS GEOGRAPHICalias0 WHERE GEOGRAPHICalias0.region = 'bay area' ) AND restaurant.id = location.restaurant_id | give me a restaurant in the bay area ? |
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.discharge_location = "HOME" | how many patients whose discharge location is home?
|
<table0>[Project_Staff] { <col0>[staff_id]:[DOUBLE] <col1>[project_id]:[INTEGER] <col2>[role_code]:[VARCHAR] <col3>[date_from]:[DATETIME] <col4>[date_to]:[DATETIME] <col5>[other_details]:[VARCHAR] } <table1>[Projects] { <col0>[project_id]:[INTEGER] <col1>[organisation_id]:[INTEGER] <col2>[project_details]:[VARCHAR] }... | SELECT T2.organisation_details, T1.organisation_id FROM `<table2>` AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details | Return a bar chart on what are the ids and details for all organizations that have grants of more than 6000 dollars?
|
<table0>[table_name_15] { <col0>[ddr3_speed]:[INTEGER] <col1>[model]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "e-350" | Name the average DDR3 speed for model e-350
|
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <t... | SELECT COUNT( * ) FROM `<table2>` WHERE `<table2>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '035-166' ) ) AND `<table2>`.drugname = 'morp... | the number of times that patient 035-166 had been prescribed morphine inj in 04/2104.
|
<table0>[table_8479] { <col0>[Election]:[real] <col1>[Candidate]:[text] <col2>[Number]:[votes] <col3>[text]:[Share] <col4>[votes]:[text] <col5>[Outcome]:[election] } | SELECT "Share of votes" FROM `<table0>` WHERE "Election" = '2008' | What is the share of votes in the 2008 election?
|
<table0>[network_traffic] { <col0>[INT]:[date] <col1>[DATE]:[bytes] <col2>[INT]:[INSERT] } | SELECT date, MAX( bytes ) as max_bytes FROM `<table0>` GROUP BY date; | What is the maximum number of bytes transferred in a single day? |
<table0>[t_kc24] { <col0>[MED_SAFE_PAY_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[MED_CLINIC_ID]:[text] <col4>[REF_SLT_FLG]:[number] <col5>[CLINIC_SLT_DATE]:[time] <col6>[COMP_ID]:[text] <col7>[PERSON_ID]:[text] <col8>[FLX_MED_ORG_ID]:[text] <col9>[INSU_TYPE]:[text] <col10>[MED_AMO... | SELECT `<col0>` FROM `<table2>` WHERE `<col5>` = '孙祺然' AND NOT `<col0>` IN ( SELECT `<col0>` FROM `<table1>` WHERE AMOUNT <= 9192.27 ) | 看一下孙祺然这个病人在哪几次医疗记录中被开出的药品均超过9192.27元?医疗就诊编号是啥
|
<table0>[users] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[email] <col3>[VARCHAR]:[signup_date] <col4>[DATE]:[signup_source] } | INSERT INTO users ( id, name, email, signup_date, signup_source ) VALUES ( 321, 'Jamie', 'jamie@example.com', '2022-10-01', 'email' ); | Add a new user who signed up using email |
<table0>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table1>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table2>[time_interval] { <c... | SELECT DISTINCT fare.fare_id FROM `<table0>` AS AIRPORT_SERVICE_0, `<table0>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.... | show me one more time the FIRST class fares from BALTIMORE to DALLAS |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <co... | SELECT LAST_NAME, `<col7>` FROM `<table6>` | Show each employee's salary using a bar chart, note that use the last name of each employee. |
<table0>[table_1342218_6] { <col0>[first_elected]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Clair Engle" | What year was clair engle first elected?
|
<table0>[countrylanguage] { <col0>[LANGUAGE]:[VARCHAR] <col1>[CountryCode]:[VARCHAR] <col2>[Percentage]:[INTEGER] } | SELECT LANGUAGE, CountryCode, MAX( `<col2>` ) FROM `<table0>` GROUP BY `<col1>` | What is the language spoken by the largest percentage of people in each country? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.flag = "delta" | How many patients with brain mass intracranial hemorrhage as their primary disease had delta an abnormal lab test status?
|
<table0>[temperature_data] { <col0>[station]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[temperature] } | SELECT station, ( temperature - LAG( temperature ) OVER ( PARTITION BY `<col0>` ORDER BY year ) ) AS temperature_change FROM `<table0>` WHERE year BETWEEN 2022 AND 2022; | What is the change in temperature for each Arctic research station over the last year? |
<table0>[table_name_97] { <col0>[date]:[VARCHAR] <col1>[catalog]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "epc 81436" | What is Date, when Catalog is EPC 81436? |
<table0>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table2>[ground_service] { <col0>[city_code... | SELECT DISTINCT `<table15>`_code FROM `<table15>` WHERE `<table15>`_code IN ( SELECT EQUIPMENT_SEQUENCEalias0.`<table15>`_code FROM `<table14>` AS EQUIPMENT_SEQUENCEalias0 WHERE EQUIPMENT_SEQUENCEalias0.`<table15>`_code_sequence IN ( SELECT FLIGHTalias0.`<table15>`_code_sequence FROM `<table7>` AS FLIGHTalias0 WHERE ( ... | what type of aircraft is used for the AA flight leaving at 1619 |
<table0>[table_39160] { <col0>[Year]:[real] <col1>[Men]:[singles] <col2>[text]:[Women] <col3>[singles]:[text] <col4>[Men]:[doubles] <col5>[text]:[Women] <col6>[doubles]:[text] <col7>[Mixed]:[doubles] } | SELECT "Mixed doubles" FROM `<table0>` WHERE "Year" > '2007' AND "Men's singles" = 'eduards loze' | What is the mixed doubles in the year 2007 when the men's singles is eduards loze?
|
<table0>[table_60802] { <col0>[Episode]:[text] <col1>[season]:[text] <col2>[season]:[text] <col3>[season]:[text] <col4>[season]:[text] <col5>[season]:[text] <col6>[season]:[text] } | SELECT "5 season" FROM `<table0>` WHERE "2 season" = '3 168 673 ( 2 april 2008 )' | What is 5 Season, when 2 Season is '3 168 673 (2 April 2008)'? |
<table0>[table_name_57] { <col0>[nhl_team]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "roman vopat" | On what NHL team does Roman Vopat play for?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` WHERE `<table1>`.insurance = "Private" AND `<table1>`.discharge_location = "SHORT TERM HOSPITAL" | provide the number of patients whose insurance is private and discharge location is short term hospital?
|
<table0>[table_18958648_1] { <col0>[overweight__incl_obese__adults]:[VARCHAR] <col1>[obese_children_and_adolescents]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "12.4%" | What is every percentage of overweight or obese adults when 12.4% of children and adolescents are obese? |
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } | SELECT T1.Name, T1.Price FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC | For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and price , and group by attribute headquarter, and rank by the X in desc.
|
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` WHERE `<table0>`.diagnosis = "LEFT INTERNAL JUGULAR VEIN THROMBOSIS;LEFT ARM EDEMA" AND `<table0>`.days_stay > "29" | How many patients diagnosed with primary disease left internal jugular vein thrombosis; left arm edema stayed in the hospital for more than 29 days?
|
<table0>[table_14139408_1] { <col0>[poles]:[VARCHAR] <col1>[pts]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "81" | what's the poles with pts being 81 |
<table0>[table_204_44] { <col0>[number]:[face] <col1>[value]:[number] <col2>[u20ac0]:[number] <col3>[u20ac0]:[number] <col4>[u20ac0]:[number] <col5>[u20ac0]:[number] <col6>[u20ac0]:[number] <col7>[u20ac0]:[number] <col8>[u20ac1]:[number] <col9>[u20ac2]:[number] } | SELECT "\u20ac1.00" FROM `<table0>` WHERE "face value" = 2011 | what is the total face value of 1.00 in 2011 ?
|
<table0>[table_100518_1] { <col0>[guardian_m]:[VARCHAR] <col1>[consort]:[VARCHAR] } | SELECT guardian_mātṛkā FROM `<table0>` WHERE `<col1>` = "Svāhā" | What is the guardian mātṛkā for the guardian whose consort is Svāhā? |
<table0>[table_203_95] { <col0>[number]:[year] <col1>[text]:[democratic] <col2>[nparty]:[number] <col3>[republican]:[nparty] <col4>[number]:[independent] <col5>[text]:[majority] } | SELECT COUNT( "year" ) FROM `<table0>` WHERE "democratic\nparty" > "republican\nparty" AND "democratic\nparty" > "independent\n/ other" AND "year" < 1876 | how many years did the democratic party have the majority before 1876 in the south carolina house of representatives ?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT `<table1>`.admission_location, `<table1>`.admittime FROM `<table1>` WHERE `<table1>`.subject_id = "45962" | what is admission location and admission time of subject id 45962? |
<table0>[Drama_Workshop_Groups] { <col0>[Workshop_Group_ID]:[INTEGER] <col1>[Address_ID]:[INTEGER] <col2>[Currency_Code]:[CHAR] <col3>[Marketing_Region_Code]:[CHAR] <col4>[Store_Name]:[VARCHAR] <col5>[255]:[Store_Phone] <col6>[VARCHAR]:[255] <col7>[Store_Email_Address]:[VARCHAR] <col8>[255]:[Other_Details] <col9>[VARCH... | SELECT Actual_Delivery_Date, COUNT( `<col5>` ) FROM `<table10>` AS T1 JOIN Order_Items AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1 | What are the actual delivery dates of orders with quantity 1, and count them by a bar chart
|
<table0>[table_51273] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Decision]:[text] <col5>[Attendance]:[real] <col6>[Record]:[text] } | SELECT "Record" FROM `<table0>` WHERE "Visitor" = 'chicago' | What was the record when chicago was the visiting team?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Accid in resident instit" AND lab.flag = "delta" | how many patients diagnosed with short title accid in resident instit have delta lab test abnormal status?
|
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[t... | SELECT t1.`<table5>`name FROM ( SELECT `<table5>`.`<table5>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table5>` WHERE `<table5>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.age BETWEEN 30 AND 39 ) AND DATETIME( `<table5>`.`<table5>`resulttime... | what are the five most commonly ordered tests during this year for patients aged 30s? |
<table0>[table_name_58] { <col0>[sign_of_zodiac]:[VARCHAR] <col1>[in_malayalam]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "മീനം" | WHAT IS THE SIGN OF ZODIAC OF മീനം? |
<table0>[table_28295] { <col0>[Browser]:[text] <col1>[Operating]:[system] <col2>[text]:[Latest] <col3>[stable]:[release] <col4>[text]:[Theora] <col5>[text]:[264] <col6>[text]:[VP8] <col7>[WebM]:[text] <col8>[VP9]:[WebM] } | SELECT "Latest `<col3>` release" FROM `<table0>` WHERE "VP9 ( `<col7>` )" = 'No' AND "H.264" = '3.0' | What is the last stable version where the h.264 is 3.0 and vp9 (webm) is no.
|
<table0>[renewable_projects] { <col0>[project_id]:[INT] <col1>[project_name]:[VARCHAR] <col2>[source_id]:[INT] <col3>[installation_year]:[INT] } | SELECT installation_year, COUNT( * ) as num_projects FROM `<table0>` GROUP BY installation_year; | How many renewable energy projects were installed each year? |
<table0>[table_5209] { <col0>[Position]:[text] <col1>[Game]:[text] <col2>[Game]:[text] <col3>[Game]:[text] <col4>[Exhibition]:[text] } | SELECT "Exhibition*" FROM `<table0>` WHERE "Game 2" = 'andrew farrar' | Which Exhibition has a Game 2 of andrew farrar? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>... | SELECT COUNT( * ) FROM `<table7>` WHERE `<table7>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '022-187132' AND `<table5>`.hospitaldischarge... | how many times during their current hospital visit is patient 022-187132 getting a vitamin b12 test? |
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>... | SELECT AVG( `<table2>`.MED_AMOUT ) FROM `<table2>` WHERE `<table2>`.MED_ORG_DEPT_NM = '过敏反应科' AND `<table2>`.IN_HOSP_DATE BETWEEN '2003-04-29' AND '2008-01-03' AND `<table2>`.IN_DIAG_DIS_CD = 'Q89.696' AND `<table2>`.CLINIC_TYPE = '住院' | 在03年4月29日到08年1月3日期间,因疾病Q89.696导致住院产生的平均费用在过敏反应科有多少
|
<table0>[table_2897457_8] { <col0>[player]:[VARCHAR] <col1>[nhl_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Vancouver Canucks" | Who was drafted to the Vancouver Canucks?
|
<table0>[table_59934] { <col0>[Date]:[text] <col1>[ship]:[text] <col2>[Flag]:[text] <col3>[Tonnage]:[real] <col4>[Fate]:[text] } | SELECT "Fate" FROM `<table0>` WHERE "Tonnage" > '4,671' AND "Name of ship" = 'hms manistee ( f 104 )' | What is the Fate of the HMS Manistee (f 104) with a Tonnage of 4,671 or more?
|
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.days_stay > "14" AND prescriptions.route = "OU" | what is the number of patients whose days of hospital stay is greater than 14 and drug route is ou?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.