schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[Streams] { <col0>[artist_name]:[VARCHAR] <col1>[year]:[INT] <col2>[streams]:[INT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 2019; | What is the average number of streams per artist in 2019? |
<table0>[table_name_49] { <col0>[laps]:[INTEGER] <col1>[finish]:[VARCHAR] <col2>[start]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "7" AND `<col2>` = "6" | What's the smallest amount of Laps that had a finish of 7 with a start of 6?
|
<table0>[table_name_51] { <col0>[co_champions]:[INTEGER] <col1>[records]:[VARCHAR] <col2>[pct]:[VARCHAR] <col3>[mrc_championships]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 0.786 AND `<col3>` = 6 AND `<col1>` = "88-45-6" | What is the highest value for co-champions when the PCT is less than 0.786 and MRC championships is 6 with records of 88-45-6?
|
<table0>[customer_month] { <col0>[INT]:[name] <col1>[VARCHAR]:[signup_date] <col2>[DATE]:[is_returning] <col3>[BOOLEAN]:[INSERT] } | SELECT MONTH( signup_date ), COUNT( DISTINCT id ) FROM `<table0>` WHERE is_returning = true GROUP BY MONTH( signup_date ); | Display the number of returning customers per month |
<table0>[CityI_PublicTransport] { <col0>[ride_id]:[INT] <col1>[vehicle_type]:[VARCHAR] <col2>[trip_distance]:[FLOAT] } | SELECT SUM( trip_distance ) FROM CityI_PublicTransport; | What is the total number of trips made by public transportation in CityI? |
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.diagnosis = "NEWBORN" AND procedures.icd9_code = "5361" | Out of total number of patients, how many of the newborn (as primary disease) had icd9 code 5361 |
<table0>[table_11622896_1] { <col0>[location]:[VARCHAR] } | SELECT MAX( 1 AS st_prize__ ) AS $__ FROM `<table0>` WHERE `<col0>` = "South Carolina" | What is the largest 1st prize( $ ) at the South Carolina location? |
<table0>[donations] { <col0>[donation_id]:[INT] <col1>[donor_id]:[INT] <col2>[campaign_id]:[INT] <col3>[donation_amount]:[DECIMAL] } | DELETE FROM `<table0>` WHERE `<col3>` < 1000; | Delete all records with donation amounts below 1000 in the 'donations' table. |
<table0>[table_name_13] { <col0>[event]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3-0" | What is Event, when Record is '3-0'? |
<table0>[race] { <col0>[race_id]:[number] <col1>[name]:[text] <col2>[class]:[text] <col3>[date]:[text] <col4>[track_id]:[text] } <table1>[track] { <col0>[track_id]:[number] <col1>[name]:[text] <col2>[location]:[text] <col3>[seating]:[number] <col4>[year_opened]:[number] } | SELECT DISTINCT `<col2>` FROM `<table0>` | Return the different classes of races.
|
<table0>[table_name_86] { <col0>[listed]:[VARCHAR] <col1>[county]:[VARCHAR] <col2>[location]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sublette" AND `<col2>` = "daniel" | What is the listed for the bridge at Daniel in Sublette county? |
<table0>[table_26301697_2] { <col0>[age]:[INTEGER] } | SELECT MAX( `<col0>` ) FROM `<table0>` | Name the most age |
<table0>[create] { <col0>[table]:[vulnerabilities] <col1>[int]:[industry] <col2>[varchar]:[255] <col3>[severity]:[int] <col4>[insert]:[vulnerabilities] <col5>[values]:[financial] <col6>[services]:[insert] <col7>[vulnerabilities]:[values] <col8>[financial]:[services] <col9>[insert]:[vulnerabilities] <col10>[values]:[hea... | SELECT AVG( severity ) FROM vulnerabilities WHERE industry = 'financial services'; | What is the average severity score of vulnerabilities for the financial services industry? |
<table0>[Addresses] { <col0>[document_id]:[VARCHAR] } <table1>[Documents_Mailed] { <col0>[document_id]:[VARCHAR] } | SELECT `<table0>`.address_details FROM `<table0>` JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = `<table0>`.address_id WHERE `<col0>` = 4 | What address was the document with id 4 mailed to? |
<table0>[table_name_79] { <col0>[season]:[VARCHAR] <col1>[skip]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "eve muirhead" AND third = "jackie lockhart ( e/o ) kelly wood ( w )" | Which Season has a Skip of Eve Muirhead with a thirs of Jackie Lockhart (e/o) Kelly Wood (w)?
|
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[SuggestedEdits] { <col0>[number]:[PostId] <col... | SELECT Id, PostTypeId, Body, ParentId, CreationDate, Score FROM `<table22>` AS p WHERE p.ParentId IN ( SELECT Id FROM `<table22>` AS q WHERE ( q.Tags LIKE '%<swift>%' OR q.Tags LIKE '%<swift2>%' OR q.Tags LIKE '%<swift-playground>%' OR q.Tags LIKE '%<swift-json>%' OR q.Tags LIKE '%<swift-generics>%' OR q.Tags LIKE '%<s... | All swift-related questions in 2015. |
<table0>[table_name_74] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "june 17" | What was the final score of the game on June 17? |
<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 `<table3>`.diagnosis, diagnoses.icd9_code FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.name = "Ida Cook" | look for the primary disease and diagnoses icd9 code for patient ida cook.
|
<table0>[table_39703] { <col0>[Rank]:[text] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] } | SELECT SUM( "Total" ) FROM `<table0>` WHERE "Nation" = 'germany' AND "Bronze" < '56' | How many total medals for germany with under 56 bronzes?
|
<table0>[AttorneyInfo] { <col0>[AttorneyID]:[INT] <col1>[Cases]:[INT] <col2>[DECIMAL]:[INSERT] } | SELECT a.Name, SUM( a.Cases ) AS TotalCases, SUM( a.Amount ) AS TotalBilling FROM `<table0>` a GROUP BY a.Name; | Present the total number of cases and billing amount for each attorney. |
<table0>[instructor] { <col0>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col0>` LIKE '%dar%' | Find the names of all instructors whose name includes the substring “dar”. |
<table0>[table_203_715] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT COUNT( "year" ) FROM `<table0>` WHERE "notes" > 9 | how many years was the distance greater than 9 meters ?
|
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.admission_type = "URGENT" AND procedures.icd9_code = "9229" | give me the number of patients whose admission type is urgent and procedure icd9 code is 9229?
|
<table0>[borders] { <col0>[Country1]:[text] <col1>[Country2]:[text] <col2>[Length]:[real] } <table1>[city] { <col0>[text]:[Country] <col1>[text]:[Province] <col2>[text]:[Population] <col3>[integer]:[Longitude] <col4>[real]:[Latitude] } <table2>[continent] { <col0>[text]:[Area] } <table3>[country] { <col0>[text]:[Cod... | SELECT Name, City FROM `<table26>` WHERE Country = 'USA' | For each organisations with headquarters in the USA, provide the its full name and the city where the headquarter is located at. |
<table0>[table_name_65] { <col0>[platform_s]:[VARCHAR] <col1>[genre]:[VARCHAR] } | SELECT platform_s_ FROM `<table0>` WHERE `<col1>` = "third-person shooter" | What is the platform for the game of the third-person shooter genre? |
<table0>[game] { <col0>[stadium_id]:[number] <col1>[number]:[season] <col2>[number]:[date] <col3>[text]:[home_team] <col4>[text]:[away_team] <col5>[text]:[score] <col6>[text]:[competition] } <table1>[stadium] { <col0>[number]:[name] <col1>[text]:[home_games] <col2>[number]:[average_attendance] <col3>[number]:[total_at... | SELECT average_attendance FROM `<table1>` WHERE capacity_percentage > 100 | What is the average attendance of stadiums with capacity percentage higher than 100%?
|
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPos... | SELECT p.Id AS postid, p.Title AS posttitle, p.Body AS posttext, p.Tags AS posttags, dupes.Id AS dupid, dupes.Title AS duptitle, dupes.Body AS duptext, dupes.Tags AS duptags FROM `<table5>` AS p JOIN PostLinks AS links ON ( p.Id = links.RelatedPostId AND LinkTypeId = 3 ) JOIN `<table5>` AS dupes ON ( dupes.Id = links.P... | Duplicate Questions (Title, Body) - MRA. |
<table0>[table_18171] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Results]:[text] <col5>[Candidates]:[text] } | SELECT COUNT( "District" ) FROM `<table0>` WHERE "Incumbent" = 'Gary Condit' | How many districts does gary condit represent?
|
<table0>[TB_By_State] { <col0>[INT]:[state] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[INSERT] } | SELECT state, type, COUNT( * ) FROM `<table0>` GROUP BY state, type; | Display the number of tunnels and bridges in each state |
<table0>[field] { <col0>[fieldid]:[int] } <table1>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table2>[venue] { <col0>[venueid]:[int] <col1>[venuename]:[varchar] } <table3>[author] { <col0>[authorid]:[int] <col1>[authorname]:[varchar] } <table4>[dataset] { <col0>[datasetid]:[int] <col1>[datasetname... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'deep learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2012 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' | who published deep learning papers at ACL 2012
|
<table0>[table_25504] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[High]:[points] <col5>[text]:[High] <col6>[rebounds]:[text] <col7>[High]:[assists] <col8>[text]:[Location] <col9>[Attendance]:[text] <col10>[Record]:[text] } | SELECT "Team" FROM `<table0>` WHERE "Date" = 'December 11' | Who was he opponent on december 11?
|
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la... | SELECT `<table3>`.icd9_code, `<table3>`.short_title FROM `<table3>` WHERE `<table3>`.subject_id = "55094" | get the short title as well as the icd9 code of diagnoses for patient with patient id 55094.
|
<table0>[table_203_572] { <col0>[number]:[judge] <col1>[text]:[court] <col2>[text]:[began] <col3>[active]:[nservice] <col4>[text]:[ended] <col5>[active]:[nservice] <col6>[text]:[ended] <col7>[senior]:[nstatus] } | SELECT "judge" FROM `<table0>` WHERE "judge" IN ( 'wayne edward alley', 'james henry alesia' ) ORDER BY "began active\nservice" LIMIT 1 | which judge began active service first , wayne edward alley or james henry alesia ? |
<table0>[Has_Allergy] { <col0>[StuID]:[INTEGER] <col1>[Allergy]:[VARCHAR] } <table1>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table2>[Allergy_Type] { <... | SELECT city_code, COUNT( * ) FROM `<table1>` GROUP BY `<col7>` ORDER BY `<col7>` DESC | How many students live in each city, display in desc by the X-axis. |
<table0>[table_2616] { <col0>[Stage]:[real] <col1>[Stage]:[winner] <col2>[text]:[General] <col3>[classification]:[text] <col4>[Points]:[classification] <col5>[text]:[Mountains] <col6>[classification]:[text] <col7>[Malaysian]:[rider] <col8>[classification]:[text] <col9>[Team]:[classification] <col10>[text]:[Malaysian] <... | SELECT "Team classification" FROM `<table0>` WHERE "Stage winner" = 'Taiji Nishitani' | Which team classification has taiji nishitani as the stage winner?
|
<table0>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[account_name]:[VARCHAR] <col3>[other_account_details]:[VARCHAR] } <table1>[Customers_Cards] { <col0>[card_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[card_type_code]:[VARCHAR] <col3>[card_number]:[VARCHAR] <col4>[date_valid_f... | SELECT card_type_code, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` | Display a bar chart for what are the different card types, and how many cards are there of each? |
<table0>[table_22257] { <col0>[real]:[Cover] <col1>[Date]:[text] <col2>[Story]:[Title] <col3>[text]:[Writer] <col4>[text]:[Artist] <col5>[text]:[Letterer] <col6>[text]:[Colourist] <col7>[text]:[Editor] <col8>[text]:[Comments] } | SELECT COUNT( "Cover Date" ) FROM `<table0>` WHERE "Story Title" = 'DEVASTATION DERBY! ( Part 1 )' | How many cover dates does the story 'Devastation Derby! (part 1)' have?
|
<table0>[table_name_19] { <col0>[tournament]:[VARCHAR] <col1>[partner]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "martín rodríguez" | Which Tournament has a Partner of mart n rodr guez?
|
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Comments] { <col0>[number]:[PostId] <col1>[nu... | SELECT value AS tag, COUNT( * ) AS nr`<table15>`, AVG( Score ) AS avgScore FROM ( SELECT Tags, Score, value FROM `<table15>` JOIN LATERAL STRING_SPLIT( REPLACE( REPLACE( REPLACE( Tags, '><', ',' ), '<', '' ), '>', '' ), ',' ) ) AS t1 GROUP BY value HAVING COUNT( * ) > 4 ORDER BY AVG( Score ) DESC | select * from Posts order by Score;.
|
<table0>[writes] { <col0>[aid]:[int] <col1>[pid]:[int] } <table1>[publication_keyword] { <col0>[kid]:[int] <col1>[pid]:[int] } <table2>[keyword] { } <table3>[domain_author] { <col0>[aid]:[int] } <table4>[domain_publication] { <col0>[int]:[pid] } <table5>[publication] { <col0>[abstract]:[varchar] <col1>[cid]:[int] ... | SELECT keyword.keyword FROM keyword, publication, publication_keyword WHERE publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND publication.title = 'Making database systems usable' | return me the keywords of ' Making database systems usable ' .
|
<table0>[companies] { <col0>[company_id]:[INT] <col1>[country]:[VARCHAR] <col2>[esg_score]:[FLOAT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'United States'; | What is the average ESG score for companies based in the United States? |
<table0>[table_name_61] { <col0>[result]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "february 18, 2003" | What was the result on February 18, 2003? |
<table0>[table_28848697_4] { <col0>[year]:[VARCHAR] <col1>[tied]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 11 | What is the year listed when tied is listed as 11?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table3>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of salary over the hire_date bin hire_date by time. |
<table0>[member_of_club] { <col0>[stuid]:[number] <col1>[clubid]:[number] <col2>[position]:[text] } <table1>[club] { <col0>[clubid]:[number] <col1>[clubname]:[text] <col2>[clubdesc]:[text] <col3>[clublocation]:[text] } <table2>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[n... | SELECT COUNT( DISTINCT t1.`<table1>`name ) FROM `<table1>` AS t1 JOIN member_of_`<table1>` AS t2 ON t1.`<table1>`id = t2.`<table1>`id JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Eric" AND t3.lname = "Tai" | Count the number of clubs for which the student named 'Eric Tai' is a member. |
<table0>[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>[Oppose_rate]:[real] <col7>[Unsure_rate]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Bi... | SELECT Sex, SUM( Height ) FROM `<table1>` GROUP BY `<col1>` ORDER BY SUM( Height ) DESC | Give me the comparison about the sum of Height over the Sex , and group by attribute Sex by a bar chart, show sum height in descending order. |
<table0>[Restaurants] { <col0>[RestaurantID]:[int] <col1>[RestaurantName]:[varchar] <col2>[255]:[Region] <col3>[varchar]:[255] } <table1>[Inspections] { <col0>[InspectionID]:[int] <col1>[RestaurantID]:[int] <col2>[InspectionGrade]:[varchar] <col3>[InspectionDate]:[date] } | SELECT R.RestaurantName, I.InspectionGrade, I.InspectionDate FROM `<table0>` R INNER JOIN Inspections I ON R.RestaurantID = I.RestaurantID WHERE R.Region = 'Uptown' AND I.InspectionGrade = 'Pass'; | List all food safety inspections with a passing grade for restaurants located in 'Uptown' and the corresponding restaurant. |
<table0>[table_name_75] { <col0>[total]:[INTEGER] <col1>[bronze]:[VARCHAR] <col2>[silver]:[VARCHAR] <col3>[gold]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 0 AND `<col3>` = 9 AND `<col1>` < 9 | With a silver greater than 0, gold of 9 and a bronze less than 9, what is the lowest total listed? |
<table0>[GameDesign] { <col0>[GameID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[GameName]:[VARCHAR] <col3>[Genre]:[VARCHAR] <col4>[Platform]:[VARCHAR] } | SELECT * FROM `<table0>` WHERE `<col4>` = 'PC'; | Select all games from a specific platform |
<table0>[club] { <col0>[Club_ID]:[int] <col1>[name]:[text] <col2>[Region]:[text] <col3>[Start_year]:[text] } <table1>[player] { <col0>[Player_ID]:[int] <col1>[name]:[text] <col2>[Position]:[text] <col3>[Club_ID]:[int] <col4>[Apps]:[real] <col5>[Tries]:[real] <col6>[Goals]:[text] <col7>[Points]:[real] } <table2>[compe... | SELECT Position, COUNT( `<col2>` ) FROM `<table1>` GROUP BY `<col2>` HAVING AVG( `<col7>` ) >= 20 ORDER BY COUNT( `<col2>` ) | Bar chart x axis position y axis how many position, display from low to high by the the number of position.
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab... | SELECT `<table4>`.long_title FROM `<table4>` WHERE `<table4>`.icd9_code = "331" | what is procedure long title of procedure icd9 code 331?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Chronic sinusitis NOS" AND prescriptions.route = "INHALATION" | give me the number of patients whose diagnoses short title is chronic sinusitis nos and drug route is inhalation? |
<table0>[table_train_30] { <col0>[int]:[serum_potassium] <col1>[float]:[hyperkalemia] <col2>[bool]:[renal_disease] <col3>[bool]:[cardiopulmonary_resuscitation] <col4>[bool]:[receiving_vasopressor] <col5>[bool]:[age] <col6>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE receiving_vasopressor = 1 | requirement of high dose vasopressors ( defined as a cumulative vasopressor index = 4 ) to treat shock
|
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[flight] { <col0>[aircraft_code_sequence]:[text] <c... | SELECT DISTINCT flight.flight_id FROM `<table24>` AS AIRPORT_SERVICE_0, `<table24>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND date_day.day_number = 27 AND date_day.month_number = 8 AND date_day... | list flights from SAN JOSE to HOUSTON next sunday |
<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, T1.Manufacturer FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer DESC | For those records from the products and each product's manufacturer, give me the comparison about the sum of manufacturer over the name , and group by attribute name by a bar chart, show in descending by the Y-axis.
|
<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 WHERE `<table1>`.gender = "F" AND diagnoses.short_title = "Depress psychosis-unspec" | how many female patients are diagnosed with short title depress psychosis-unspec?
|
<table0>[museums] { <col0>[INT]:[name] <col1>[TEXT]:[city] } <table1>[museum_visitors] { <col0>[INT]:[visitor_id] <col1>[INT]:[museum_id] <col2>[INT]:[country] } <table2>[visitors] { <col0>[INT]:[name] } | SELECT m.name, COUNT( mv.visitor_id ) as num_visitors FROM `<table0>` m JOIN museum_visitors mv ON m.id = mv.museum_id JOIN visitors v ON mv.visitor_id = v.id WHERE v.country != 'USA' AND mv.visit_date >= DATEADD( month, -6, GETDATE( ) ) GROUP BY m.name ORDER BY num_visitors DESC LIMIT 1; | Which museum has the most international visitors in the last 6 months? |
<table0>[employment] { <col0>[Company_ID]:[int] <col1>[People_ID]:[int] <col2>[Year_working]:[int] } <table1>[company] { <col0>[Company_ID]:[real] <col1>[text]:[Headquarters] <col2>[text]:[Industry] <col3>[text]:[Sales_in_Billion] <col4>[real]:[Profits_in_Billion] <col5>[real]:[Assets_in_Billion] <col6>[real]:[Market_... | SELECT Headquarters, COUNT( Headquarters ) FROM `<table1>` GROUP BY Headquarters ORDER BY Headquarters | Show the number of headquarters from each headquarters, and I want to rank by the X in asc.
|
<table0>[procedures] { <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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.age < "68" AND lab.fluid = "Pleural" | how many patients below 68 years of age had pleural fluid lab test? |
<table0>[ChemicalProducts] { <col0>[ProductID]:[INT] <col1>[Chemical]:[TEXT] <col2>[ManufacturerID]:[INT] <col3>[ProductLaunchDate]:[DATE] <col4>[EnvironmentalImpactScore]:[DECIMAL] } | SELECT AVG( CP.EnvironmentalImpactScore ) AS AverageScore FROM `<table0>` CP WHERE QUARTER( CP.ProductLaunchDate ) IN ( 1, 2 ) AND YEAR( CP.ProductLaunchDate ) = 2020; | What is the average environmental impact score for chemical products launched in Q1 and Q2 of 2020? |
<table0>[table_name_62] { <col0>[tie_no]:[VARCHAR] <col1>[away_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "watford" | What was the tie no when Watford was the away team? |
<table0>[table_name_99] { <col0>[money]:[INTEGER] <col1>[country]:[VARCHAR] } | SELECT MAX( money___ ) AS $__ FROM `<table0>` WHERE `<col1>` = "scotland united states" | What is the highest amount of money a play from Scotland United States has? |
<table0>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11... | SELECT SCHOOL_CODE, COUNT( DISTINCT `<col4>` ) FROM `<table6>` ORDER BY `<col2>` DESC | A bar chart about how many different locations does each school have?, and list by the x axis in descending. |
<table0>[company] { <col0>[INT]:[name] <col1>[TEXT]:[founding_year] <col2>[INT]:[INSERT] } | SELECT founding_year, COUNT( * ) as count FROM `<table0>` GROUP BY founding_year; | What is the distribution of startups by founding year? |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5... | SELECT SUM( CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME( '%j', patient.hospitaldischargetime ) - STRFTIME( '%j', t2.`<table7>`time ) > 2 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t1.uniquepid, t1.`<table7>`time FROM ( SELECT patient.uniquepid, `<table7>`.`<table7>`time FROM... | calculate the two year survival rate of those who were diagnosed with valve replacement < 7days - mitral.
|
<table0>[clients] { <col0>[client_id]:[INT] <col1>[name]:[VARCHAR] <col2>[region]:[VARCHAR] <col3>[account_balance]:[DECIMAL] } | SELECT MAX( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'East'; | What is the maximum account balance for clients in the East region? |
<table0>[Artifacts] { <col0>[ArtifactID]:[int] <col1>[ArtifactName]:[text] <col2>[Date]:[DATE] <col3>[Era]:[text] } | SELECT MIN( `<col2>` ) FROM `<table0>` WHERE `<col3>` = 'Harappan Civilization'; | What is the earliest date of an excavated artifact from the Harappan civilization? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] {... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.expire_flag = "1" AND diagnoses.short_title = "Pseudomonas infect NOS" | what is the number of dead patients who were diagnosed with unspecified pseudomonas infection? |
<table0>[Equipment_Maintenance] { <col0>[Equipment_ID]:[INT] <col1>[Equipment_Type]:[VARCHAR] <col2>[Maintenance_Date]:[DATE] <col3>[Maintenance_Cost]:[FLOAT] <col4>[Maintenance_Company]:[VARCHAR] <col5>[CREATE]:[VIEW] } | SELECT Equipment_Type, AVG( `<col3>` ) as Average_Maintenance_Cost FROM `<table0>` WHERE `<col1>` IN ( SELECT `<col1>` FROM Most_Expensive_`<table0>` WHERE ROWNUM <= 5 ) GROUP BY Equipment_Type; | What is the average maintenance cost for the top five equipment types with the most maintenance costs? |
<table0>[table_name_62] { <col0>[position]:[VARCHAR] <col1>[round]:[VARCHAR] <col2>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "t" AND `<col2>` = "minneapolis lakers" | What was the position of the team Minneapolis Lakers during round T? |
<table0>[train] { <col0>[Train_ID]:[int] <col1>[text]:[Time] <col2>[text]:[Service] } <table1>[station] { <col0>[Station_ID]:[int] <col1>[text]:[Annual_entry_exit] <col2>[real]:[Annual_interchanges] <col3>[real]:[Total_Passengers] <col4>[real]:[Location] <col5>[text]:[Main_Services] <col6>[text]:[Number_of_Platforms] ... | SELECT Name, Total_Passengers FROM `<table1>` WHERE Location <> 'London' | Show the names and total passengers for all train stations not in London with a bar chart.
|
<table0>[table_17546] { <col0>[series]:[real] <col1>[Title]:[text] <col2>[Directed]:[text] <col3>[Written]:[text] <col4>[Original]:[air] <col5>[date]:[text] <col6>[Production]:[code] } | SELECT "Original air date" FROM `<table0>` WHERE "Title" = 'A Pig in a Poke' | What is the original air date for the episode 'a pig in a poke'? |
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table7>`.`<table7>`time ) ) FROM `<table7>` WHERE `<table7>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0... | how many days have elapsed since patient 006-2586's first cl flush: coated catheter, pressure/power inj ij r intake on the current intensive care unit visit?
|
<table0>[table_26638600_3] { <col0>[circuit]:[VARCHAR] <col1>[lites_1_race_one_winning_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "#66 Gunnar Racing" | On which circuit was the lites 1 race one winning team #66 Gunnar Racing? |
<table0>[table_34892] { <col0>[Rank]:[real] <col1>[text]:[Nationality] <col2>[text]:[1st] <col3>[real]:[2nd] <col4>[real]:[Points] <col5>[real]:[Overall] <col6>[points]:[Rank] } | SELECT "Name" FROM `<table0>` WHERE "1st ( m )" = '119.5' | Who is the person that has 119.5 m? |
<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>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_requ... | SELECT DISTINCT fare.fare_id FROM `<table18>` AS AIRPORT_SERVICE_0, `<table18>` 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 = 'LAS VEGAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_nam... | show me round trip fares from LAS VEGAS to HOUSTON nonstop |
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[m... | SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MEMPHIS' AND date_day.day_number = 25 AND date_day.month_number = 6 AND date_day.y... | find flight from HOUSTON to MEMPHIS on friday
|
<table0>[table_203_238] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT COUNT( "competition" ) FROM `<table0>` | number of competitions |
<table0>[table_23667534_1] { <col0>[album_s]:[VARCHAR] <col1>[song_s__title]:[VARCHAR] } | SELECT album_s_ FROM `<table0>` WHERE `<col1>` = "My Chariot" | What album was the song My Chariot on?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.marital_status = "WIDOWED" AND procedures.icd9_code = "8968" | give me the number of patients whose marital status is widowed and procedure icd9 code is 8968? |
<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>`.gender = "M" AND prescriptions.drug = "Ciprofloxacin" | what number of patients given the drug ciprofloxacin were male?
|
<table0>[bookings] { <col0>[booking_id]:[INT] <col1>[booking_date]:[DATE] <col2>[region]:[VARCHAR] <col3>[255]:[revenue] <col4>[DECIMAL]:[INSERT] } | SELECT SUM( revenue ) FROM `<table0>` WHERE `<col2>` = 'APAC' AND `<col1>` >= '2022-01-01' AND `<col1>` < '2022-04-01'; | What is the total revenue generated by hotel bookings in the APAC region in Q1 2022? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.admityear < "2187" AND procedures.long_title = "Arterial catheterization" | How many patients admitted before the year 2187 had arterial catheterization as the procedure long title.
|
<table0>[table_22489] { <col0>[Township]:[text] <col1>[County]:[text] <col2>[Pop]:[2010] <col3>[real]:[Land] <col4>[sqmi]:[text] <col5>[Water]:[sqmi] <col6>[text]:[Latitude] <col7>[text]:[Longitude] <col8>[text]:[GEO] <col9>[real]:[ANSI] <col10>[code]:[real] } | SELECT "Latitude" FROM `<table0>` WHERE "GEO ID" = '3810536900' | Name the latitude for 3810536900
|
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <tab... | SELECT JOB_ID, SUM( `<col7>` ) FROM `<table3>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' GROUP BY `<col6>` ORDER BY `<col6>` DESC | For all employees who have the letters D or S in their first name, find job_id and the sum of salary , and group by attribute job_id, and visualize them by a bar chart, and display by the JOB_ID in desc.
|
<table0>[funds] { <col0>[company_id]:[INT] <col1>[funding_amount]:[DECIMAL] <col2>[funding_date]:[DATE] } | SELECT company_name FROM companies LEFT JOIN funds ON companies.company_id = funds.company_id WHERE funds.funding_amount IS NULL; | Display the names of companies that have not received any funding |
<table0>[table_name_18] { <col0>[name]:[VARCHAR] <col1>[last_performance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3 july 2011" | who had a last performance of 3 july 2011? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table2>[l... | SELECT `<table3>`.`<table3>`time FROM `<table3>` WHERE `<table3>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '016-25367' ) ) AND `<table3>`... | when was patient 016-25367 last diagnosed with alcohol withdrawal? |
<table0>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_series]:[int] <col2>[Number_in_season]:[int] <col3>[Title]:[text] <col4>[Directed_by]:[text] <col5>[Original_air_date]:[text] <col6>[Production_code]:[text] } <table1>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]... | SELECT Name, Capacity FROM `<table1>` | Show the capacity for each cinema in a bar chart. |
<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, COUNT( * ) FROM `<table0>` WHERE Weight > 85 GROUP BY `<col1>` ORDER BY `<col1>` DESC | Count the number of people of each sex who have a weight higher than 85 by a bar chart, show from high to low by the bar. |
<table0>[table_28068063_3] { <col0>[proceed_to_quarter_final]:[VARCHAR] <col1>[eliminated_from_competition]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "London Irish" | Who proceeded to the quarter final when the london irish were eliminated from competition?
|
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.admission_type = "EMERGENCY" AND lab.label = "LD, Body Fluid" | Calculate the number of patients admitted to emergency who had an ld body fluid test by lab |
<table0>[table_name_52] { <col0>[avg_g]:[INTEGER] <col1>[name]:[VARCHAR] <col2>[gain]:[VARCHAR] <col3>[long]:[VARCHAR] <col4>[loss]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col3>` > 8 AND `<col4>` < 34 AND `<col2>` > 16 AND `<col1>` = "bullock, chris" | Which Avg/G is the lowest one that has a Long larger than 8, and a Loss smaller than 34, and a Gain larger than 16, and a Name of bullock, chris? |
<table0>[table_name_51] { <col0>[points]:[INTEGER] <col1>[touchdowns]:[INTEGER] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1 | Which Points is the lowest one that has Touchdowns smaller than 1? |
<table0>[table_name_99] { <col0>[japanese]:[VARCHAR] <col1>[prefecture]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "iwate" | WHich Japanese has a Prefecture of iwate? |
<table0>[restaurant_revenue] { <col0>[restaurant_id]:[INT] <col1>[revenue_date]:[DATE] <col2>[total_revenue]:[DECIMAL] } | INSERT INTO restaurant_revenue ( restaurant_id, revenue_date, total_revenue ) VALUES ( 101, '2022-08-01', 5000 ); | Insert a new record into the restaurant_revenue table with the following data: restaurant_id = 101, revenue_date = '2022-08-01', total_revenue = 5000 |
<table0>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[area] { <col0>... | SELECT ( SELECT SUM( CASE WHEN DERIVED_TABLEalias0.FRIDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.MONDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.SATURDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED_TABLEalias0.SUNDAY = 'Y' THEN 1 ELSE 0 END ) + SUM( CASE WHEN DERIVED... | What 's the total number of weekly lectures for MACROMOL 412 ?
|
<table0>[union_safety] { <col0>[union_id]:[INT] <col1>[union_name]:[TEXT] <col2>[safety_focus]:[BOOLEAN] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = true; | Calculate the total number of members in unions that have a focus on worker safety. |
<table0>[table_name_96] { <col0>[area__km_2]:[VARCHAR] <col1>[population]:[VARCHAR] <col2>[place]:[VARCHAR] } | SELECT COUNT( area__km_2__ ) FROM `<table0>` WHERE `<col1>` < 409 AND `<col2>` = "cannonvale" | What is the total number of area listed for cannonvale with a population less than 409? |
<table0>[table_name_91] { <col0>[station]:[VARCHAR] <col1>[japanese]:[VARCHAR] <col2>[rapid]:[VARCHAR] <col3>[distance__km]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "↑" AND distance__km_ > 3.4 AND `<col1>` = "下鴨生" | What station has a Rapid of ↑, is 3.4 km away, and has a Japanese title of 下鴨生? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.