schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[community_health_workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[language] <col2>[VARCHAR]:[INSERT] } <table1>[health_equity_scores] { <col0>[worker_id]:[INT] <col1>[score]:[INT] } | SELECT chw.name, COALESCE( hes.score, 'N/A' ) AS health_equity_score FROM `<table0>` chw LEFT JOIN health_equity_scores hes ON chw.id = hes.worker_id; | List the community health workers and their respective health equity scores, if available. If not, display 'N/A'. |
<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 DISTINCT course.department, course.name, course.number, `<table10>`.workload, `<table10>`.workload FROM course, `<table10>` WHERE `<table10>`.category LIKE '%MDE%' AND `<table10>`.course_id = course.course_id AND `<table10>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table10>` AS PROGRAM_COU... | The MDE requirement can be fulfilled with which easiest class ? |
<table0>[ethical_ai_projects] { <col0>[project_id]:[INT] <col1>[region]:[VARCHAR] <col2>[budget]:[DECIMAL] } | SELECT MIN( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Africa'; | What is the minimum budget for an ethical AI project in Africa? |
<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 AVG( `<table2>`.age ) FROM `<table2>` WHERE `<table2>`.age >= "76" AND `<table2>`.admityear >= "2173" | what is the average age of patients in or above 76 years of age and admitted in or after the year 2173?
|
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <... | SELECT t3.culturesite FROM ( SELECT t2.culturesite, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table6>`.`<table6>`time FROM `<table6>` JOIN patient ON `<table6>`.patientunitstayid = patient.patientunitstayid WHERE `<table6>`.`<table6>`name = 'diagnostic ultrasound of heart ... | what were the four most commonly given microbiology tests for patients who had previously undergone diagnostic ultrasound of heart - transthoracic echocardiography within the same month?
|
<table0>[table_name_70] { <col0>[high_rebounds]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 56 | What is the High rebounds of a Game with 56? |
<table0>[cultural_heritage] { <col0>[INT]:[site_name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[year_preserved]:[INT] } | SELECT SUM( CASE WHEN `<col2>` IN ( 'South America', 'Oceania' ) THEN 1 ELSE 0 END ) as total_sites FROM `<table0>` WHERE `<col3>` <= 2021; | What is the total number of cultural heritage sites preserved in 'South America' and 'Oceania' as of 2021? |
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_labitems] { <col0... | SELECT DISTINCT `<table11>`.`<table11>` FROM `<table11>` WHERE `<table11>`.event_type = '`<table7>`' AND `<table11>`.event_id IN ( SELECT `<table7>`.row_id FROM `<table7>` WHERE `<table7>`.drug = 'emtricitabine-tenofovir' ) | how much does it cost for emtricitabine-tenofovir?
|
<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 DISTINCT `<table0>`.gender FROM `<table0>` WHERE `<table0>`.uniquepid = '009-424' | tell me the sex of patient 009-424.
|
<table0>[GeopoliticalRiskAssessments] { <col0>[INT]:[country] <col1>[VARCHAR]:[risk_level] <col2>[INT]:[assessment_date] <col3>[DATE]:[INSERT] } | DELETE FROM `<table0>` WHERE assessment_date < '2021-01-01'; | Delete records with assessment date before 2021 in the GeopoliticalRiskAssessments table |
<table0>[Apartment_Facilities] { <col0>[apt_id]:[INTEGER] <col1>[facility_code]:[CHAR] } <table1>[Apartments] { <col0>[apt_id]:[INTEGER] <col1>[building_id]:[INTEGER] <col2>[apt_type_code]:[CHAR] <col3>[apt_number]:[CHAR] <col4>[bathroom_count]:[INTEGER] <col5>[bedroom_count]:[INTEGER] <col6>[room_count]:[CHAR] } <ta... | SELECT booking_end_date, COUNT( `<col5>` ) FROM `<table4>` | Bar chart x axis booking end date y axis the number of booking end date |
<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>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:... | SELECT COUNT( * ) > 0 FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 12797 ) AND STRFTIME( '%y', `<table8>`.charttime ) <= '2102' | had patient 12797 undergone surgery until 2102. |
<table0>[Residents] { <col0>[resident_id]:[INTEGER] <col1>[property_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[date_moved_out]:[DATETIME] <col4>[other_details]:[VARCHAR] } <table1>[Customer_Events] { <col0>[Customer_Event_ID]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[pr... | SELECT customer_details, COUNT( `<col1>` ) FROM `<table5>` GROUP BY `<col1>` | Please compare the frequency of the customer details using a bar chart. |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[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... | SELECT `<table6>`.charttime FROM `<table6>` WHERE `<table6>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 9038 ) ) AND `<table6>`.itemid IN ( SELECT `<table14>`.itemid FROM `<table14>` WHERE `<table1... | when was the last time that patient 9038 has had the maximum arterial bp mean since 771 days ago?
|
<table0>[table_2988] { <col0>[Year]:[real] <col1>[Kentucky]:[Derby] <col2>[real]:[Preakness] <col3>[Stakes]:[text] <col4>[Kentucky]:[Oaks] <col5>[text]:[Belmont] <col6>[Stakes]:[text] <col7>[Travers]:[Stakes] <col8>[text]:[Breeders] <col9>[Cup]:[Saturday] <col10>[text]:[Breeders] <col11>[Cup]:[Friday] } | SELECT "Kentucky Oaks" FROM `<table0>` WHERE "Belmont Stakes" = '64,949' | What was the Kentucky Oaks attendance the year the Belmont Stakes had 64,949 attendance?
|
<table0>[incidents] { <col0>[INT]:[state] <col1>[TEXT]:[incident_date] <col2>[DATE]:[type] <col3>[TEXT]:[INSERT] } | SELECT state, COUNT( * ) as num_`<table0>` FROM `<table0>` WHERE incident_date >= DATEADD( year, -1, GETDATE( ) ) GROUP BY state ORDER BY num_`<table0>` ASC; | List the states in the US with the lowest workplace safety incident rates in the past year, in ascending order. |
<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 T2.award FROM `<table5>` AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthYear = 1952 | Please list the awards won by coaches who were born in 1952. |
<table0>[table_name_65] { <col0>[record]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "utah" | What was the record of Utah? |
<table0>[table_52075] { <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 "Venue" FROM `<table0>` WHERE "Home `<col2>` score" = '23.20 ( 158 )' | Where did a home team score 23.20 (158)?
|
<table0>[Customer_Address_History] { <col0>[customer_id]:[INTEGER] <col1>[address_id]:[INTEGER] <col2>[date_from]:[DATETIME] <col3>[date_to]:[DATETIME] } <table1>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[line_1_number_building]:[VARCHAR] <col2>[city]:[VARCHAR] <col3>[zip_postcode]:[VARCHAR] <col4>[state_provin... | SELECT state_province_county, COUNT( * ) FROM `<table1>` GROUP BY `<col4>` ORDER BY COUNT( * ) | Show each state and the number of addresses in each state Show bar chart, sort by the Y-axis from low to high.
|
<table0>[table_name_51] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sheffield wednesday" | On what date was the away team Sheffield Wednesday? |
<table0>[weather] { <col0>[date]:[TEXT] <col1>[max_temperature_f]:[INTEGER] <col2>[mean_temperature_f]:[INTEGER] <col3>[min_temperature_f]:[INTEGER] <col4>[max_dew_point_f]:[INTEGER] <col5>[mean_dew_point_f]:[INTEGER] <col6>[min_dew_point_f]:[INTEGER] <col7>[max_humidity]:[INTEGER] <col8>[mean_humidity]:[INTEGER] <col9... | SELECT installation_date, COUNT( installation_date ) FROM `<table1>` | Please give me a bar chart that bins the installation date of stations into Year interval as the X-axis, and count for showing how many stations are installed each year.
|
<table0>[table_204_414] { <col0>[number]:[name] <col1>[text]:[armenian] <col2>[text]:[location] <col3>[text]:[prisoners] <col4>[designed]:[number] <col5>[notes]:[text] } | SELECT COUNT( "name" ) FROM `<table0>` WHERE "location" = 'yerevan' | how many correctional facilities are listed in yerevan ?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal... | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table4>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY AVG( `<col9>` ) DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, find hire_date and the average of manager_id bin hire_date by time, and visualize them by a bar chart, rank in desc by the y axis.
|
<table0>[company] { <col0>[INT]:[name] <col1>[TEXT]:[industry] <col2>[TEXT]:[founding_year] <col3>[INT]:[founder_lgbtq] <col4>[BOOLEAN]:[funding_amount] } | SELECT MAX( funding_amount ) FROM `<table0>` WHERE industry = 'Technology' AND founder_lgbtq = TRUE | Find the maximum funding amount (in USD) for companies founded by LGBTQ+ individuals in the technology sector. |
<table0>[customers] { <col0>[customer_id]:[INT] <col1>[name]:[TEXT] <col2>[country]:[TEXT] } <table1>[transactions] { <col0>[transaction_id]:[INT] <col1>[customer_id]:[INT] <col2>[DECIMAL]:[INSERT] } | SELECT SUM( amount ) FROM `<table1>` INNER JOIN customers ON `<table1>`.customer_id = customers.customer_id WHERE customers.country = 'USA'; | What is the total amount of transactions for all customers from the United States? |
<table0>[dysprosium_production] { <col0>[INT]:[year] <col1>[INT]:[producer] <col2>[VARCHAR]:[255] <col3>[dysprosium_prod]:[FLOAT] } | DELETE FROM `<table0>` WHERE ( producer, `<col3>` ) IN ( SELECT producer, MAX( `<col3>` ) FROM `<table0>` WHERE year = 2020 GROUP BY producer ); | Delete the row with the highest Dysprosium production in 2020. |
<table0>[table_14345690_2] { <col0>[entered]:[VARCHAR] <col1>[celebrity]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Darren Day" | When did Darren Day enter? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:... | SELECT COUNT( * ) FROM `<table8>` WHERE `<table8>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '018-95228' AND NOT `<table9>`.hospitaldischa... | count the number of times that patient 018-95228 has had nutrition total during the last hospital encounter.
|
<table0>[table_29565601_2] { } | SELECT MAX( l ) FROM `<table0>` | What is the largest number in L? |
<table0>[table_name_9] { <col0>[division]:[VARCHAR] <col1>[fa_cup]:[VARCHAR] <col2>[season]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "round of 16" AND `<col2>` > 2012 | What is the division in the season more recent than 2012 when the round of 16 was reached in the FA Cup? |
<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>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table2>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time... | SELECT DISTINCT flight.flight_id FROM `<table21>` AS AIRPORT_SERVICE_0, `<table21>` 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 = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.... | PHOENIX to NEWARK wednesday
|
<table0>[Infrastructure] { <col0>[INT]:[category] <col1>[VARCHAR]:[cost] <col2>[FLOAT]:[INSERT] } | SELECT AVG( cost ) FROM `<table0>` WHERE category = 'Transportation'; | What is the average cost of projects in 'Transportation' category? |
<table0>[table_name_63] { <col0>[goals]:[INTEGER] <col1>[league]:[VARCHAR] <col2>[season]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "major `<col1>` soccer" AND `<col2>` = "2005" | Which Major League Soccer team for the 2005 season has the lowest goals? |
<table0>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <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]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter... | SELECT Time, ID FROM `<table1>` | Bar chart x axis time y axis id |
<table0>[Mining_Sites] { <col0>[INT]:[site_name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[environmental_impact_score] <col3>[INT]:[INSERT] } | SELECT site_name, environmental_impact_score FROM Mining_Sites; | List all mining sites and their respective environmental impact scores. |
<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>[lab] {... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.diagnosis = "T5 FRACTURE" AND procedures.short_title = "Drsl/dslmb fus post/post" | what is the number of patients whose primary disease is t5 fracture and procedure short title is drsl/dslmb fus post/post?
|
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden... | SELECT RANK( ) OVER ( ORDER BY Score DESC, ViewCount DESC ), Title, b.DisplayName AS UserName, Score, ViewCount, CAST( TIME_TO_STR( a.CreationDate, '%d/%m/%Y' ) AS TEXT( 30 ) ) AS Date, Tags FROM `<table21>` AS a INNER JOIN Users AS b ON a.OwnerUserId = b.Id WHERE a.CreationDate BETWEEN '03-09-2015' AND '03-22-2015' AN... | Display Posts By Votes For Tag in Timerange.
|
<table0>[table_name_55] { <col0>[last_issue]:[VARCHAR] <col1>[title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "time and again" | What is the last issue entry of Time and Again? |
<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 `<table8>`.`<table8>`time FROM `<table8>` WHERE `<table8>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '013-20464' ) ) AND `<table8>`... | when was the first time patient 013-20464 has been diagnosed with suicidal ideation since 3 years ago?
|
<table0>[Services] { <col0>[Service_ID]:[INTEGER] <col1>[Service_Type_Code]:[CHAR] } <table1>[Participants] { <col0>[Participant_ID]:[INTEGER] <col1>[Participant_Type_Code]:[CHAR] <col2>[Participant_Details]:[VARCHAR] } <table2>[Participants_in_Events] { <col0>[Event_ID]:[INTEGER] <col1>[Participant_ID]:[INTEGER] } ... | SELECT T1.Event_Details, T1.Event_ID FROM `<table3>` AS T1 JOIN Participants_in_`<table3>` AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details ORDER BY T1.Event_Details DESC | A bar chart about what are the ids and details of events that have more than one participants?, could you sort by the x axis in descending? |
<table0>[table_name_42] { <col0>[type]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1968 AND `<col2>` = "stretchin' out" | What is the type earlier than 1968, and a Title of stretchin' out? |
<table0>[table_74297] { <col0>[Period]:[ended] <col1>[text]:[Turnover] <col2>[u00a3]:[text] <col3>[Profit]:[tax] <col4>[u00a3]:[text] <col5>[Dividend]:[share] <col6>[text]:[Adjusted] <col7>[earnings]:[share] <col8>[diluted]:[text] } | SELECT COUNT( "Dividend per share ( p )" ) FROM `<table0>` WHERE "Turnover ( \u00a3m )" = '0.42' | How many items appear in the dividend per share when the turnover is 0.42?
|
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>... | SELECT Orig.Id AS OrigId, Orig.Id AS "post_link", Orig.Tags AS OrigTags, Orig.ViewCount AS OrigViewCount, Dupe.Id AS DupeId, Dupe.Id AS "post_link", Dupe.Tags AS DupeTags, Dupe.ViewCount AS DupeViewCount FROM PostLinks, Posts AS Orig, Posts AS Dupe WHERE PostLinks.Id NOT IN ( SELECT PostLinks.Id FROM PostLinks, PostTag... | Orig-Dupe pairs with disjunct tags. |
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[n... | SELECT COUNT( * ) > 0 FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 12797 ) AND STRFTIME( '%y', `<table10>`.charttime ) <= '2102' | did patient 12797 have any surgery until 2102? |
<table0>[donations] { <col0>[INT]:[donor_id] <col1>[INT]:[program_id] <col2>[INT]:[donation_amount] <col3>[DECIMAL]:[donation_date] } | SELECT programs.name as program_name, AVG( `<table0>`.donation_amount ) as avg_donation_amount FROM `<table0>` INNER JOIN donors ON `<table0>`.donor_id = donors.id INNER JOIN programs ON `<table0>`.program_id = programs.id WHERE donors.country = 'US' GROUP BY programs.name; | What is the average donation amount per program by donors from the US? |
<table0>[table_3817] { <col0>[series]:[text] <col1>[season]:[text] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] <col8>[text]:[viewers] <col9>[millions]:[text] } | SELECT "Original air date" FROM `<table0>` WHERE "Written by" = 'Steve Holland' | When steve holland is the writer what is the air date?
|
<table0>[table_35758] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] <col3>[text]:[text] } | SELECT "9:00" FROM `<table0>` WHERE "7:00" = 'entertainment tonight' | What 9:00 has entertainment tonight as 7:00?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal... | SELECT LAST_NAME, `<col7>` FROM `<table5>` WHERE `<col1>` LIKE '%m' ORDER BY `<col2>` DESC | For those employees whose first name is ending with the letter m, visualize a bar chart to show each employee's salary by the last name, could you show X in desc order? |
<table0>[habitats] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[location] <col3>[VARCHAR]:[size] <col4>[FLOAT]:[INSERT] } | SELECT name, size FROM habitats; | List all habitats and their sizes |
<table0>[ChemicalProduction] { <col0>[date]:[DATE] <col1>[chemical]:[VARCHAR] <col2>[mass]:[FLOAT] } | SELECT chemical, MAX( mass ) as MaxMass FROM ChemicalProduction; | What is the maximum mass of a single chemical production? |
<table0>[grapes] { <col0>[number]:[grape] <col1>[text]:[color] } <table1>[appellations] { <col0>[number]:[appelation] <col1>[text]:[county] <col2>[text]:[state] <col3>[text]:[area] <col4>[text]:[isava] } <table2>[wine] { <col0>[number]:[grape] <col1>[text]:[winery] <col2>[text]:[appelation] <col3>[text]:[state] <col4... | SELECT appelation FROM `<table2>` WHERE year > 2008 EXCEPT SELECT appelation FROM `<table1>` WHERE area = "Central Coast" | What are the appelations for wines produced after 2008 but not in the Central Coast area? |
<table0>[table_name_5] { <col0>[attendance]:[INTEGER] <col1>[week]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 2 AND `<col2>` = "new orleans saints" | Name the least attendance for opponent of new orleans saints and week more than 2 |
<table0>[table_name_25] { <col0>[points_for]:[INTEGER] <col1>[record]:[VARCHAR] <col2>[points_against]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "12–2" AND `<col2>` > 6 | What is the highest Points when the record was 12–2, and the Points Against are larger than 6? |
<table0>[Sales] { <col0>[sale_id]:[INT] <col1>[material_id]:[INT] <col2>[revenue]:[DECIMAL] } <table1>[Materials] { <col0>[material_id]:[INT] <col1>[material_name]:[VARCHAR] <col2>[sustainable]:[BOOLEAN] } <table2>[CircularEconomy] { <col0>[material_id]:[INT] <col1>[circular_economy]:[BOOLEAN] } <table3>[Brands] { <... | SELECT M.material_name, SUM( S.revenue ) as total_revenue FROM `<table0>` S INNER JOIN Materials M ON S.material_id = M.material_id INNER JOIN CircularEconomy CE ON M.material_id = CE.material_id INNER JOIN BrandMaterials BM ON M.material_id = BM.material_id INNER JOIN Brands B ON BM.brand_id = B.brand_id WHERE M.susta... | What is the total revenue of sustainable material brands in the circular economy in Europe? |
<table0>[Activity] { <col0>[actid]:[INTEGER] <col1>[activity_name]:[varchar] } <table1>[Participates_in] { <col0>[stuid]:[INTEGER] <col1>[actid]:[INTEGER] } <table2>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] ... | SELECT Rank, COUNT( * ) FROM `<table2>` AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank | Show all the faculty ranks and the number of students advised by each rank. Show the proportion.
|
<table0>[table_2509112_3] { <col0>[san_benito_municipality]:[VARCHAR] <col1>[language]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Another native" | If the language is another native, what is the San Benito Municipality total number? |
<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 Users.AccountId AS Id, Users.Reputation AS rep, COUNT( `<table6>`.Id ) AS Answers, CAST( AVG( CAST( Score AS FLOAT ) ) AS FLOAT( 6, 2 ) ) AS "average_answer_score" FROM `<table6>` INNER JOIN Users ON Users.Id = OwnerUserId GROUP BY Users.AccountId, Users.Reputation ORDER BY 'reputation' DESC LIMIT 38000 | Average reputation per post by user.
|
<table0>[film_market_estimation] { <col0>[estimation_id]:[number] <col1>[low_estimate]:[number] <col2>[high_estimate]:[number] <col3>[film_id]:[number] <col4>[type]:[text] <col5>[market_id]:[number] <col6>[year]:[number] } <table1>[film] { <col0>[film_id]:[number] <col1>[title]:[text] <col2>[studio]:[text] <col3>[dire... | SELECT DISTINCT `<col3>` FROM `<table1>` | What are the different film Directors?
|
<table0>[table_name_27] { <col0>[date]:[VARCHAR] <col1>[tournament]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "los angeles open" | What is the date of the Los Angeles open?
|
<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 lab ON `<table0>`.hadm_id = lab.hadm_id WHERE `<table0>`.admission_type = "NEWBORN" AND lab.label = "Thyroxine ( T4 )" | provide the number of newborn admission patients who had thyroxine (t4) lab test.
|
<table0>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[PostHistoryTypes] { <col0>[number]:[text] } <table3>[Sugges... | SELECT Id AS "post_link", LastEditorUserId AS "user_link", LastEditDate FROM `<table24>` WHERE OwnerUserId = '##UserId##' AND LastEditorUserId != '##UserId##' ORDER BY LastEditDate DESC | Posts that were edited by other users. |
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[i... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table14>`.charttime ) ) FROM `<table14>` WHERE `<table14>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 10855 ) AND `<table2>`.outti... | how many days have passed since the first time patient 10855 was given a d10w intake on the current intensive care unit visit?
|
<table0>[table_5520] { <col0>[Position]:[real] <col1>[Album]:[title] <col2>[text]:[Artist] <col3>[text]:[Sales] <col4>[real]:[Peak] } | SELECT COUNT( "Sales" ) FROM `<table0>` WHERE "Album title" = 'scouting for girls' | How many copies of scouting for girls were sold?
|
<table0>[table_name_54] { <col0>[laps]:[INTEGER] <col1>[driver]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "luca badoer" | What is the least amount of laps for Luca Badoer?
|
<table0>[table_12043] { <col0>[Year]:[real] <col1>[Film]:[name] <col2>[text]:[Music] <col3>[director]:[text] <col4>[Lyricist]:[text] <col5>[Language]:[text] } | SELECT "Film name" FROM `<table0>` WHERE "Year" > '1972' AND "Language" = 'hindi' AND "Lyricist" = 'ravindra jain' AND "Music director" = 'ravindra jain' | What 1972 Hindi film had Ravindra Jain directing the music?
|
<table0>[table_1341930_18] { <col0>[party]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "James H. Morrison" | which affiliation is james h. morrison part of |
<table0>[Strains] { <col0>[INT]:[name] <col1>[TEXT]:[price] <col2>[DECIMAL]:[INSERT] } <table1>[Sales] { <col0>[INT]:[strain_id] <col1>[INT]:[quantity] <col2>[INT]:[sale_date] <col3>[DATE]:[INSERT] } | SELECT `<table0>`.name, COALESCE( SUM( `<table0>`.price * Sales.quantity ), 0 ) as total_revenue FROM `<table0>` LEFT JOIN Sales ON `<table0>`.id = Sales.strain_id GROUP BY `<table0>`.name; | Determine the total revenue for each strain, including those with no sales. |
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table3>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] ... | SELECT * FROM `<table13>` AS U1 WHERE U1.Location = 'Omaha, NE, United States' ORDER BY U1.Reputation DESC, U1.Age | My Rank in my Location.
|
<table0>[table_23157997_13] { <col0>[winner]:[VARCHAR] <col1>[mountains_classification]:[VARCHAR] <col2>[points_classification]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Tom Zirbel" AND `<col2>` = "Thomas Soladay" | Who won the race with Tom Zirbel as Mountains Classification and Thomas Soladay as Points Classification? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table5>`.`<table5>`time, patient.patienthealthsystemstayid FROM `<table5>` JOIN patient ON `<table5>`.patientunitstayid = patient.patientunitstayid WHERE `<table5>`.`<table5>`name = 'antibacterials - empiric antibacterial therapy' AND STRFTIME( '%... | how many patients were treated for analgesics in the same hospital encounter after antibacterials - empiric antibacterial therapy in 2105? |
<table0>[material_prices_oceania] { <col0>[material_id]:[INT] <col1>[material_name]:[VARCHAR] <col2>[region]:[VARCHAR] <col3>[production_cost]:[DECIMAL] } | SELECT material_name, MIN( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'Oceania' GROUP BY material_name; | Which sustainable material has the lowest production cost in Oceania? |
<table0>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_direction_cost]:[int] <col7>[round_trip_cost]:[int] <col8>[round_trip_required]:[varchar] } <table1>[days] { <col0>[da... | SELECT DISTINCT flight.flight_id FROM `<table9>` AS AIRPORT_SERVICE_0, `<table9>` 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 = 'TACOMA' AND date_day.day_number = 10 AND date_day.month_number = 6 AND date_day.ye... | are there any flights on 6 10 from BURBANK to TACOMA
|
<table0>[table_name_4] { <col0>[copa_conmebol_1999]:[VARCHAR] <col1>[copa_libertadores_1999]:[VARCHAR] <col2>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "did not qualify" AND `<col2>` = "cruzeiro" | What is the Copa Conmebol 1999 result of team cruzeiro, which did not qualify for the Copa Libertadores 1999?
|
<table0>[table_19930660_3] { <col0>[episode]:[VARCHAR] <col1>[rufus_guest]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Chris Addison" | Which episodes have Chris Addison as Rufus's guest? |
<table0>[policy_types] { <col0>[INT]:[policy_type] <col1>[TEXT]:[INSERT] } <table1>[policies] { <col0>[INT]:[policyholder_id] <col1>[INT]:[policy_type_id] <col2>[INT]:[issue_date] <col3>[DATE]:[INSERT] } <table2>[claims] { <col0>[INT]:[policy_id] <col1>[INT]:[claim_amount] <col2>[INT]:[INSERT] } | SELECT policy_types.policy_type, COUNT( DISTINCT `<table1>`.id ) AS num_`<table1>`, COUNT( DISTINCT claims.id ) AS num_claims, COUNT( DISTINCT claims.id ) / COUNT( DISTINCT `<table1>`.id ) * 100 AS claim_frequency FROM `<table1>` JOIN policy_types ON `<table1>`.policy_type_id = policy_types.id LEFT JOIN claims ON `<tab... | Display the policy types with the lowest claim frequency in Texas. |
<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, T2.Revenue FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of revenue , and group by attribute name, list by the total number in asc.
|
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]... | SELECT DISTINCT `<table14>`_id FROM `<table14>` WHERE ( `<table14>`_id IN ( SELECT FLIGHT_FARE_ID FROM `<table19>`_`<table14>` AS FLIGHT_FARE WHERE FLIGHT_FLIGHT_ID IN ( SELECT FLIGHTalias0.`<table19>`_id FROM `<table19>` AS FLIGHTalias0 WHERE ( FLIGHTalias0.from_airport IN ( SELECT AIRPORT_SERVICEalias0.airport_code F... | is there a fare from PITTSBURGH to CLEVELAND under 200 dollars
|
<table0>[table_14799] { <col0>[Team]:[text] <col1>[Agg]:[text] <col2>[Team]:[text] <col3>[1st]:[leg] <col4>[text]:[2nd] <col5>[leg]:[text] } | SELECT "Team 2" FROM `<table0>` WHERE "Agg." = '3-4' AND "2nd leg" = '0-2' | Which team 2 had an aggregate score of 3-4 and a 2nd leg score of 0-2?
|
<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 MAX( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.admission_location = "PHYS REFERRAL/NORMAL DELI" AND `<table0>`.days_stay = "26" | what is maximum age of patients whose admission location is phys referral/normal deli and days of hospital stay is 26? |
<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>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[employees] { <col0>[EMPLOYE... | SELECT HIRE_DATE, `<col0>` FROM `<table2>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY `<col5>` DESC | 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 trend about employee_id over hire_date , and could you order HIRE_DATE in descending order please?
|
<table0>[table_203_378] { <col0>[number]:[text] <col1>[played]:[number] <col2>[won]:[number] <col3>[drawn]:[number] <col4>[lost]:[number] <col5>[win]:[text] } | SELECT "lost" FROM `<table0>` WHERE "against" = 'france' | what is the number of losses they have against france ?
|
<table0>[table_27083] { <col0>[Year]:[real] <col1>[Engine]:[text] <col2>[Power]:[text] <col3>[Torque]:[text] <col4>[Transmission]:[text] <col5>[u2013100]:[mph] <col6>[text]:[speed] <col7>[text]:[CO2] } | SELECT "Top speed" FROM `<table0>` WHERE "0\u2013100km/h ( 60mph )" = '5.5 seconds ( 5.2 )' | when0 100km/h (60mph) is 5.5 seconds (5.2), whats is the top speed? |
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table2>[month] { <col0>[month_number]:[int]... | SELECT DISTINCT fare.fare_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.... | what is the fare going from BALTIMORE to BOSTON one way on 11 7
|
<table0>[table_1558077_2] { <col0>[mass__kg]:[INTEGER] } | SELECT MAX( mass__kg_ ) FROM `<table0>` | What is the largest mass(kg)? |
<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 COUNT( * ) > 0 FROM `<table9>` WHERE `<table9>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '006-251537' ) ) AND STRFTIME( '%y', `<ta... | since 2103, has patient 006-251537 been given any diagnosis? |
<table0>[table_name_13] { <col0>[date]:[VARCHAR] <col1>[director]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pen-ek ratanaruang" | When was the film directed by Pen-Ek Ratanaruang released? |
<table0>[table_name_22] { <col0>[goals_against]:[INTEGER] <col1>[position]:[VARCHAR] <col2>[played]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 14 AND `<col2>` < 30 | What is the sum of goals against for positions higher than 14, with fewer than 30 played?
|
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[inputevents_cv] { <... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<table13>` WHERE `<table13>`.short_title = 'gastroenterostomy nec' ) AND DATETIME( `<table10>`.charttime ) >= DATETI... | how many patients have received the gastroenterostomy nec since 2 years ago?
|
<table0>[files] { <col0>[f_id]:[VARCHAR] <col1>[duration]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` DESC LIMIT 1 | What is the id of the longest song? |
<table0>[table_80007] { <col0>[text]:[Years] <col1>[text]:[Gender] <col2>[text]:[Area] <col3>[text]:[Authority] <col4>[text]:[Decile] <col5>[real]:[Roll] } | SELECT "Years" FROM `<table0>` WHERE "Name" = 'ladbrooks school' | Which years have a Name of ladbrooks school?
|
<table0>[table_200_41] { <col0>[number]:[number] <col1>[text]:[encoding] <col2>[text]:[implied] <col3>[probability]:[number] } | SELECT "implied probability" FROM `<table0>` WHERE "number" = '8 = 23 + 0' | what is the implied probability of 8 = 23 + 0 ?
|
<table0>[table_24463470_1] { <col0>[unlock_order]:[VARCHAR] <col1>[unlocks]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Paris" | How many instances is paris the unlock? |
<table0>[table_52694] { <col0>[Year]:[real] <col1>[Hot]:[100] <col2>[text]:[text] <col3>[Rap]:[text] <col4>[Album]:[text] } | SELECT "U.S. `<col1>` 100" FROM `<table0>` WHERE "Year" = '2002' AND "Album" = 'west coast bad boyz, vol. 3: poppin'' collars' | What is the U.S. Hot 100 chart number of the single off of the 2002 album west coast bad boyz, vol. 3: poppin' collars?
|
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]... | SELECT DISTINCT flight.flight_id FROM `<table19>` AS AIRPORT_SERVICE_0, `<table19>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE ( ( fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_... | show me FIRST class flights from NEW YORK to MIAMI round trip |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text... | SELECT t1.drugname FROM ( SELECT `<table1>`.drugname, COUNT( `<table1>`.drugstarttime ) AS c1 FROM `<table1>` WHERE `<table1>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>... | what is the medication that patient 012-4131 had been prescribed two times in 11/this year?
|
<table0>[Charges] { <col0>[charge_type]:[VARCHAR] <col1>[charge_amount]:[VARCHAR] } | SELECT charge_type, `<col1>` FROM `<table0>` | How much does each charge type costs? List both charge type and amount. |
<table0>[table_12407546_1] { <col0>[number]:[INTEGER] <col1>[riding]:[VARCHAR] } | SELECT MAX( _number ) FROM `<table0>` WHERE `<col1>` = "68.46 ( 1144 pts )" | What's the number of the player with 68.46 (1144 pts) in riding? |
<table0>[sustainable_urbanism] { <col0>[property_id]:[INT] <col1>[size]:[FLOAT] <col2>[location]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT * FROM `<table0>` WHERE `<col1>` > ( SELECT AVG( `<col1>` ) FROM `<table0>` ); | Which properties in the sustainable_urbanism table have a size larger than the average property size? |
<table0>[table_name_52] { <col0>[place]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[money___]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "united states" AND money___$__ = "200" | What is the ranking for the United States when the money is $200? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.