schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_41318] { <col0>[Medal]:[text] <col1>[text]:[Sport] <col2>[text]:[Event] <col3>[text]:[Date] }
SELECT "Sport" FROM `<table0>` WHERE "Name" = 'gustav larsson'
What is the Sport with a Name that is gustav larsson?
<table0>[table_name_54] { <col0>[award]:[VARCHAR] <col1>[actor]:[VARCHAR] <col2>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "forest whitaker" AND `<col2>` = 1989
What award did Forest Whitaker win in 1989?
<table0>[fairness_audits] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[processing_time]:[FLOAT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE country IN ( 'USA', 'Canada' )
What is the average processing time for fairness audits in the United States and Canada?
<table0>[table_name_37] { <col0>[silver]:[INTEGER] <col1>[rank]:[INTEGER] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1
How many Silver medals did the Nation with a Rank of less than 1 receive?
<table0>[employees] { <col0>[INT]:[name] <col1>[TEXT]:[job_category] <col2>[TEXT]:[salary] <col3>[INT]:[INSERT] }
SELECT job_category, COUNT( * ) as total_`<table0>`, AVG( salary ) as avg_salary FROM `<table0>` GROUP BY job_category;
List the total number of employees per job category and the average salary for each category in the HR database.
<table0>[table_13183076_3] { <col0>[original_air_date]:[VARCHAR] <col1>[directed_by]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Tricia Brock"
What is the Original air date for the episode directed by Tricia Brock?
<table0>[provider] { <col0>[provider_id]:[INT] <col1>[name]:[VARCHAR] <col2>[location]:[VARCHAR] <col3>[patients_served]:[INT] }
SELECT location, COUNT( * ) FROM `<table0>` WHERE `<col3>` > 500 AND `<col2>` = 'Alaska' GROUP BY location;
What is the total number of healthcare providers in rural areas of Alaska, serving more than 500 patients?
<table0>[betfront] { <col0>[year]:[number] <col1>[datetime]:[time] <col2>[country]:[text] <col3>[competion]:[text] <col4>[match]:[text] <col5>[home_opening]:[number] <col6>[draw_opening]:[number] <col7>[away_opening]:[number] <col8>[home_closing]:[number] <col9>[draw_closing]:[number] <col10>[away_closing]:[number] } ...
SELECT * FROM `<table1>` WHERE ( `<col8>` + `<col9>` ) = 0
Which games had no goals scored at full time?
<table0>[exists] { <col0>[cultural_competency_scores]:[score] <col1>[INT]:[race] <col2>[VARCHAR]:[255] <col3>[INSERT]:[cultural_competency_scores] <col4>[score]:[race] <col5>[VALUES]:[Hispanic] <col6>[African]:[American] }
SELECT MAX( score ), race FROM cultural_competency_scores GROUP BY race;
What is the maximum cultural competency score by race?
<table0>[customers] { <col0>[CustomerID]:[integer] <col1>[text]:[text] <col2>[StreetAddress]:[text] <col3>[City]:[text] <col4>[State]:[text] <col5>[ZipCode]:[integer] <col6>[Email]:[text] <col7>[PhoneNumber]:[text] <col8>[FirstPurchaseDate]:[date] <col9>[SubscribedToEmailList]:[text] <col10>[Gender]:[text] } <table1>[...
SELECT DISTINCT T2.CreditCardNumber FROM `<table0>` AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Lisa' AND T1.Last = 'Ling'
Show the credit card number of Lisa Ling.
<table0>[table_name_68] { <col0>[attendance]:[INTEGER] <col1>[home]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "pittsburgh"
What was the lowest attendance at a game when Pittsburgh was the home team?
<table0>[table_name_8] { <col0>[legs]:[VARCHAR] <col1>[year]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2009
what is the legs when the year is earlier than 2009?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.diagnosis = "PNEUMONIA" AND procedures.short_title = "Circumcision"
count the number of patients whose primary disease is pneumonia and procedure short title is circumcision?
<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 Id AS "post_link" FROM `<table21>` WHERE Title LIKE '%Magento%'
Questions with 'Magento' in title.
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T2.Headquarter, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter DESC
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the sum of code , and group by attribute headquarter, rank bar from high to low order.
<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 = "GASTROINTESTINAL BLEED" AND procedures.icd9_code = "14"
what is the number of patients whose primary disease is gastrointestinal bleed and procedure icd9 code is 14?
<table0>[table_204_349] { <col0>[number]:[year] <col1>[number]:[conservative] <col2>[ncouncillors]:[number] <col3>[labour]:[ncouncillors] <col4>[number]:[independent] <col5>[ncouncillors]:[number] <col6>[liberal]:[ncouncillors] }
SELECT ( SELECT "liberal\ncouncillors" FROM `<table0>` WHERE "year" = 1957 ) > 4
did the year 1957 have more or less than 4 liberal councillors ?
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[outputevents] { <col0>[row_id]:[number] <...
SELECT `<table8>`.startdate FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 9297 ) AND `<table8>`.route = 'vg' AND DATETIME( `<table8>`.startdate ) <= DATETIME( CURRENT_TIME( ), '-6 month' ) ORDER BY `<table8>`.startdate DESC LIMIT 1
when was the last time until 6 months ago that patient 9297 was prescribed a medication via vg?
<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>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.insurance = "Self Pay" AND procedures.long_title = "Open biopsy of soft tissue"
give me the number of patients whose insurance is self pay and procedure long title is open biopsy of soft tissue?
<table0>[healthcare_sector] { <col0>[year]:[INT] <col1>[incidents]:[INT] }
SELECT `<col1>` FROM `<table0>` WHERE `<col0>` = 2021;
How many security incidents were reported in the healthcare sector in 2021?
<table0>[table_name_59] { <col0>[december]:[INTEGER] <col1>[opponent]:[VARCHAR] <col2>[game]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "vancouver canucks" AND `<col2>` < 33
What is the sum for December against the vancouver canucks earlier than game 33?
<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 t2.drugname FROM ( SELECT `<table6>`.uniquepid, `<table1>`.`<table1>`time, `<table6>`.`<table6>`healthsystemstayid FROM `<table1>` JOIN `<table6>` ON `<table1>`.`<table6>`unitstayid = `<table6>`.`<table6>`unitstayid WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid...
what is the name of the drug that patient 015-33415 was prescribed after the pneumonia diagnosis until 06/2105, in the same hospital encounter?
<table0>[table_1507423_5] { <col0>[top_10]:[VARCHAR] <col1>[position]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "78th"
How many entries arr there for the top 10 for the 78th position?
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT SUM( `<table7>`.cellvaluenumeric ) FROM `<table7>` WHERE `<table7>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '016-9636' ) ) AND `<...
what was the total output of patient 016-9636's ileostomy on this month/29?
<table0>[t_kc22] { <col0>[MED_EXP_DET_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[MED_CLINIC_ID]:[text] <col4>[MED_EXP_BILL_ID]:[text] <col5>[SOC_SRT_DIRE_CD]:[text] <col6>[SOC_SRT_DIRE_NM]:[text] <col7>[DIRE_TYPE]:[number] <col8>[CHA_ITEM_LEV]:[number] <col9>[MED_INV_ITEM_TYPE]:[te...
SELECT OUT_DIAG_DIS_CD, `<col21>` FROM `<table1>` WHERE `<col4>` = '61021790' AND `<col0>` IN ( SELECT `<col0>` FROM `<table2>` WHERE `<col30>` >= 5648.4 )
这个号码是61021790病患所交的医疗费总费用大于5648.4元的医疗记录有啥,办理出院的诊断里有什么病,病名和编号多少?
<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>[ReviewTasks] { <col0>[number]...
SELECT SUM( CASE WHEN HadTag = 1 AND HasTag = 0 THEN 1 ELSE 0 END ) AS TagRemoved, SUM( CASE WHEN HadTag = 0 AND HasTag = 1 THEN 1 ELSE 0 END ) AS TagAdded, SUM( CASE WHEN HadTag = 1 AND HasTag = 1 THEN 1 ELSE 0 END ) AS TagPersisted, SUM( CASE WHEN HadTag = 1 OR HasTag = 1 THEN 1 ELSE 0 END ) AS Total FROM ( SELECT CA...
Questions with a specific tag both at first and current revision.
<table0>[cultural_sites] { <col0>[site_id]:[INT] <col1>[name]:[TEXT] <col2>[country]:[TEXT] <col3>[url]:[TEXT] }
SELECT name, `<col3>` FROM `<table0>` WHERE `<col2>` = 'Japan';
List all cultural heritage sites in Japan with their respective virtual tour URLs.
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <co...
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department <> 'ROMLANG' AND program_course.course_id = course.course_id AND program.program_id = program_course.program_id
Name the courses that are mandotary for the major but not in the ROMLANG department .
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9co...
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '017-49538' ) AND `<table6>`.unitdischarg...
did patient 017-49538's sao2, on the current icu visit, have been normal?
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[requirement] { <col0>[requirement_id]:[int] } <table2>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table3>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table4>[area] { <col0>[course_id]:[int] } <table...
SELECT DISTINCT `<table5>`.department, `<table5>`.name, `<table5>`.number, program_`<table5>`.workload FROM `<table5>` INNER JOIN student_record ON student_record.`<table5>`_id = `<table5>`.`<table5>`_id INNER JOIN program_`<table5>` ON program_`<table5>`.`<table5>`_id = `<table5>`.`<table5>`_id WHERE `<table5>`.depart...
Have I taken any courses that are among the most difficult in the NERS department ?
<table0>[solar_projects] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[location]:[VARCHAR] <col3>[255]:[co2_emissions] }
SELECT SUM( co2_emissions ) FROM `<table0>` WHERE `<col2>` LIKE '%European Union%';
Find total CO2 emissions for solar projects in the European Union
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[...
SELECT HIRE_DATE, `<col8>` FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table5>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col5>`
For those employees who do not work in departments with managers that have ids between 100 and 200, a line chart shows the change of commission_pct over hire_date, and sort X in asc order.
<table0>[catalog_structure] { <col0>[catalog_level_number]:[number] <col1>[catalog_id]:[number] <col2>[catalog_level_name]:[text] } <table1>[catalogs] { <col0>[catalog_id]:[number] <col1>[catalog_name]:[text] <col2>[catalog_publisher]:[text] <col3>[date_of_publication]:[time] <col4>[date_of_latest_revision]:[time] } ...
SELECT `<col5>` FROM `<table4>` WHERE `<col4>` > 8
What are the catalog entry names of the products with next entry ID above 8?
<table0>[table_26723] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Kickoff]:[text] <col3>[Opponent]:[text] <col4>[Final]:[score] <col5>[text]:[Team] <col6>[record]:[text] <col7>[Game]:[site] <col8>[text]:[Attendance] }
SELECT "Date" FROM `<table0>` WHERE "Week" = '8'
What date did the team play on week 8?
<table0>[table_54376] { <col0>[Year]:[real] <col1>[Category]:[text] <col2>[Nominee]:[text] <col3>[Episode]:[text] <col4>[Result]:[text] }
SELECT "Episode" FROM `<table0>` WHERE "Year" = '2004' AND "Nominee( s )" = 'jenny bicks and cindy chupack'
Name the episode for jenny bicks and cindy chupack nominees in 2004
<table0>[initiatives] { <col0>[INT]:[launch_date] <col1>[DATE]:[region] <col2>[VARCHAR]:[255] }
SELECT COUNT( * ) FROM `<table0>` WHERE region = 'Asia' AND launch_date >= '2016-01-01';
How many ethical AI initiatives were launched in Asia in the last 5 years?
<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 DISTINCT 'http://stackoverflow.com/q/' + LTRIM( STR( p.Id ) ) AS Url, p.Title FROM `<table16>` AS p LEFT JOIN PostTags AS pt ON p.Id = pt.PostId LEFT JOIN Tags AS t ON pt.TagId = t.Id LEFT JOIN PostTags AS pt2 ON p.Id = pt2.PostId LEFT JOIN Tags AS t2 ON pt2.TagId = t2.Id WHERE PostTypeId = 1 AND t.TagName = 'ra...
Questions with a specific tag and the tag raw.
<table0>[EconomicImpact] { <col0>[region]:[VARCHAR] <col1>[impact]:[FLOAT] <col2>[type]:[VARCHAR] }
SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'Australia' AND `<col2>` = 'eco-tourism';
Determine the total economic impact of eco-tourism in Australia.
<table0>[table_33746] { <col0>[Couple]:[text] <col1>[Place]:[real] <col2>[real]:[real] <col3>[Tot]:[real] }
SELECT MIN( "Place" ) FROM `<table0>` WHERE "Tot. ( 1+2 )" > '37' AND "Wk 1" > '20'
What is the place of the team that had a total score larger than 37 and a week one score above 20?
<table0>[PostTypes] { <col0>[number]:[text] } <table1>[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]...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "rank", Id AS "user_link", Id, Reputation, counts."#_posts", Reputation / counts."#_posts" AS "rep_per_post" FROM `<table16>` JOIN LATERAL ( SELECT COUNT( * ) FROM `<table19>` WHERE `<table19>`.OwnerUserId = `<table16>`.Id ) AS counts( "#_posts" ) WHERE counts."...
Your Posting Quality (Reputation per Posts). Enter your user ID and find out how much rep you earn per post
<table0>[table_42845] { <col0>[Date]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Venue]:[text] <col6>[Competition]:[text] }
SELECT "Away team" FROM `<table0>` WHERE "Home team" = 'leeds united' AND "Competition" = 'league cup'
Who is the away team for the tome team Leeds United, at the League Cup Competition?
<table0>[film_market_estimation] { <col0>[Estimation_ID]:[int] <col1>[Low_Estimate]:[real] <col2>[High_Estimate]:[real] <col3>[Film_ID]:[int] <col4>[Type]:[text] <col5>[Market_ID]:[int] <col6>[Year]:[int] } <table1>[market] { <col0>[Market_ID]:[int] <col1>[Country]:[text] <col2>[Number_cities]:[int] } <table2>[film] ...
SELECT Title, COUNT( `<col1>` ) FROM `<table2>` AS T1 JOIN `<table2>`_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type, `<col1>`
Use a stacked bar chart to show how many films for each title and each type. The x-axis is title.
<table0>[table_name_95] { <col0>[home_team]:[VARCHAR] <col1>[crowd]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 20 OFFSET 000
What home team has had a crowd bigger than 20,000?
<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 HIRE_DATE, SUM( `<col7>` ) FROM `<table4>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table6>` ) ORDER BY SUM( `<col7>` ) DESC
For those employees who did not have any job in the past, show me about the distribution of hire_date and the sum of salary bin hire_date by weekday in a bar chart, I want to sort y axis in descending order.
<table0>[Crimes] { <col0>[crime_id]:[INT] <col1>[crime_type]:[VARCHAR] <col2>[neighborhood]:[VARCHAR] <col3>[date]:[DATE] }
SELECT `<col2>` FROM `<table0>` WHERE `<col1>` IN ( 'Burglary', 'Theft' ) AND `<col3>` >= DATEADD( month, -1, CURRENT_TIMESTAMP ) GROUP BY `<col2>` HAVING COUNT( DISTINCT `<col1>` ) = 2;
List the unique neighborhoods where both 'Burglary' and 'Theft' occurred in the last month.
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal...
SELECT HIRE_DATE, AVG( `<col10>` ) FROM `<table5>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col10>` )
For those employees who was hired before 2002-06-21, find hire_date and the average of department_id bin hire_date by time, and visualize them by a bar chart, and could you show by the Y-axis from low to high please?
<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 JOB_ID, `<col10>` FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table4>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col6>`
For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and department_id , and visualize them by a bar chart, could you show in ascending by the x-axis?
<table0>[geographic] { <col0>[city]:[text] <col1>[county]:[text] <col2>[region]:[text] } <table1>[generalinfo] { <col0>[id_restaurant]:[integer] <col1>[label]:[text] <col2>[food_type]:[text] <col3>[city]:[text] <col4>[review]:[real] } <table2>[location] { <col0>[id_restaurant]:[integer] <col1>[street_num]:[integer] <...
SELECT DISTINCT T2.county, T2.region FROM `<table2>` AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real'
Which county and region does the street E. El Camino Real belong to?
<table0>[table_11961582_10] { <col0>[high_points]:[VARCHAR] <col1>[high_assists]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "J. Johnson ( 7 )"
How had the high points when the high assists were from J. Johnson (7)?
<table0>[table_train_176] { <col0>[int]:[systolic_blood_pressure_sbp] <col1>[int]:[hemoglobin_a1c_hba1c] <col2>[float]:[estimated_glomerular_filtration_rate_egfr] <col3>[int]:[blood_glucose] <col4>[int]:[hypoglycemia] <col5>[bool]:[total_cholesterol] <col6>[int]:[low_density_lipoprotein_ldl_cholesterol] <col7>[int]:[tr...
SELECT * FROM `<table0>` WHERE systolic_blood_pressure_sbp < 140
resting systolic blood pressure ( sbp ) < 140
<table0>[Rooms] { <col0>[bedType]:[VARCHAR] }
SELECT COUNT( DISTINCT `<col0>` ) FROM `<table0>`
How many different types of beds are there?
<table0>[energy_efficiency] { <col0>[country]:[VARCHAR] <col1>[score]:[FLOAT] }
SELECT AVG( `<col1>` ) as avg_score, `<col0>` FROM `<table0>` GROUP BY country;
What is the average energy efficiency score in India and China?
<table0>[table_16200] { <col0>[Institution]:[text] <col1>[Nickname]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Type]:[text] <col5>[Enrollment]:[real] }
SELECT COUNT( "Founded" ) FROM `<table0>` WHERE "Institution" = 'Carlow University 1'
how many founded dates are listed for carlow university 1
<table0>[table_name_97] { <col0>[attendance]:[INTEGER] <col1>[home]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "los angeles"
What is the least number of people to attend a game when Los Angeles was the home team?
<table0>[table_name_40] { <col0>[away_team]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sunday, 13 february"
Who was the away team on sunday, 13 february?
<table0>[table_14098_1] { <col0>[country_or_territory_with_flag]:[VARCHAR] <col1>[capital]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Santiago"
What country'c capital is santiago?
<table0>[arctic_marine_protected_areas] { <col0>[INT]:[name] <col1>[TEXT]:[region] <col2>[TEXT]:[min_depth] <col3>[FLOAT]:[INSERT] }
SELECT MIN( min_depth ) FROM `<table0>` WHERE region = 'Arctic';
What is the minimum depth of marine protected areas in the Arctic Ocean region?
<table0>[bankruptcy_law] { <col0>[case_id]:[INT] <col1>[filing_date]:[DATE] <col2>[chapter]:[VARCHAR] }
WITH updated_cases AS ( UPDATE bankruptcy_law SET chapter = '13' WHERE EXTRACT( YEAR FROM filing_date ) = 2018 RETURNING * ) SELECT * FROM updated_cases;
Update the 'bankruptcy_law' table and set the 'chapter' column to '13' for all cases filed in 2018
<table0>[table_name_29] { <col0>[time_retired]:[VARCHAR] <col1>[laps]:[VARCHAR] <col2>[grid]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 33 AND `<col2>` = 14
What was the time/retired with laps less than 33 and a grid of 14?
<table0>[table_name_64] { <col0>[points]:[VARCHAR] <col1>[races]:[VARCHAR] <col2>[season]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11" AND `<col2>` > 2008
If the Season is later than 2008 and Races is 11, what ate the Points?
<table0>[table_name_47] { <col0>[b_score]:[INTEGER] <col1>[position]:[VARCHAR] <col2>[total]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2nd" AND `<col2>` < 15.525
Can you tell me the average B Score that has the Position of 2nd, and the Total smaller than 15.525?
<table0>[table_name_40] { <col0>[name_and_flag]:[VARCHAR] <col1>[water_area__km_2]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE water_area__km_2__ = 0
Which province and flag has a water area (km 2) of 0?
<table0>[production] { <col0>[year]:[INT] <col1>[region]:[VARCHAR] <col2>[element]:[VARCHAR] <col3>[quantity]:[INT] }
SELECT ( SUM( CASE WHEN `<col1>` = 'Asia' THEN `<col3>` ELSE 0 END ) / SUM( `<col3>` ) ) * 100.0 FROM `<table0>` WHERE `<col2>` = 'Holmium' AND `<col0>` = 2020
What is the percentage of Holmium production that comes from 'Asia' in 2020?
<table0>[party_events] { <col0>[Event_ID]:[int] <col1>[Event_Name]:[text] <col2>[Party_ID]:[int] <col3>[Member_in_charge_ID]:[int] } <table1>[party] { <col0>[Party_ID]:[int] <col1>[Minister]:[text] <col2>[Took_office]:[text] <col3>[Left_office]:[text] <col4>[Region_ID]:[int] <col5>[Party_name]:[text] } <table2>[membe...
SELECT Party_name, COUNT( * ) FROM `<table2>` AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY Party_name
Show all party names and the number of members in each party with a bar chart, rank by the Party_name from low to high please.
<table0>[ProjectBudgets] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[255] <col2>[start_date]:[DATE] <col3>[end_date]:[DATE] <col4>[budget]:[DECIMAL] }
SELECT AVG( `<col4>` ) FROM `<table0>` WHERE `<col2>` BETWEEN '2017-07-01' AND '2018-06-30';
Find the average budget of defense projects that started between July 1st, 2017 and June 30th, 2018.
<table0>[table_29583818_3] { <col0>[place]:[VARCHAR] <col1>[couple]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Laura and Colin"
How many times is the couple laura and colin?
<table0>[MentalHealthParity] { <col0>[State]:[VARCHAR] <col1>[Coverage]:[DECIMAL] }
SELECT State, Coverage, RANK( ) OVER( ORDER BY `<col1>` DESC ) as rnk FROM `<table0>` WHERE rnk <= 3;
Identify the top three states with the highest percentage of mental health parity coverage.
<table0>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]...
SELECT `<table0>`.marital_status FROM `<table0>` WHERE `<table0>`.subject_id = 17667 AND `<table0>`.dischtime IS NULL
what is the marital status of patient 17667 in the current hospital encounter?
<table0>[table_name_54] { <col0>[chapter]:[INTEGER] <col1>[pinyin]:[VARCHAR] <col2>[articles]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "dehua" AND `<col2>` < 16
Can you tell me the lowest Chapter that has the Pinyin of dehua, and the Articles smaller than 16?
<table0>[table_name_4] { <col0>[gold]:[INTEGER] <col1>[silver]:[VARCHAR] <col2>[bronze]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 4 AND `<col2>` > 4
What is the fewest gold medals for the nation with 4 silvers and more than 4 bronze?
<table0>[events] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[date]:[DATE] <col3>[attendees]:[INT] }
SELECT MAX( attendees ) FROM events;
What is the maximum number of attendees for any cultural event?
<table0>[table_73343] { <col0>[Team]:[text] <col1>[Stadium]:[text] <col2>[Match]:[played] <col3>[text]:[Highest] <col4>[real]:[Lowest] <col5>[real]:[Average] }
SELECT "Team" FROM `<table0>` WHERE "Match played" = '10 4'
Which team has a match played of 10 4?
<table0>[table_name_13] { <col0>[total]:[INTEGER] <col1>[floor_exercise]:[VARCHAR] <col2>[rank]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 36.724 AND `<col2>` < 8
What's the lowest total when the floor exercise is less than 36.724 and the rank is lower than 8?
<table0>[table_name_87] { <col0>[result_f___a]:[VARCHAR] <col1>[league_position]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1st" AND `<col2>` = "4 january 1994"
Name the Result F A that has a League position of 1st on 4 january 1994?
<table0>[table_57932] { <col0>[Club]:[Team] <col1>[text]:[League] <col2>[text]:[Venue] <col3>[text]:[Established] <col4>[real]:[Premierships] }
SELECT "Premierships" FROM `<table0>` WHERE "League" = 'commonwealth bank trophy'
How many premierships for the commonwealth bank trophy league?
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <...
SELECT ( Title ) FROM `<table18>` WHERE CreationDate > '2016-11-05 14:29:36'
Titles from last 6 months.
<table0>[Accounts] { <col0>[AccountId]:[INT] <col1>[AccountType]:[VARCHAR] } <table1>[Transactions] { <col0>[TransactionId]:[INT] <col1>[AccountId]:[INT] <col2>[TransactionType]:[VARCHAR] <col3>[DECIMAL]:[INSERT] }
SELECT A.AccountId, A.AccountType FROM `<table0>` A LEFT JOIN Transactions T ON A.AccountId = T.AccountId WHERE A.AccountType = 'Checking' AND T.TransactionId IS NULL;
What are the Checking accounts without any transactions?
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1...
SELECT All_Neutral, `<col1>` FROM `<table0>` ORDER BY `<col1>`
Show me about the distribution of All_Neutral and School_ID in a bar chart, and display in ascending by the School_ID.
<table0>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <ta...
SELECT DISTINCT fare.fare_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WA...
what are the fares for flights between BOSTON and WASHINGTON
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>...
SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` WHERE `<table5>`.sho...
what is the top three most common medications that followed within 2 months for patients who received cont inv mec ven 96+ hrs until 4 years ago?
<table0>[table_name_49] { <col0>[magnitude]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 28, 2004"
What is the Magnitude on the Date May 28, 2004?
<table0>[activities] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[rating] <col3>[INT]:[sustainability_rating] <col4>[INT]:[INSERT] }
SELECT AVG( rating ) FROM `<table0>` WHERE country = 'Australia' AND sustainability_rating = 5;
What is the average rating of sustainable tourism activities in Australia?
<table0>[college] { <col0>[state]:[VARCHAR] <col1>[enr]:[INTEGER] }
SELECT COUNT( DISTINCT `<col0>` ) FROM `<table0>` WHERE `<col1>` > ( SELECT AVG( `<col1>` ) FROM `<table0>` )
What is the number of states that has some college whose enrollment is larger than the average enrollment?
<table0>[table_18953] { <col0>[real]:[Title] <col1>[text]:[Director] <col2>[text]:[Written] <col3>[text]:[Original] <col4>[Air]:[Date] <col5>[text]:[Production] }
SELECT "Written by" FROM `<table0>` WHERE "Title" = 'Mercury Falling'
Who wrote the episode called 'mercury falling'?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T2.Founder, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder
For those records from the products and each product's manufacturer, give me the comparison about the sum of code over the founder , and group by attribute founder by a bar chart.
<table0>[table_name_24] { <col0>[away_team]:[VARCHAR] }
SELECT `<col0>` AS score FROM `<table0>` WHERE `<col0>` = "north melbourne"
What is the Away Team score of North Melbourne?
<table0>[table_68196] { <col0>[Year]:[real] <col1>[English]:[title] <col2>[text]:[Original] <col3>[title]:[text] <col4>[Country]:[text] <col5>[Director]:[text] }
SELECT "Country" FROM `<table0>` WHERE "Director'" = 'alfonso cuarón'
What country is the film directed by Alfonso Cuar n from?
<table0>[Missions] { <col0>[INT]:[name] <col1>[VARCHAR]:[company] <col2>[VARCHAR]:[mission_type] <col3>[VARCHAR]:[duration] <col4>[INT]:[INSERT] }
SELECT MAX( duration ) FROM `<table0>` WHERE company = 'Interplanetary Inc.' AND mission_type = 'Venus';
What is the maximum duration of Venus missions conducted by 'Interplanetary Inc.'?
<table0>[college] { <col0>[cname]:[text] <col1>[state]:[text] <col2>[enr]:[number] } <table1>[tryout] { <col0>[pid]:[number] <col1>[cname]:[text] <col2>[ppos]:[text] <col3>[decision]:[text] } <table2>[player] { <col0>[pid]:[number] <col1>[pname]:[text] <col2>[ycard]:[text] }
SELECT * FROM `<table0>` ORDER BY `<col2>`
What information do you have on colleges sorted by increasing enrollment numbers?
<table0>[Customer_Policies] { <col0>[Policy_ID]:[INTEGER] <col1>[Customer_ID]:[INTEGER] <col2>[Policy_Type_Code]:[CHAR] <col3>[Start_Date]:[DATE] <col4>[End_Date]:[DATE] } <table1>[Claims] { <col0>[Claim_ID]:[INTEGER] <col1>[Policy_ID]:[INTEGER] <col2>[Date_Claim_Made]:[DATE] <col3>[Date_Claim_Settled]:[DATE] <col4>[A...
SELECT Date_Claim_Settled, COUNT( `<col3>` ) FROM `<table4>` GROUP BY `<col3>` ORDER BY `<col3>`
Plot date claim settled by the number of date claim settled as a line chart, and list by the X from low to high.
<table0>[table_name_5] { <col0>[artist]:[VARCHAR] <col1>[percentage]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "17.14%"
What Artist had a Percentage of 17.14%?
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table2>[ReviewRejectionReasons] { <col0>[number]:[text]...
WITH Raw AS ( SELECT OwnerUserId AS UserId FROM `<table8>` WHERE CreationDate > DATEADD( d, -60, CURRENT_TIMESTAMP( ) ) AND OwnerUserId > 0 UNION SELECT UserId FROM `<table13>` WHERE CreationDate > DATEADD( d, -60, CURRENT_TIMESTAMP( ) ) AND UserId > 0 ), Raw2 AS ( SELECT UserId FROM Raw GROUP BY UserId ), Raw3 AS ( SE...
Percentage of the total rep of users with 'monica' substring (only active in the last 2 months).
<table0>[Addresses] { <col0>[address_id]:[INTEGER] <col1>[line_1]:[VARCHAR] <col2>[120]:[line_2] <col3>[VARCHAR]:[120] <col4>[line_3]:[VARCHAR] <col5>[120]:[city] <col6>[VARCHAR]:[zip_postcode] <col7>[VARCHAR]:[state_province_county] <col8>[VARCHAR]:[country] <col9>[VARCHAR]:[other_address_details] <col10>[VARCHAR]:[25...
SELECT date_address_to, SUM( `<col4>` ) FROM `<table2>` GROUP BY other_details, `<col3>` ORDER BY `<col4>` DESC
Draw a line chart about the change of the sum of monthly_rental over date_address_to , and group by attribute other_details.
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boo...
SELECT p.Score, p.Id AS "post_link", p.ViewCount, p.OwnerUserId AS "user_link", p.CreationDate FROM `<table13>` AS p INNER JOIN PostHistory AS h ON h.PostId = p.Id WHERE NOT p.ClosedDate IS NULL AND p.ClosedDate = h.CreationDate AND h.PostHistoryTypeId = 10 AND h.Comment = '1' AND NOT p.Body LIKE '%<strong>Possible Dup...
Duplicates that are missing the 'Possible Duplicate' bit.
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation FROM `<table8>` WHERE LOWER( Location ) LIKE '%hong kong%' OR UPPER( Location ) LIKE '%HK' ORDER BY Reputation DESC
Hong Kong users by reputation.
<table0>[FarmD] { <col0>[species]:[VARCHAR] <col1>[country]:[VARCHAR] <col2>[quantity]:[INT] <col3>[farming_method]:[VARCHAR] }
SELECT country, species, SUM( `<col2>` ) FROM `<table0>` WHERE `<col3>` = 'Sustainable' GROUP BY country, species;
List the types of fish and their quantities farmed in each country using sustainable methods.
<table0>[table_203_355] { <col0>[number]:[year] <col1>[number]:[total] <col2>[number]:[romanians] <col3>[text]:[hungarians] <col4>[text]:[roma] }
SELECT "year" FROM `<table0>` ORDER BY "total" DESC LIMIT 1
what year had the highest total number ?
<table0>[marine_species] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[habitat] <col3>[VARCHAR]:[population] } <table1>[conservation_efforts] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[species_id] <col2>[INT]:[effort] <col3>[VARCHAR]:[start_date] <col4>[DATE]:[end_date] }
SELECT m.name, c.effort FROM `<table0>` m JOIN conservation_efforts c ON m.id = c.species_id WHERE m.name = 'Seagrass';
What conservation efforts have been made for seagrass species?
<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>[prescr...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.ethnicity = "WHITE" AND diagnoses.long_title = "Mechanical complication due to other implant and internal device, not elsewhere classified"
count the number of patients whose ethnicity is white and diagnoses long title is mechanical complication due to other implant and internal device, not elsewhere classified?
<table0>[table_name_89] { <col0>[silver]:[INTEGER] <col1>[rank]:[VARCHAR] <col2>[bronze]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 5 AND `<col2>` > 2
How many silver medals when the bronze is more than 2 and having a rank more than 5?