schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_...
SELECT EMAIL, `<col10>` FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table2>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col3>`
For those employees who do not work in departments with managers that have ids between 100 and 200, find email and department_id , and visualize them by a bar chart, could you rank by the names in ascending?
<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 ( SELECT `<table9>`.`<table9>`result FROM `<table9>` WHERE `<table9>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '002-38474' ) ) AND...
does the value of chloride of patient 002-38474 measured at 2104-03-12 09:05:00 be greater than measured at 2104-03-11 09:30:00?
<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 `<table19>`_code FROM `<table19>` WHERE `<table19>`_code = 'HP'
what is HP
<table0>[table_203_758] { <col0>[number]:[number] <col1>[dub]:[number] <col2>[english]:[dubbed] <col3>[title]:[english] <col4>[subbed]:[title] <col5>[noriginal]:[japanese] <col6>[title]:[text] <col7>[original]:[air] <col8>[date]:[text] <col9>[english]:[air] <col10>[date]:[text] }
SELECT "english dubbed `<col3>` / `<col2>` `<col4>` title\noriginal japanese title" FROM `<table0>` WHERE "english air date" = 10 AND "english air date" = 1995 ORDER BY "english air date" LIMIT 1
what is the english dubbed title of the first episode to air in english in october of 1995 ?
<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>[PostFeedback] { <col0>[number...
SELECT * FROM `<table5>` WHERE UserId = @UserId
How close am I to the Proofreader badge?. Proofreader requires 100 approvals+rejections, so your distance away is (100 - approvals - rejections).
<table0>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <col4>[TEXT]:[TEXT] <col5>[Year]:[INTEGER] <col6>[Price]:[INTEGER] <col7>[Score]:[INTEGER] <col8>[Cases]:[INTEGER] <col9>[Drink]:[TEXT] } <table1>[grapes] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Color] } <tab...
SELECT Winery, COUNT( Winery ) FROM `<table0>` WHERE `<col6>` > 100 GROUP BY Winery ORDER BY Winery DESC
Compare the number of winery of the wines whose price is bigger than 100, and show by the x-axis from high to low.
<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 `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.admission_type = "ELECTIVE" AND `<table3>`.dod_year <= "2180.0"
How many of the patients on elective admission died in or before 2180?
<table0>[table_204_74] { <col0>[number]:[number] <col1>[title]:[text] <col2>[producers]:[text] <col3>[guest]:[performers] <col4>[text]:[length] }
SELECT "length" FROM `<table0>` WHERE "#" = 11
how long is track number 11 ?
<table0>[table_71737] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] }
SELECT "8:30" FROM `<table0>` WHERE "7:00" = 'occupation double'
What is on at 8:30 when occupation double is on at 7:00 at that channel?
<table0>[table_39128] { <col0>[Position]:[real] <col1>[Channel]:[text] <col2>[Owner]:[text] <col3>[Share]:[real] <col4>[Rating]:[real] }
SELECT SUM( "Rating ( % )" ) FROM `<table0>` WHERE "Owner" = 'cctv' AND "Position" > '7'
Name the sum of rating % for cctv and position more than 7
<table0>[Staff] { <col0>[Staff_ID]:[INTEGER] <col1>[Staff_Details]:[VARCHAR] } <table1>[Claims_Processing_Stages] { <col0>[Claim_Stage_ID]:[INTEGER] <col1>[Next_Claim_Stage_ID]:[INTEGER] <col2>[Claim_Status_Name]:[VARCHAR] <col3>[255]:[Claim_Status_Description] <col4>[VARCHAR]:[255] } <table2>[Policies] { <col0>[Poli...
SELECT Policy_Type_Code, COUNT( * ) FROM `<table2>` GROUP BY `<col2>` ORDER BY COUNT( * ) DESC
Find the number of records of each policy type and its type code Visualize by bar chart, I want to order from high to low by the y axis.
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text]...
SELECT SUM( `<table1>`.dose_val_rx ) FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 7698 ) AND `<table1>`.drug = 'atorvastatin' AND DATETIME( `<table1>`.startdate, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-1 month' )
how much atorvastatin is prescribed to patient 7698 a month before?
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate...
SELECT v.* FROM `<table24>` AS u INNER JOIN Votes AS v ON u.Id = v.UserId WHERE u.Id = '##UserId:int##' AND v.VoteTypeId IN ( 6, 7, 10, 11 ) ORDER BY v.VoteTypeId
Who Votes to Close, Reopen, Delete, Undelete the Most?.
<table0>[Restaurants] { <col0>[INT]:[name] <col1>[VARCHAR]:[city] } <table1>[Menu] { <col0>[INT]:[restaurant_id] <col1>[INT]:[dish] <col2>[VARCHAR]:[category] <col3>[VARCHAR]:[price] <col4>[DECIMAL]:[INSERT] <col5>[Restaurants]:[name] <col6>[city]:[VALUES] <col7>[VeggieHeaven]:[London] }
SELECT MIN( price ) FROM `<table1>` JOIN `<col5>` ON `<table1>`.restaurant_id = Restaurants.id WHERE Restaurants.city = 'London' AND category = 'Vegetarian';
What is the minimum price of vegetarian dishes in London?
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[Users] { <col0>[num...
SELECT DATETIMEFROMPARTS( TIME_TO_STR( CreationDate, '%Y' ), TIME_TO_STR( CreationDate, '%m' ), 1, 0, 0, 0, 0 ) AS date, COUNT( * ) AS count FROM `<table16>` WHERE PostTypeId = 2 GROUP BY TIME_TO_STR( CreationDate, '%Y' ), TIME_TO_STR( CreationDate, '%m' ) ORDER BY TIME_TO_STR( CreationDate, '%Y' ), TIME_TO_STR( Creati...
Total number of answers by month.
<table0>[countries] { <col0>[name]:[PRIMARY] <col1>[KEY]:[region] } <table1>[malaria_cases] { <col0>[country]:[VARCHAR] <col1>[year]:[INT] <col2>[cases]:[INT] <col3>[INSERT]:[countries] <col4>[name]:[region] <col5>[VALUES]:[Nigeria] <col6>[Africa]:[DRC] <col7>[Africa]:[Tanzania] <col8>[Africa]:[Mozambique] <col9>[Afri...
SELECT SUM( m.cases ) FROM `<table1>` m JOIN countries c ON m.country = c.name WHERE c.region = 'Africa' AND m.year = 2021;
How many cases of malaria were reported in African countries last year?
<table0>[CREATE] { <col0>[VIEW]:[luxury_hotels] <col1>[SELECT]:[hotels] <col2>[type]:[Luxury] }
SELECT l.name, LAG( v.views ) OVER ( PARTITION BY l.id ORDER BY v.month ) as previous_month_views, v.views as current_month_views FROM luxury_hotels l JOIN virtual_tour_stats v ON l.id = v.hotel_id ORDER BY v.month;
What is the change in virtual tour engagement per month for hotels in the 'luxury_hotels' view?
<table0>[table_name_84] { <col0>[record]:[VARCHAR] <col1>[loss]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "hargan ( 14–13 )"
What is the record for the game when the loss was hargan (14 13)?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[ward...
SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table3>`.charttime FROM `<table3>` JOIN admissions ON `<table3>`.hadm_id = admissions.hadm_id WHERE `<table3>`.icd9_code = ( SELECT `<table0>`.icd9_code FROM `<table0>` WHERE `<table0>`.short_title = 'adv eff anticoagulants' ) AND STRFTIME( '...
how many patients until 2104 were prescribed nitroglycerin within 2 months after diagnosis of adv eff anticoagulants?
<table0>[table_name_38] { <col0>[record]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "march 21"
What is the record of the game on March 21?
<table0>[drought_data] { <col0>[region]:[TEXT] <col1>[year]:[INT] <col2>[incidents]:[INT] }
SELECT region, SUM( `<col2>` ) as total_incidents FROM `<table0>` WHERE `<col1>` = 2019 GROUP BY region;
How many drought incidents occurred in each region in 2019?
<table0>[table_name_37] { }
SELECT 2003 FROM `<table0>` WHERE 2005 = "did not qualify"
what is 2003 when 2005 is did not qualify?
<table0>[table_201_25] { <col0>[number]:[party] <col1>[text]:[leader] <col2>[text]:[text] }
SELECT "party" FROM `<table0>` GROUP BY "party" ORDER BY COUNT( "leader" ) DESC LIMIT 1
which party has had the most leaders ?
<table0>[table_name_80] { <col0>[time_retired]:[VARCHAR] <col1>[driver]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ludovico scarfiotti"
What is the Time/Retired value for Ludovico Scarfiotti?
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperatu...
SELECT t1.drugname FROM ( SELECT `<table2>`.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.age BETWEEN 50 AND 59 ) GROUP BY `<table2>`.drugname ) AS t1 WHERE t1.c1 <= 5
show me the top five drugs most commonly prescribed to patients with the age 50s?
<table0>[Albums] { <col0>[AlbumID]:[int] <col1>[Title]:[varchar] <col2>[100]:[ReleaseDate] <col3>[date]:[ArtistID] <col4>[int]:[Genre] <col5>[varchar]:[INSERT] }
DELETE FROM `<table0>` WHERE `<col0>` = 10;
Delete the album with AlbumID 10 from the Albums table.
<table0>[affected_region] { <col0>[Region_id]:[int] <col1>[Storm_ID]:[int] <col2>[Number_city_affected]:[real] } <table1>[region] { <col0>[Region_id]:[int] <col1>[Region_code]:[text] <col2>[Region_name]:[text] } <table2>[storm] { <col0>[Storm_ID]:[int] <col1>[text]:[Dates_active] <col2>[text]:[Max_speed] <col3>[int]:...
SELECT Name, COUNT( * ) FROM `<table2>` AS T1 JOIN affected_region AS T2 ON T1.Storm_ID = T2.Storm_ID GROUP BY T1.Storm_ID ORDER BY Name DESC
List the name for storms and the number of affected regions for each storm with a bar chart, and could you sort bar in descending order?
<table0>[carbon_pricing] { <col0>[country]:[text] <col1>[policy]:[text] <col2>[price]:[decimal] <col3>[year]:[integer] }
SELECT policy, SUM( `<col2>` ) as total_price FROM `<table0>` WHERE `<col3>` = 2020 AND `<col0>` IN ( 'North America', 'Europe', 'Asia' ) GROUP BY `<col1>` ORDER BY total_price DESC LIMIT 5;
List the top 5 carbon pricing policies by total carbon price in North America, Europe, and Asia, for the year 2020.
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[admissions] { <col0>[row_id]:[number] <co...
SELECT `<table7>`.label FROM `<table7>` WHERE `<table7>`.itemid IN ( SELECT t1.itemid FROM ( SELECT `<table9>`.itemid, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table9>` WHERE STRFTIME( '%y', `<table9>`.charttime ) = '2104' GROUP BY `<table9>`.itemid ) AS t1 WHERE t1.c1 <= 5 )
what were the five most frequently performed laboratory tests in 2104?
<table0>[table_201_28] { <col0>[number]:[name] <col1>[text]:[year] <col2>[number]:[credited] <col3>[text]:[publisher] }
SELECT COUNT( "name" ) FROM `<table0>` WHERE "credited with" = 'creative director'
how many games were credited with a creative director ?
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <co...
SELECT DISTINCT flight.flight_id FROM `<table14>` AS AIRPORT_SERVICE_0, `<table14>` 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 = 'PITTSBURGH' AND date_day.day_number = 8 AND date_day.month_number = 7 AND date_d...
what are the flights between DALLAS and PITTSBURGH on 7 8
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[va...
SELECT COUNT( * ) FROM `<table14>` WHERE `<table14>`.drug = 'ethambutol hcl' AND DATETIME( `<table14>`.startdate ) <= DATETIME( CURRENT_TIME( ), '-1 year' )
what are the number of times ethambutol hcl is ordered until 1 year ago?
<table0>[table_name_93] { <col0>[date]:[VARCHAR] <col1>[length_of_game]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "75:43"
What was the date of the game that lasted 75:43?
<table0>[Countries] { <col0>[CountryID]:[INT] <col1>[CountryName]:[TEXT] } <table1>[PeacekeepingMissions] { <col0>[MissionID]:[INT] <col1>[MissionName]:[TEXT] <col2>[CountryID]:[INT] <col3>[StartDate]:[DATE] <col4>[EndDate]:[DATE] }
SELECT CountryName, COUNT( `<col0>` ) as NumMissions, AVG( DATEDIFF( EndDate, `<col3>` ) ) as AvgMissionDuration FROM `<table1>` JOIN Countries ON `<table1>`.CountryID = Countries.CountryID GROUP BY CountryName HAVING NumMissions > 5 ORDER BY AvgMissionDuration DESC;
What is the total number of peacekeeping missions led by each country, and the average duration of these missions, for countries that have led more than 5 missions, ordered by the average mission duration in descending order?
<table0>[table_name_1] { <col0>[losses]:[INTEGER] <col1>[wins]:[VARCHAR] <col2>[runs_allowed]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 0 AND `<col2>` > 72
How many losses did the team with 0 wins and more than 72 runs allowed have?
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[area] { <col0>[course_id]:[int] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table4>[prog...
SELECT COUNT( * ) > 0 FROM ( SELECT `<col1>` FROM `<table9>` WHERE earn_credit = 'Y' AND `<col0>` = 1 ) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, `<col2>` AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN ( ...
Will I be allowed to take CONDUCT 602 in Spring 2007 ?
<table0>[mobile_usage] { <col0>[usage_id]:[INT] <col1>[customer_id]:[INT] <col2>[last_used]:[DATE] }
SELECT `<col1>` FROM `<table0>` WHERE `<col2>` IS NULL OR `<col2>` < DATE_SUB( CURDATE( ), INTERVAL 30 DAY ) GROUP BY customer_id;
Which customers have not used their mobile service in the last 30 days?
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "TP"
provide the number of patients whose drug route is tp?
<table0>[diagnoses] { <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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.admityear < "2176" AND diagnoses.short_title = "Hypopotassemia"
give the number of patients who were admitted before the year 2176 and whose diagnosis short title is hypopotassemia.
<table0>[engineer] { <col0>[INT]:[name] <col1>[VARCHAR]:[project_id] <col2>[INT]:[role] <col3>[VARCHAR]:[INSERT] } <table1>[project] { <col0>[INT]:[name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[start_date] <col3>[DATE]:[end_date] <col4>[DATE]:[category] <col5>[VARCHAR]:[INSERT] }
SELECT e.name FROM `<table0>` e WHERE e.role = 'Lead' AND e.`<table1>`_id IN ( SELECT p.id FROM `<table1>` p WHERE p.category = 'Resilience' );
Who are the lead engineers in projects with 'Resilience' as a category?
<table0>[train] { <col0>[int]:[train_number] <col1>[int]:[name] <col2>[text]:[origin] <col3>[text]:[destination] <col4>[text]:[time] <col5>[text]:[interval] } <table1>[route] { <col0>[train_id]:[int] <col1>[station_id]:[int] } <table2>[station] { <col0>[int]:[network_name] <col1>[text]:[services] <col2>[text]:[local_...
SELECT name, COUNT( name ) FROM `<table0>` GROUP BY name ORDER BY COUNT( name )
Compare all train names' total numbers, and display by the total number from low to high.
<table0>[energy_efficiency] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE country IN ( SELECT country FROM renewable_sources WHERE capacity > 50 );
Find the number of energy efficiency policies in countries with more than 50 GW of total renewable capacity
<table0>[table_name_37] { <col0>[date_of_vacancy]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "aberdeen"
What is Aberdeen team's date of vacancy?
<table0>[table_name_85] { <col0>[owner_operator]:[VARCHAR] <col1>[licence_number]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pl 59"
Who is the owner operator who has license number PL 59?
<table0>[table_test_28] { <col0>[int]:[positive_shock_index] <col1>[bool]:[anemia] <col2>[bool]:[serum_potassium] <col3>[float]:[left_ventricular_ejection_fraction_lvef] <col4>[int]:[systolic_blood_pressure_sbp] <col5>[int]:[malignant_hypertension] <col6>[bool]:[severe_hypertension] <col7>[bool]:[hemoglobin_a1c_hba1c] ...
SELECT * FROM `<table0>` WHERE cardiogenic_shock = 1 OR systolic_blood_pressure_sbp < 90 OR systolic_blood_pressure_sbp < 100
the presence of cardiogenic shock defined as sustained systolic blood pressure less than 90 mm hg, with no response to fluids or systolic blood pressure less than 100 mm hg with vasopressors ( in absence of bradycardia )
<table0>[table_204_698] { <col0>[number]:[name] <col1>[text]:[lifetime] <col2>[text]:[nationality] <col3>[text]:[notable] <col4>[text]:[notes] }
SELECT "nationality" FROM `<table0>` GROUP BY "nationality" ORDER BY COUNT( "name" ) DESC LIMIT 1
which nationality had the larger amount of names listed ?
<table0>[delivery] { <col0>[delivery_id]:[INT] <col1>[delivery_date]:[DATE] <col2>[num_items]:[INT] }
SELECT MAX( d.num_items ) FROM `<table0>` d;
What is the maximum number of items delivered in a single day?
<table0>[table_59277] { <col0>[text]:[text] <col1>[text]:[text] <col2>[noon]:[text] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[text] <col6>[text]:[text] }
SELECT "6:30 pm" FROM `<table0>` WHERE "3:30 pm" = 'beetleborgs metallix'
WHAT IS THE 6:30PM WITH BEETLEBORGS METALLIX AT 3:30PM?
<table0>[Customer_Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[order_status_code]:[VARCHAR] <col3>[shipping_method_code]:[VARCHAR] <col4>[order_placed_datetime]:[DATETIME] <col5>[order_delivered_datetime]:[DATETIME] <col6>[order_shipping_charges]:[VARCHAR] } <table1>[Premises] { <col0>[pre...
SELECT product_category, COUNT( * ) FROM `<table2>` GROUP BY `<col1>` ORDER BY `<col1>`
Show me the total number by product category in a histogram, and I want to sort in asc by the x-axis.
<table0>[table_name_39] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 3"
what was the score on november 3?
<table0>[table_20614109_1] { <col0>[earnings_before_interest_and_taxes__]:[VARCHAR] <col1>[earnings_per_share__]:[VARCHAR] }
SELECT earnings_before_interest_and_taxes__€m_ FROM `<table0>` WHERE earnings_per_share__€_ = "1.78"
Name the ebit for eps being 1.78
<table0>[table_name_60] { <col0>[first_game]:[INTEGER] <col1>[played]:[VARCHAR] <col2>[lost]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 11 AND `<col2>` = 12
When was the earliest first game with 11 played and 12 games lost?
<table0>[ports] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[vessel_movements] { <col0>[INT]:[vessel_id] <col1>[INT]:[departure_port_id] <col2>[INT]:[arrival_port_id] <col3>[INT]:[speed] <col4>[DECIMAL]:[date] <col5>[DATE]:[INSERT] <col6>[ports]:[name] <col7>[VALUES]:[Vancouver] }
SELECT DISTINCT vessel_id FROM `<table1>` WHERE arrival_port_id = ( SELECT id FROM `<col6>` WHERE name = 'Vancouver' ) AND date BETWEEN '2022-08-22' AND '2022-08-30';
Which vessels visited the port of Vancouver in the last week of August?
<table0>[rural_infrastructure] { <col0>[project_id]:[INT] <col1>[project_name]:[VARCHAR] <col2>[255]:[jobs_created] }
select project_name, jobs_created from rural_infrastructure order by jobs_created desc;
List all rural infrastructure projects, along with the number of jobs created, in descending order by the number of jobs created.
<table0>[essays] { <col0>[projectid]:[text] <col1>[teacher_acctid]:[text] <col2>[title]:[text] <col3>[short_description]:[text] <col4>[need_statement]:[text] <col5>[essay]:[text] } <table1>[projects] { <col0>[projectid]:[text] <col1>[teacher_acctid]:[text] <col2>[schoolid]:[text] <col3>[school_ncesid]:[text] <col4>[sc...
SELECT T1.school_latitude, T1.school_longitude FROM `<table1>` AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title = 'Smile for the Camera!!!'
What is the latitude and longitude of the school where the teacher who wrote "Smile for the Camera!!!" teaches?
<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 diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Stevens-Johnson-TEN syn" AND prescriptions.route = "IV BOLUS"
provide the number of patients taking drug via iv bolus route who have been diagnosed with stevens-johnson syndrome-toxic epidermal necrolysis overlap syndrome.
<table0>[table_name_37] { <col0>[avoirdupois_value]:[VARCHAR] <col1>[russian]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "берковец"
What Avoirdupois value has a Russian of берковец?
<table0>[location] { <col0>[location_id]:[INT] <col1>[location_name]:[VARCHAR] <col2>[255]:[INSERT] } <table1>[temperature] { <col0>[year]:[INT] <col1>[location_id]:[INT] <col2>[temp]:[FLOAT] }
SELECT location_id, AVG( `<col2>` ) as avg_temp FROM `<table1>` GROUP BY location_id, YEAR( `<col0>` )
What is the average temperature per year for each location?
<table0>[table_2668329_25] { <col0>[result]:[VARCHAR] <col1>[district]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Virginia 4"
How many people won the election in the district of Virginia 4?
<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>`.age, `<table0>`.gender FROM `<table0>` WHERE `<table0>`.subject_id = "84129"
let me know the age and gender of patient with patient id 84129.
<table0>[table_name_2] { <col0>[nationality]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alexandre jacques"
What is the Nationality for alexandre jacques?
<table0>[employee] { <col0>[eid]:[number] <col1>[name]:[varchar2] <col2>[salary]:[number] } <table1>[certificate] { <col0>[eid]:[number] <col1>[aid]:[number] } <table2>[aircraft] { <col0>[aid]:[number] <col1>[name]:[varchar2] <col2>[distance]:[number] } <table3>[flight] { <col0>[flno]:[number] <col1>[origin]:[varcha...
SELECT name, COUNT( * ) FROM `<table3>` AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY name
Show aircraft names and number of flights for each aircraft with a bar chart, show by the X in ascending.
<table0>[table_name_89] { <col0>[points]:[INTEGER] <col1>[year]:[VARCHAR] <col2>[class]:[VARCHAR] <col3>[rank]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "250cc" AND `<col3>` = "13th" AND `<col1>` > 1955
What is the sum of Points for 250cc class, ranked 13th, later than 1955?
<table0>[scientists] { <col0>[ssn]:[number] <col1>[name]:[text] } <table1>[projects] { <col0>[code]:[text] <col1>[name]:[text] <col2>[hours]:[number] } <table2>[assignedto] { <col0>[scientist]:[number] <col1>[project]:[text] }
SELECT AVG( `<col2>` ) FROM `<table1>`
What is the average hours across all projects?
<table0>[employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[age] <col3>[INT]:[INSERT] }
SELECT AVG( age ) FROM `<table0>` WHERE department = 'Marketing';
What is the average age of employees in the marketing department?
<table0>[table_name_9] { <col0>[venue]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "wightlink raiders"
What is the venue of the match with the wightlink raiders as the opponent?
<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, AVG( Weight ) FROM `<table1>` GROUP BY `<col1>` ORDER BY AVG( Weight )
Give me the comparison about the average of Weight over the Sex , and group by attribute Sex by a bar chart, and show by the Y-axis from low to high.
<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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND prescriptions.drug_type = "MAIN"
count the number of patients whose ethnicity is american indian/alaska native and drug type is main?
<table0>[table_name_22] { <col0>[place]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "australia" AND `<col2>` = "ian baker-finch"
Can you tell me the Place that has the Country of australia, and the Player of ian baker-finch?
<table0>[player_achievements] { <col0>[achievement_id]:[INT] <col1>[achievement_name]:[VARCHAR] }
INSERT INTO player_achievements ( achievement_id, achievement_name ) VALUES ( 1, 'Player of the Month' ), ( 2, 'Rookie of the Year' ), ( 3, 'Top Fragger' );
Insert new records into the player_achievements table with the following data: (1, 'Player of the Month'), (2, 'Rookie of the Year'), (3, 'Top Fragger')
<table0>[table_76299] { <col0>[noun]:[root] <col1>[meaning]:[text] <col2>[case]:[suffix] <col3>[case]:[text] <col4>[postposition]:[text] <col5>[word]:[text] <col6>[English]:[meaning] }
SELECT "full word" FROM `<table0>` WHERE "case suffix ( `<col2>` )" = '-sa ( dative )'
What is the Full Word, when Case Suffix (case) is '-sa (dative)'?
<table0>[animals] { <col0>[INT]:[name] <col1>[VARCHAR]:[status] <col2>[VARCHAR]:[INSERT] }
SELECT status, COUNT( * ) FROM `<table0>` GROUP BY status ORDER BY COUNT( * ) DESC;
Find the number of animals in each status category, ordered by the number of animals in each category in descending order
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] ...
SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY SUM( `<col10>` )
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time, and I want to sort Y in asc order please.
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[n...
SELECT COUNT( UserId ), COUNT( DISTINCT UserId ) FROM `<table12>` WHERE Name = 'Great Answer'
Sort users by great answer badge counts.
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code...
SELECT `<table3>`.charttime FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table6>`.icustay_id FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.subject_id = 1561 ) ) AND `<table3>`.itemid IN ( SELECT `<table14>`.itemid FROM `<table14>` WHERE `<table1...
when was the first time that the arterial bp [diastolic] of patient 1561 was measured or taken since 12/31/2102?
<table0>[AwardsMisc] { <col0>[name]:[text] <col1>[text]:[award] <col2>[text]:[year] <col3>[integer]:[lgID] <col4>[text]:[note] } <table1>[HOF] { <col0>[year]:[integer] <col1>[hofID]:[text] <col2>[name]:[text] <col3>[category]:[text] } <table2>[Teams] { <col0>[year]:[integer] <col1>[lgID]:[text] <col2>[tmID]:[text] <c...
SELECT T1.firstName, T1.lastName FROM `<table5>` AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year >= 2000 AND T2.year <= 2005 GROUP BY T2.playerID HAVING COUNT( DISTINCT T2.tmID ) > 2
Name the goalies who played for more than two teams from Year 2000 to 2005.
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_v...
SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.icustay_id IN ( SELECT `<table14>`.icustay_id FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 10211 ) ) AND `<table4>`.itemid IN ( SELECT `<table8>`.itemid FROM `<table8>` WHERE `<table8>`.labe...
had patient 10211 had any fecal bag output on 04/06/last year?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <...
SELECT STRFTIME( '%j', `<table5>`.unitdischargetime ) - STRFTIME( '%j', `<table5>`.unitadmittime ) FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '011-54801' ) AND NOT `<table5>`.unitadmittime IS NULL ORDER B...
how long is the first stay of patient 011-54801 in the icu?
<table0>[country] { <col0>[country_id]:[integer] <col1>[country_iso_code]:[text] <col2>[country_name]:[text] } <table1>[department] { <col0>[department_id]:[integer] <col1>[department_name]:[text] } <table2>[gender] { <col0>[gender_id]:[integer] } <table3>[genre] { <col0>[genre_id]:[integer] <col1>[genre_name]:[text...
SELECT T3.title FROM `<table12>` AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Paramount Pictures' AND CAST( STRFTIME( '%Y', T3.release_date ) AS INT ) = 2000
Which movies did the company Paramount Pictures produce in 2000?
<table0>[country] { <col0>[Country_id]:[int] <col1>[Country_name]:[text] <col2>[Capital]:[text] <col3>[Official_native_language]:[text] } <table1>[player] { <col0>[Player_ID]:[int] <col1>[Player]:[text] <col2>[Years_Played]:[text] <col3>[Total_WL]:[text] <col4>[Singles_WL]:[text] <col5>[Doubles_WL]:[text] <col6>[Team]...
SELECT Country_name, COUNT( * ) FROM `<table0>` AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
Show the country names and the corresponding number of players in a pie chart.
<table0>[digital_divide] { <col0>[initiative_id]:[INT] <col1>[continent]:[VARCHAR] <col2>[initiatives]:[INT] }
SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col1>` IN ( 'Asia', 'Europe' );
How many digital divide initiatives are there in total for Asia and Europe?
<table0>[people] { <col0>[people_id]:[number] <col1>[name]:[text] <col2>[age]:[number] <col3>[height]:[number] <col4>[hometown]:[text] } <table1>[gymnast] { <col0>[gymnast_id]:[number] <col1>[floor_exercise_points]:[number] <col2>[pommel_horse_points]:[number] <col3>[rings_points]:[number] <col4>[vault_points]:[number...
SELECT `<col1>` FROM `<table0>` ORDER BY `<col2>` DESC LIMIT 5
What are the names of the five oldest people?
<table0>[PersonFriend] { <col0>[name]:[varchar] <col1>[friend]:[varchar] <col2>[year]:[INTEGER] } <table1>[Person] { <col0>[name]:[varchar] <col1>[age]:[INTEGER] <col2>[city]:[TEXT] <col3>[gender]:[TEXT] <col4>[job]:[TEXT] }
SELECT job, AVG( `<col1>` ) FROM `<table1>` GROUP BY `<col4>`
What is average age for different job title. Visualize by bar chart.
<table0>[users] { <col0>[INT]:[country] <col1>[VARCHAR]:[data_sharing] <col2>[BOOLEAN]:[INSERT] }
SELECT country, SUM( CASE WHEN data_sharing = false THEN 1 ELSE 0 END ) as num_`<table0>` FROM `<table0>` WHERE country IN ( 'DE', 'ES' ) GROUP BY country;
How many users have opted out of data sharing in Germany and Spain?
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.religion = "GREEK ORTHODOX" AND lab.itemid = "51419"
give me the number of patients whose religion is greek orthodox and item id is 51419?
<table0>[table_32428] { <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 "Home team" FROM `<table0>` WHERE "Away `<col2>` score" = '11.14 ( 80 )'
Who is the home side when the away side score is 11.14 (80)?
<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>`.admission_location = "TRSF WITHIN THIS FACILITY" AND `<table2>`.dob_year < "2087"
How many of the patients admitted to trsf within this facility were born before the year 2087?
<table0>[table_22395] { <col0>[Episode]:[text] <col1>[Garfield]:[Episode] <col2>[text]:[Acres] <col3>[Episode]:[text] <col4>[Garfield]:[Episode] <col5>[text]:[Original] <col6>[Airdate]:[text] }
SELECT "Garfield `<col0>` 2" FROM `<table0>` WHERE "U.S. Acres Episode" = 'The Bunny Rabbits is Coming!'
what is the 2nd garfield episode where u.s. acres episode is the bunny rabbits is coming!
<table0>[Tours] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[type] <col3>[TEXT]:[revenue] <col4>[INT]:[INSERT] }
SELECT SUM( revenue ) FROM `<table0>` WHERE EXTRACT( CONTINENT FROM country ) = 'South America' AND type = 'Eco';
What is the total revenue generated by eco-friendly tours in South America?
<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>`.dob_year < "2112" AND procedures.short_title = "Oth periton adhesiolysis"
tell me the number of patients born before 2112 who had other lysis of peritoneal adhesions procedure.
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[...
SELECT T1.FirstName, T1.LastName FROM `<table4>` AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.MaritalStatus = 'M' AND T2.VacationHours < 20
List the name of married employees with less than 20 vacation hours.
<table0>[table_78162] { <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 COUNT( "Game" ) FROM `<table0>` WHERE "High rebounds" = 'radoslav nesterović ( 8 )' AND "High assists" = 'josé calderón ( 9 )'
What numbered game featured a High rebounds of radoslav nesterovi (8), and a High assists of jos calder n (9)?
<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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.admission_type = "NEWBORN" AND prescriptions.route = "REPLACE"
what is the number of patients whose admission type is newborn and drug route is replace?
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table3>[Revi...
SELECT q.CloseQuestion, q.QuestionTotal, ROUND( ( ( q.CloseQuestion * 100 ) / q.QuestionTotal ), 1 ) AS ClosePercentage FROM ( SELECT SUM( CASE WHEN NOT ClosedDate IS NULL AND PostTypeId = 1 AND CreationDate BETWEEN '##fromdate:string##' AND '##todate:string##' THEN 1 END ) AS CloseQuestion, SUM( CASE WHEN PostTypeId =...
Ratio of Closed Questions to New Questions Between Dates.
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[e...
SELECT `<table3>`.admittime FROM `<table3>` WHERE `<table3>`.subject_id = 53089 AND DATETIME( `<table3>`.admittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) ORDER BY `<table3>`.admittime LIMIT 1
the last year, when did patient 53089 go to the hospital for the first time?
<table0>[table_982] { <col0>[Year]:[real] <col1>[Team]:[text] <col2>[Division]:[text] <col3>[League]:[text] <col4>[Regular]:[Season] <col5>[text]:[Playoffs] <col6>[text]:[Open] <col7>[Cup]:[text] }
SELECT COUNT( "Division" ) FROM `<table0>` WHERE "Playoffs" = 'Conference Quarterfinals'
How many divisions have been won when the playoff result is conference quarterfinals.
<table0>[table_14286908_1] { <col0>[school]:[VARCHAR] <col1>[year_of_last_win]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1985-86"
What is the name of the school where the year of last win is 1985-86?
<table0>[vehicles] { <col0>[vehicle_id]:[INT] <col1>[vehicle_type]:[VARCHAR] <col2>[registration_date]:[TIMESTAMP] <col3>[city]:[VARCHAR] }
SELECT 100.0 * COUNT( CASE WHEN `<col1>` = 'electric' THEN 1 END ) / COUNT( * ) AS electric_market_share, 100.0 * COUNT( CASE WHEN `<col1>` = 'hybrid' THEN 1 END ) / COUNT( * ) AS hybrid_market_share FROM `<table0>` WHERE `<col3>` = 'Tokyo';
What is the market share of electric vehicles in Tokyo compared to hybrid vehicles?
<table0>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table1>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table2>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table3>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int]...
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight AS FLIGHT_0, flight AS FLIGHT_1, flight AS FLIGHT_2 WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.c...
is there an airline that services BOSTON WASHINGTON and DALLAS
<table0>[products] { <col0>[product_id]:[INTEGER] <col1>[name]:[TEXT] <col2>[category]:[TEXT] <col3>[sustainable]:[BOOLEAN] <col4>[price]:[FLOAT] }
SELECT SUM( `<col4>` ) FROM `<table0>` WHERE `<col3>` = TRUE;
What is the total revenue generated by sustainable fashion products?