schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[Customers] { <col0>[CustomerID]:[INT] <col1>[TEXT]:[State] } <table1>[Purchases] { <col0>[PurchaseID]:[INT] <col1>[CustomerID]:[INT] <col2>[DispensaryID]:[INT] <col3>[Spending]:[DECIMAL] <col4>[INSERT]:[Customers] <col5>[CustomerID]:[State] <col6>[VALUES]:[John] <col7>[Doe]:[Nevada] <col8>[INSERT]:[Customers]... | SELECT C.Name, SUM( P.Spending ) as TotalSpending FROM `<table0>` C INNER JOIN Purchases P ON C.CustomerID = P.CustomerID WHERE C.State = 'Nevada' GROUP BY C.Name ORDER BY TotalSpending DESC LIMIT 5; | Who are the top 5 customers in terms of total spending in Nevada dispensaries? |
<table0>[table_name_34] { <col0>[driver]:[VARCHAR] <col1>[time_retired]:[VARCHAR] <col2>[grid]:[VARCHAR] <col3>[constructor]:[VARCHAR] <col4>[laps]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col3>` = "maserati" AND `<col4>` < 18 AND `<col2>` < 14 AND `<col1>` = "oil leak" | Who drove the maserati under 18 laps with an oil leak that had a grid of under 14? |
<table0>[table_name_76] { <col0>[opponent]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "8-10" | What opponent has 8-10 as the record? |
<table0>[table_28846752_4] { <col0>[runs]:[INTEGER] <col1>[highest_score]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "228*" | How many runs are there when the highest score is 228*? |
<table0>[carbon_offsets] { <col0>[offset_id]:[INT] <col1>[project_id]:[INT] <col2>[emission_date]:[DATE] <col3>[status]:[VARCHAR] <col4>[255]:[INSERT] } | UPDATE carbon_offsets SET status = 'inactive' WHERE emission_date < '2020-01-01'; | Update the carbon_offsets table to set the 'status' column to 'inactive' for all records with an 'emission_date' older than 2020-01-01. |
<table0>[table_name_27] { <col0>[result]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ulsan" | Which result has a Venue of ulsan? |
<table0>[table_204_991] { <col0>[number]:[name] <col1>[text]:[first] <col2>[nheld]:[number] <col3>[country]:[text] <col4>[earliest]:[attendance] <col5>[figure]:[known] <col6>[text]:[1998] <col7>[attendance]:[number] <col8>[2000]:[attendance] <col9>[number]:[2002] <col10>[attendance]:[number] <col11>[2004]:[attendance] ... | SELECT "name" FROM `<table0>` WHERE "name" IN ( 'animazement', 'animethon' ) ORDER BY "2006 attendance" DESC LIMIT 1 | which was the higher attended event in 2006 , animazement or animethon ? |
<table0>[table_1971734_1] { <col0>[prod__number]:[VARCHAR] <col1>[filmed]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Aug/Sept 1968" | What was the production number of the episode filmed in aug/sept 1968? |
<table0>[producers] { <col0>[INT]:[name] <col1>[VARCHAR]:[gender] <col2>[VARCHAR]:[country] } | SELECT country, gender, COUNT( * ) as count FROM `<table0>` GROUP BY country, gender ORDER BY country, count DESC; | Which countries have the least and most number of female producers in the producers table? |
<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 lab.itemid = "50817" | give me the number of patients whose item id is 50817? |
<table0>[table_28179] { <col0>[Institution]:[text] <col1>[Seniors]:[text] <col2>[Juniors]:[text] <col3>[Women]:[text] <col4>[Status]:[text] <col5>[Founded]:[real] <col6>[Affiliation]:[Population] <col7>[text]:[Color] <col8>[text]:[Location] } | SELECT "Institution" FROM `<table0>` WHERE "Women" = 'Lady Saints' | What institution is represented by the lady saints?
|
<table0>[projects] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[location]:[VARCHAR] <col4>[255]:[type] <col5>[VARCHAR]:[255] <col6>[capacity]:[FLOAT] <col7>[start_date]:[DATE] <col8>[end_date]:[DATE] } | SELECT * FROM `<table0>` WHERE type = 'Wind'; | What are the wind projects and their capacities? |
<table0>[heritage_sites] { <col0>[site_id]:[INT] <col1>[site_name]:[TEXT] <col2>[city]:[TEXT] <col3>[rating]:[INT] } | SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'Madrid'; | What is the average rating of cultural heritage sites in Madrid? |
<table0>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table1>[restriction] { <col0>[restriction_code]:[text] <col1>[adva... | SELECT DISTINCT `<col2>` FROM `<table11>` WHERE ( `<col1>` IN ( SELECT AIRPORTalias0.`<table20>`_code FROM `<table20>` AS AIRPORTalias0 WHERE AIRPORTalias0.`<table20>`_code = 'EWR' ) AND `<col0>` IN ( SELECT CITYalias0.`<table7>`_code FROM `<table7>` AS CITYalias0 WHERE CITYalias0.`<table7>`_name = 'NEW YORK' ) ) | please list ground transportation from EWR into NEW YORK |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND procedures.icd9_code = "5781" | give me the number of patients whose admission location is transfer from hosp/extram and procedure icd9 code is 5781?
|
<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 T1.title, T1.revenue, T3.COUNTry_name FROM `<table7>` AS T1 INNER JOIN production_COUNTry AS T2 ON T1.`<table7>`_id = T2.`<table7>`_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id ORDER BY T1.budget DESC LIMIT 1 | What is the title of the highest-budget film to date? Please include the revenue and name the country. |
<table0>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[varchar] <col4>[EMP_JOBCODE]:[varchar] <col5>[EMP_HIREDATE]:[datetime] <col6>[EMP_DOB]:[datetime] } <table1>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:... | SELECT DEPT_CODE, COUNT( * ) FROM `<table3>` WHERE `<col4>` = 'Ph.D.' GROUP BY `<col1>` ORDER BY COUNT( * ) DESC | Find the number of professors with a PhD degree in each department Show bar chart, I want to order y-axis from high to low order. |
<table0>[weekly_weather] { <col0>[station_id]:[int] <col1>[day_of_week]:[text] <col2>[high_temperature]:[int] <col3>[low_temperature]:[int] <col4>[precipitation]:[real] <col5>[wind_speed_mph]:[int] } <table1>[station] { <col0>[int]:[network_name] <col1>[text]:[services] <col2>[text]:[local_authority] } <table2>[route... | SELECT day_of_week, AVG( `<col2>` ) FROM `<table0>` GROUP BY `<col1>` ORDER BY AVG( `<col2>` ) | Draw a bar chart for what is the average high temperature for each day of week?, and sort from low to high by the total number please.
|
<table0>[table_name_94] { <col0>[celebrity]:[VARCHAR] <col1>[entered]:[VARCHAR] <col2>[exited]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "day 1" AND `<col2>` = "day 20" | Who entered on day 1 and exited on day 20? |
<table0>[table_name_13] { <col0>[team]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "justin wilson" | What is Justin Wilson's Team?
|
<table0>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CREDIT]:[float] } <table1>[PROFESSOR] { <col0>[EMP_NUM]:[int] <col1>[DEPT_CODE]:[varchar] <col2>[PROF_OFFICE]:[varchar] <col3>[PROF_EXTENSION]:[varchar] <col4>[PROF_HIGH_DEGREE]:[varchar] } <table2>[... | SELECT EMP_HIREDATE, COUNT( `<col5>` ) FROM `<table2>` AS T1 JOIN PROFESSOR AS T2 ON T1.EMP_NUM = T2.EMP_NUM WHERE T2.PROF_OFFICE = 'DRE 102' ORDER BY COUNT( `<col5>` ) | How many professors whose office is located in DRE 102 are hired in each month? Return a bar chart, list by the how many emp hiredate in asc.
|
<table0>[table_55372] { <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 `<col2>` score" FROM `<table0>` WHERE "Away team" = 'footscray' | What was the home teams score against the away team footscray?
|
<table0>[table_name_81] { <col0>[type]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "aut" | What is thr type in Aut country? |
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table2>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <c... | SELECT DISTINCT flight.flight_id FROM `<table8>` AS AIRPORT_SERVICE_0, `<table8>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( ( ( flight.departure_time <= 2400 AND flight.departure_time >= 2000 ) AND date_day.day_number = 25 AND date_day.month_number = 11 AND date_day.year = 1... | what flights are available from BOSTON to washington dc late the 25 or early the 26
|
<table0>[Research_Vessels] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[type] <col3>[VARCHAR]:[home_port] <col4>[VARCHAR]:[last_maintenance] <col5>[DATETIME]:[INSERT] } | SELECT name, type, home_port, last_maintenance FROM `<table0>` WHERE last_maintenance = ( SELECT MAX( last_maintenance ) FROM `<table0>` WHERE STRCMP( SUBSTRING_INDEX( home_port, ' ', 1 ), 'Southern', 1 ) = 1 ); | Which marine research vessel was last maintained in the Southern Hemisphere? |
<table0>[table_name_30] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] <col2>[country]:[VARCHAR] <col3>[to_par]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "united states" AND `<col3>` = "e" AND `<col1>` = "mike reid" | What was the score for United States when the player was Mike Reid and the To par was e? |
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col... | SELECT `<table1>`.label FROM `<table1>` WHERE `<table1>`.itemid IN ( SELECT `<table4>`.itemid FROM `<table4>` WHERE `<table4>`.icustay_id IN ( SELECT `<table3>`.icustay_id FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 366 ) ) AND DATETIME( `<table4... | the first intake patient 366 had until 828 days ago what was the name of that?
|
<table0>[table_name_40] { <col0>[grand_finaldate]:[VARCHAR] <col1>[season]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1988 | I want the Grand Final Date for season 1988 |
<table0>[table_name_6] { <col0>[name]:[VARCHAR] <col1>[location]:[VARCHAR] <col2>[current_status]:[VARCHAR] <col3>[line]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "demolished" AND `<col3>` = "shepparton line" AND `<col1>` = "tabilk" | What is the name of the station that is currently demolished with the Shepparton line in Tabilk?
|
<table0>[table_55069] { <col0>[Competition]:[text] <col1>[Current]:[position] <col2>[round]:[text] <col3>[Final]:[position] <col4>[round]:[text] <col5>[match]:[text] <col6>[match]:[text] } | SELECT "First match" FROM `<table0>` WHERE "Last match" = '11 may 2008' | Name the first match for 11 may 2008
|
<table0>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table3>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name... | SELECT DISTINCT `<table9>`_id FROM `<table9>` WHERE ( ( ( ( ( `<table9>`_`<table16>` IN ( SELECT DAYSalias0.`<table16>`_code FROM `<table16>` AS DAYSalias0 WHERE DAYSalias0.day_name IN ( SELECT DATE_DAYalias0.day_name FROM `<table5>` AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 26 AND DATE_DAYalias0.month_number... | give me a combination of CO flights from CHICAGO to SEATTLE that have meals early saturday morning |
<table0>[Fault_Log_Parts] { <col0>[fault_log_entry_id]:[INTEGER] <col1>[part_fault_id]:[INTEGER] <col2>[fault_status]:[VARCHAR] } <table1>[Assets] { <col0>[asset_id]:[INTEGER] <col1>[maintenance_contract_id]:[INTEGER] <col2>[supplier_company_id]:[INTEGER] <col3>[asset_details]:[VARCHAR] <col4>[255]:[asset_make] <col5>... | SELECT other_details, COUNT( `<col4>` ) FROM `<table5>` AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY `<col4>` | List the number of engineers and group by other details in a pie chart.
|
<table0>[table_203_229] { <col0>[number]:[pick] <col1>[number]:[nfl] <col2>[team]:[text] <col3>[player]:[text] <col4>[position]:[text] <col5>[college]:[text] } | SELECT COUNT( DISTINCT "player" ) FROM `<table0>` | how many different players are listed in this table ? |
<table0>[table_name_80] { <col0>[award]:[VARCHAR] <col1>[result]:[VARCHAR] <col2>[organization]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nominated" AND `<col2>` = "54th the television academy drama awards" | Where Result is nominated and Organization is 54th the television academy drama awards, what is the award? |
<table0>[table_204_413] { <col0>[number]:[medal] <col1>[text]:[name] <col2>[text]:[sport] <col3>[text]:[event] <col4>[text]:[date] } | SELECT "event" FROM `<table0>` ORDER BY "date" DESC LIMIT 1 | what was the last event held ? |
<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 `<table1>`.short_title, procedures.short_title FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.subject_id = "18372" | let me know the short title of both diagnoses and procedure for patient with patient id 18372. |
<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, COUNT( `<col5>` ) FROM `<table6>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table3>` ) | For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday. |
<table0>[table_40172] { <col0>[Candidate]:[text] <col1>[Votes]:[real] <col2>[Percentage]:[text] <col3>[Counties]:[real] <col4>[Delegates]:[real] } | SELECT SUM( "Counties" ) FROM `<table0>` WHERE "Votes" = '701,761' AND "Delegates" < '57' | What is the sum of Counties when there were 701,761 votes and less than 57 delegates? |
<table0>[category] { <col0>[int]:[business_id] <col1>[varchar]:[category_name] } <table1>[user] { <col0>[uid]:[int] <col1>[user_id]:[varchar] <col2>[name]:[varchar] } <table2>[business] { <col0>[bid]:[int] <col1>[business_id]:[varchar] <col2>[name]:[varchar] <col3>[full_address]:[varchar] <col4>[city]:[varchar] <col5... | SELECT user.name FROM review, user WHERE user.user_id = review.user_id GROUP BY user.name HAVING AVG( review.rating ) < 3 | Find users whose average review rating is below 3
|
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labres... | SELECT MAX( `<table1>`.`<table1>`result ) FROM `<table1>` WHERE `<table1>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '028-42654' ) ) AND `... | what was the maximum value of patient 028-42654's -eos until 12/2102? |
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[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]:[R... | SELECT TOP( 100 ) AS TagName, SUM( CASE Votes.VoteTypeId WHEN 2 THEN 1 WHEN 3 THEN -1 END ) AS Rep, Users.Id AS "user_link", `<col0>` = ROW_NUMBER( ) OVER ( ORDER BY TagName ) FROM `<table24>` INNER JOIN Post`<table24>` ON Post`<table24>`.TagId = `<table24>`.Id INNER JOIN Posts ON Posts.ParentId = Post`<table24>`.PostI... | Top N answerers for a given tag. |
<table0>[Ytterbium_Market_Prices] { <col0>[INT]:[year] <col1>[INT]:[country] <col2>[VARCHAR]:[255] <col3>[market_price]:[FLOAT] } | SELECT MAX( `<col3>` ) FROM `<table0>` WHERE year = 2020 AND country = 'Japan'; | What is the maximum market price of Ytterbium in Japan in 2020? |
<table0>[WorkoutEquipment] { <col0>[equipment_id]:[INT] <col1>[equipment_type]:[VARCHAR] } <table1>[WearableTech] { <col0>[tech_id]:[INT] <col1>[tech_type]:[VARCHAR] } | SELECT DISTINCT `<col1>` FROM `<table0>` WHERE `<col1>` != 'Dumbbell' UNION SELECT DISTINCT tech_type FROM WearableTech; | What is the list of unique equipment types used in the WorkoutEquipment table and the WearableTech table, excluding the 'Dumbbell' equipment type? |
<table0>[InclusiveHousing] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[city] <col2>[VARCHAR]:[state] <col3>[VARCHAR]:[policy] <col4>[VARCHAR]:[100] <col5>[date]:[DATE] } | ALTER TABLE InclusiveHousing ADD COLUMN date DATE; | Alter the InclusiveHousing table to include a date column |
<table0>[VoteTypes] { <col0>[number]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <... | SELECT a.TagName AS "Tagname", a.upvotes AS "Upvotes", b.downvotes AS "Downvotes" FROM ( SELECT TagName, COUNT( * ) AS upvotes FROM `<table21>` JOIN Post`<table21>` ON Post`<table21>`.TagId = `<table21>`.Id JOIN Posts ON Posts.ParentId = Post`<table21>`.PostId OR Posts.Id = Post`<table21>`.PostId JOIN Votes ON Votes.Po... | Getting number of upvotes and downvotes for each tag for a user, along with ratio. number of upvotes and downvotes i have for each tag, questions and answers combined |
<table0>[market] { <col0>[Market_ID]:[int] <col1>[Country]:[text] <col2>[Number_cities]:[int] } <table1>[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] } <table2>[film] ... | SELECT Studio, COUNT( * ) FROM `<table2>` GROUP BY `<col2>` | A bar chart about how films are produced by each studio?
|
<table0>[table_18765] { <col0>[Rank]:[real] <col1>[Place]:[text] <col2>[County]:[text] <col3>[Capita]:[Income] <col4>[text]:[Median] <col5>[House]:[hold] <col6>[Income]:[text] <col7>[Population]:[real] <col8>[Number]:[Households] } | SELECT "Place" FROM `<table0>` WHERE "Per `<col3>` Income" = '$14,793' | who is the the place with per capita income being $14,793 |
<table0>[game] { <col0>[stadium_id]:[int] <col1>[int]:[Season] <col2>[int]:[Date] <col3>[text]:[Home_team] <col4>[text]:[Away_team] <col5>[text]:[Score] <col6>[text]:[Competition] } <table1>[injury_accident] { <col0>[game_id]:[int] <col1>[int]:[Player] <col2>[text]:[Injury] <col3>[text]:[Number_of_matches] <col4>[text... | SELECT Season, COUNT( Season ) FROM `<table0>` GROUP BY Home_team ORDER BY Season | The trend about the the number of season of different Home_team over the season, display by the X from low to high.
|
<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>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]... | SELECT JOB_ID, AVG( `<col7>` ) FROM `<table6>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) GROUP BY `<col6>` ORDER BY AVG( `<col7>` ) | For those employees who did not have any job in the past, a bar chart shows the distribution of job_id and the average of salary , and group by attribute job_id, sort by the y-axis from low to high. |
<table0>[Customer] { <col0>[CustomerId]:[integer] <col1>[FirstName]:[varchar] <col2>[LastName]:[varchar] <col3>[Company]:[varchar] <col4>[Address]:[varchar] <col5>[City]:[varchar] <col6>[State]:[varchar] <col7>[Country]:[varchar] <col8>[PostalCode]:[varchar] <col9>[Phone]:[varchar] <col10>[Fax]:[varchar] <col11>[Email]... | SELECT T1.Title, T1.`<table10>`Id FROM `<table10>` AS T1 JOIN Track AS T2 ON T1.`<table10>`Id = T2.`<table10>`Id WHERE T2.UnitPrice > 1 ORDER BY T1.`<table10>`Id | What are the titles and ids for albums containing tracks with unit price greater than 1, could you order by the y axis in asc?
|
<table0>[exists] { <col0>[tunnels]:[INT] <col1>[name]:[VARCHAR] <col2>[100]:[location] <col3>[VARCHAR]:[length] <col4>[FLOAT]:[INSERT] <col5>[tunnels]:[name] <col6>[location]:[length] <col7>[VALUES]:[Mountain] <col8>[Tunnel]:[mountain] } | SELECT name FROM tunnels WHERE location = 'mountain' AND length = ( SELECT MAX( length ) FROM tunnels WHERE location = 'mountain' ); | What is the name of the longest tunnel in 'mountain' areas? |
<table0>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditor... | WITH t1 AS ( SELECT TIME_TO_STR( p.CreationDate, '%Y' ) AS Year, TIME_TO_STR( p.CreationDate, '%m' ) AS Month, COUNT( * ) AS total, COUNT( AcceptedAnswerId ) AS AcceptedAnswers FROM `<table0>` AS p WHERE Tags LIKE '%<sql>%' GROUP BY TIME_TO_STR( p.CreationDate, '%Y' ), TIME_TO_STR( p.CreationDate, '%m' ) ) SELECT DATE(... | total sql questions and AcceptedAnswers my month.
|
<table0>[table_name_44] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[attendance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "june 22" AND `<col2>` = 0 | What was the score for the June 22 game with attendance 0?
|
<table0>[faculty] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[gender] <col3>[VARCHAR]:[sexual_orientation] } <table1>[research_grants] { <col0>[INT]:[faculty_id] <col1>[INT]:[grant_amount] <col2>[DECIMAL]:[INSERT] <col3>[faculty]:[VALUES] <col4>[Alex]:[Computer] <col5>[Science]:[Non] <col6>[bina... | INSERT INTO research_grants ( id, faculty_id, grant_amount ) VALUES ( 4, 4, 4000.00 ); | Insert a new research grant with an ID of 4, a grant amount of 4000.00, and a faculty member with an ID of 4 who identifies as genderqueer into the Research Grants table. |
<table0>[table_31015] { <col0>[Team]:[text] <col1>[Contest]:[round] <col2>[text]:[Opponent] <col3>[text]:[1st] <col4>[leg]:[score] <col5>[text]:[2nd] <col6>[leg]:[score] <col7>[text]:[Aggregate] <col8>[score]:[text] } | SELECT "Team" FROM `<table0>` WHERE "Opponent" = 'Elfsborg' | what was the name of the team opponent to elfsborg
|
<table0>[table_14319023_2] { <col0>[boys_doubles]:[VARCHAR] <col1>[girls_doubles]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Ayu Pratiwi Anggi Widia" | When the girls doubles is ayu pratiwi anggi widia what is the boys doubles? |
<table0>[table_23248869_10] { <col0>[score]:[VARCHAR] <col1>[location_attendance]:[VARCHAR] <col2>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Madison Square Garden 19,763" AND `<col2>` < 80.0 | What is every score for location attendance of Madison Square Garden 19,763 and game less than 80.0? |
<table0>[storm] { <col0>[Storm_ID]:[int] <col1>[text]:[Dates_active] <col2>[text]:[Max_speed] <col3>[int]:[Damage_millions_USD] <col4>[real]:[Number_Deaths] } <table1>[region] { <col0>[Region_id]:[int] <col1>[Region_code]:[text] <col2>[Region_name]:[text] } <table2>[affected_region] { <col0>[Region_id]:[int] <col1>[S... | SELECT Region_name, COUNT( * ) FROM `<table1>` AS T1 JOIN affected_`<table1>` AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id ORDER BY `<col2>` DESC | Show the name for regions and the number of storms for each region by a bar chart, and sort from high to low by the X-axis.
|
<table0>[table_name_51] { <col0>[opposition]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1911 AND `<col2>` = "old trafford" | Which Opposition has a Year smaller than 1911, and a Venue of old trafford? |
<table0>[table_1965650_3] { <col0>[college_junior_club_team]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "John Campbell" | Name the college/junior club team for john campbell |
<table0>[table_203_475] { <col0>[number]:[stage] <col1>[number]:[date] <col2>[text]:[route] <col3>[text]:[terrain] <col4>[text]:[length] <col5>[text]:[winner] } | SELECT "winner" FROM `<table0>` GROUP BY "winner" ORDER BY COUNT( * ) DESC LIMIT 1 | which country had more stage winners than any other country ?
|
<table0>[Accidents] { <col0>[AccidentID]:[INT] <col1>[Date]:[DATE] <col2>[Location]:[VARCHAR] <col3>[Type]:[VARCHAR] <col4>[Injuries]:[INT] <col5>[Fatalities]:[INT] } | SELECT COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` ) AS Percentage_With_Injuries FROM `<table0>` WHERE `<col4>` > 0; | Calculate the percentage of accidents with injuries. |
<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>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.days_stay > "1" AND diagnoses.icd9_code = "E8791" | count the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is e8791? |
<table0>[table_15584067_7] { <col0>[written_by]:[VARCHAR] <col1>[no_in_season]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11" | Name who wrote the 11 number in the season
|
<table0>[products] { <col0>[product_id]:[number] <col1>[parent_product_id]:[number] <col2>[production_type_code]:[text] <col3>[unit_price]:[number] <col4>[product_name]:[text] <col5>[product_color]:[text] <col6>[product_size]:[text] } <table1>[accounts] { <col0>[account_id]:[number] <col1>[customer_id]:[number] <col2>... | SELECT product_id, COUNT( DISTINCT `<col1>` ) FROM `<table2>` GROUP BY `<col2>` | How many distinct order ids correspond to each product?
|
<table0>[table_228973_11] { <col0>[no_in_season]:[VARCHAR] <col1>[original_air_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "February 11, 2005" | The episode which originally aired on February 11, 2005 had which episode # of the season?
|
<table0>[digital_assets] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[network]:[VARCHAR] <col4>[255]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col3>` = 'Ethereum'; | What's the total number of digital assets on the Ethereum network? |
<table0>[tour_packages] { <col0>[package_id]:[INT] <col1>[package_type]:[VARCHAR] <col2>[price]:[DECIMAL] <col3>[is_eco_friendly]:[BOOLEAN] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col3>` = TRUE; | What is the average price of eco-friendly tour packages? |
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivileg... | SELECT COUNT( * ) FROM `<table6>` WHERE `<table6>`.CreationDate = '10-13-2014' | Number Of Posts Created on a Certain Date. |
<table0>[Vessel] { <col0>[INT]:[TEXT] <col1>[AverageSpeed]:[DECIMAL] } | SELECT Name FROM ( SELECT Name, AverageSpeed, NTILE( 4 ) OVER ( ORDER BY `<col1>` DESC ) AS Tile FROM `<table0>` ) AS Ranked`<table0>`s WHERE Tile <= 4; | Find the vessels with an average speed in the top 25% of average speeds in the Vessel table. |
<table0>[table_name_18] { <col0>[type]:[VARCHAR] <col1>[group]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "movies" | What is the type of station that is in the movies group?
|
<table0>[products] { <col0>[product_id]:[INT] <col1>[name]:[VARCHAR] <col2>[255]:[circular_supply_chain] <col3>[BOOLEAN]:[INSERT] } <table1>[sales] { <col0>[sale_id]:[INT] <col1>[product_id]:[INT] <col2>[sale_date]:[DATE] } | SELECT COUNT( * ) FROM `<table0>` JOIN sales ON `<table0>`.product_id = sales.product_id WHERE circular_supply_chain = TRUE AND sale_date BETWEEN '2022-02-01' AND '2022-02-28'; | How many circular supply chain products were sold last month? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[cost] { <col0>[row_i... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table9>`.startdate ) ) FROM `<table9>` WHERE `<table9>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 76332 AND `<table6>`.dischtime IS NULL ) AND `<table9>`.drug = 'vancomycin hcl' ORDER BY `<table9>`.startdate D... | what is the number of hours since patient 76332 received the last vancomycin hcl prescription during the current hospital encounter? |
<table0>[market] { <col0>[Number_cities]:[INTEGER] } | SELECT MAX( `<col0>` ), MIN( `<col0>` ) FROM `<table0>` | What are the maximum and minimum number of cities in all markets.
|
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[numbe... | SELECT DisplayName, Reputation, Location FROM `<table1>` WHERE UPPER( Location ) LIKE '%DENVER%' ORDER BY Reputation DESC | StackOverflow users in Denver, CO ordered by reputation.
|
<table0>[table_20095300_1] { <col0>[weight__st]:[VARCHAR] <col1>[VARCHAR]:[name] } | SELECT weight__st, _lb_ FROM `<table0>` WHERE name = "Point Barrow" | How much does Point Barrow weight? |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[Creati... | SELECT TIME_TO_STR( p.CreationDate, '%YEAR' ), COUNT( * ) FROM `<table1>` AS p WHERE p.Tags LIKE ( '%<enterprise-library>%' ) AND p.AnswerCount > 0 AND p.ClosedDate IS NULL GROUP BY TIME_TO_STR( p.CreationDate, '%YEAR' ) | Enterprise Library Answers By Year.
|
<table0>[table_name_75] { <col0>[machine]:[VARCHAR] <col1>[trophy]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "susan jenness trophy" | What machine did susan jenness trophy earn the trophy?
|
<table0>[projects] { <col0>[code]:[text] <col1>[name]:[text] <col2>[hours]:[number] } <table1>[scientists] { <col0>[ssn]:[number] <col1>[name]:[text] } <table2>[assignedto] { <col0>[scientist]:[number] <col1>[project]:[text] } | SELECT `<col1>` FROM `<table0>` WHERE `<col2>` > ( SELECT AVG( `<col2>` ) FROM `<table0>` ) | What are the names of projects that have taken longer than the average number of hours for all projects? |
<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... | WITH `<table27>`Sample AS ( SELECT u.Id FROM `<table27>` AS u ) SELECT p.PostTypeId, p.OwnerUserId, p.OwnerUserId AS "user_link", COUNT( * ) AS n FROM `<table19>` AS p RIGHT OUTER JOIN `<table27>`Sample AS u ON u.Id = p.OwnerUserId WHERE p.OwnerUserId > 0 GROUP BY p.OwnerUserId, p.PostTypeId ORDER BY p.OwnerUserId, p.P... | How many did each user asked questions and gave answers. |
<table0>[military_weapon_systems] { <col0>[system_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[system_name]:[VARCHAR] <col3>[100]:[system_type] <col4>[VARCHAR]:[manufacturer] <col5>[VARCHAR]:[100] } | INSERT INTO military_weapon_systems ( system_name, system_type, manufacturer ) VALUES ( 'Javelin', 'Anti-tank missile', 'Lockheed Martin' ); | Add a new weapon system to the 'military_weapon_systems' table with 'system_name' 'Javelin', 'system_type' 'Anti-tank missile', 'manufacturer' 'Lockheed Martin' |
<table0>[Customers] { <col0>[CustomerID]:[INT] <col1>[TEXT]:[City] <col2>[TEXT]:[IsVegan] } | SELECT City, IsVegan, COUNT( IsVegan ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` ) AS Percentage FROM `<table0>` WHERE IsVegan = TRUE GROUP BY City; | Calculate the percentage of vegan customers in each city. |
<table0>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[... | SELECT DISTINCT department, name, `<col3>` FROM `<table7>` WHERE ( `<col7>` LIKE '%Special the Social Sciences%' OR `<col1>` LIKE '%Special the Social Sciences%' ) AND `<col4>` = 13 | Which Special the Social Sciences classes have 13 credits ?
|
<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>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]... | SELECT `<table12>`.charttime FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 92788 ) AND DATETIME( `<table12>`.charttime, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-0 month' ) ORDER BY `<table12>`.charttime LIMIT 1 | in this month when was the first lab test of patient 92788?
|
<table0>[table_204_117] { <col0>[number]:[season] <col1>[number]:[level] <col2>[text]:[division] <col3>[text]:[section] <col4>[text]:[position] <col5>[text]:[movements] } | SELECT "season" FROM `<table0>` WHERE "position" = 1 | what is the only year with the 1st position ?
|
<table0>[RenewableEnergyProjectTypes] { <col0>[TypeID]:[INT] <col1>[TypeName]:[VARCHAR] } <table1>[RenewableEnergyProjects] { <col0>[ProjectID]:[INT] <col1>[TypeID]:[INT] <col2>[EnergyConsumption]:[FLOAT] <col3>[EnergySavings]:[FLOAT] <col4>[State]:[VARCHAR] } | SELECT `<table0>`.TypeName, SUM( RenewableEnergyProjects.EnergyConsumption ) AS TotalEnergyConsumption, SUM( RenewableEnergyProjects.EnergySavings ) AS TotalEnergySavings FROM `<table0>` INNER JOIN RenewableEnergyProjects ON `<table0>`.TypeID = RenewableEnergyProjects.TypeID WHERE RenewableEnergyProjects.State = 'CA' G... | Show the total energy consumption and total energy savings for each renewable energy project type, for projects in California. |
<table0>[diagnoses_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>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]... | SELECT `<table5>`.charttime FROM `<table5>` WHERE `<table5>`.icustay_id IN ( SELECT `<table13>`.icustay_id FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 31854 ) ) AND `<table5>`.itemid IN ( SELECT `<table16>`.itemid FROM `<table16>` WHERE `<table... | when was the first time patient 31854 since 06/15/2104 had promote w/fiber intake? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.diagnosis = "S/P FALL" AND `<table4>`.admityear < "2163" | provide the number of patients whose primary disease is s/p fall and admission year is less than 2163?
|
<table0>[table_203_200] { <col0>[number]:[region] <col1>[text]:[seed] <col2>[number]:[team] <col3>[text]:[coach] <col4>[text]:[finished] <col5>[text]:[final] <col6>[opponent]:[text] <col7>[score]:[text] } | SELECT "finished" FROM `<table0>` WHERE "team" = 'north carolina' | north carolina and unlv each made it to which round ? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Cardiopulmonary resuscitation, not otherwise specified" | which patients had cardiopulmonary resuscitation, not otherwise specified?
|
<table0>[table_2201541_3] { <col0>[partner]:[VARCHAR] <col1>[championship__titles_finals]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE championship__titles_finals_ = "French Open ( 0/1 )" | How many different partners were played with during French Open (0/1)?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVI... | SELECT DEPARTMENT_NAME, COUNT( * ) FROM `<table3>` AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY T2.DEPARTMENT_NAME | Give the name of each department and the number of employees in each in a bar chart. |
<table0>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table2>[program] { <col0>[program_id]:[int] <col... | SELECT DISTINCT `<table8>`.name FROM `<table8>` INNER JOIN offering_`<table8>` ON offering_`<table8>`.`<table8>`_id = `<table8>`.`<table8>`_id INNER JOIN course_offering ON offering_`<table8>`.offering_id = course_offering.offering_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN cou... | I 'd like to know the names of those who will teach Natural East Asia next Winter . |
<table0>[table_33006] { <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 "Home `<col2>` score" = '12.15 ( 87 )' | Which home team scored 12.15 (87)?
|
<table0>[table_1014206_2] { <col0>[number]:[VARCHAR] <col1>[commissioned]:[VARCHAR] } | SELECT _number FROM `<table0>` WHERE `<col1>` = "December 18, 1965" | List the # for ships commissioned on december 18, 1965. |
<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 ( SELECT `<table13>`.valuenum FROM `<table13>` WHERE `<table13>`.icustay_id IN ( SELECT `<table12>`.icustay_id FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.subject_id = 24921 ) ) AND `<table13>`.itemid IN ( SELECT `<table15>`.itemid FROM `<table15>` W... | how much is the variation of weight in patient 24921 measured at 2104-09-26 01:00:00 compared to the value measured at 2104-09-24 17:00:00? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytim... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table4>`.`<table4>`time FROM `<table4>` JOIN patient ON `<table4>`.patientunitstayid = patient.patientunitstayid WHERE `<table4>`.`<table4>`name = 'anemia' AND STRFTIME( '%y', `<table4>... | what are the five most frequent drugs that were prescribed within 2 months to patients aged 60 or above after they had been diagnosed with anemia, until 2102? |
<table0>[table_name_98] { <col0>[attendance]:[INTEGER] <col1>[week]:[VARCHAR] <col2>[result]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 8 AND `<col2>` = "w 42–0" | What is the Attendance after Week 8 with a Result of W 42–0? |
<table0>[table_test_29] { <col0>[int]:[bleeding] <col1>[int]:[left_ventricular_ejection_fraction_lvef] <col2>[int]:[systolic_blood_pressure_sbp] <col3>[int]:[hemoglobin_a1c_hba1c] <col4>[float]:[heart_disease] <col5>[bool]:[trauma] <col6>[bool]:[renal_disease] <col7>[bool]:[creatinine_clearance_cl] <col8>[float]:[hemor... | SELECT * FROM `<table0>` WHERE left_ventricular_ejection_fraction_lvef < 30 | left ventricle ef < 30 % |
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests... | SELECT DISTINCT instructor.name FROM `<table4>` INNER JOIN `<table4>`_offering ON `<table4>`.`<table4>`_id = `<table4>`_offering.`<table4>`_id INNER JOIN offering_instructor ON offering_instructor.offering_id = `<table4>`_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instr... | What professors teach upper-level classes ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.