schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[ocean_acidification] { <col0>[INT]:[location] <col1>[TEXT]:[level] <col2>[FLOAT]:[INSERT] } | SELECT MAX( level ) FROM `<table0>` WHERE location = 'North Pacific'; | What is the maximum ocean acidification level in the North Pacific Ocean? |
<table0>[MentalHealthParity] { <col0>[IncidentID]:[INT] <col1>[IncidentDate]:[DATE] <col2>[State]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT State, COUNT( * ) FROM `<table0>` WHERE `<col1>` >= DATEADD( month, -6, GETDATE( ) ) GROUP BY State; | List the number of mental health parity incidents in each state for the last 6 months. |
<table0>[table_13185] { <col0>[Rank]:[real] <col1>[District]:[text] <col2>[2010]:[Population] <col3>[real]:[Area] <col4>[real]:[State] } | SELECT "Rank" FROM `<table0>` WHERE "Area ( km 2 )" > '3,433' AND "District" = 'lahad datu' | What is the rank with an area larger than 3,433 for the district of Lahad Datu?
|
<table0>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[customer_name]:[VARCHAR] <col2>[customer_details]:[VARCHAR] } <table1>[Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[order_status]:[VARCHAR] <col3>[date_order_placed]:[DATETIME] <col4>[order_details]:[VARCHAR] } <table2>[Invoices] ... | SELECT T3.product_name, SUM( COUNT( * ) ) FROM `<table1>` AS T1 JOIN Order_Items AS T2 JOIN Products AS T3 ON T1.order_id = T2.order_id AND T2.product_id = T3.product_id GROUP BY T3.product_name | List the name and count of each product in all orders with a pie chart.
|
<table0>[table_3674] { <col0>[real]:[real] <col1>[Title]:[text] <col2>[Directed]:[text] <col3>[Story]:[text] <col4>[Teleplay]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[viewers]:[millions] } | SELECT "Directed by" FROM `<table0>` WHERE "U.S. `<col7>` ( millions )" = '0.57' | Who directed the episode that had 0.57 million U.S. viewers?
|
<table0>[ai_projects] { <col0>[sector]:[VARCHAR] <col1>[budget]:[INT] } | SELECT MIN( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'Healthcare'; | What is the minimum budget for AI projects in the healthcare sector? |
<table0>[table_1850282_7] { <col0>[bocas_is]:[VARCHAR] <col1>[species]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Chironius multiventris septentrionalis" | Name the bocas for chironius multiventris septentrionalis
|
<table0>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table2>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table3>[state] { <col0>[state_code]:[text] <col1>[state_name]:... | SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND ... | show me flights from DALLAS to BALTIMORE |
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.marital_status = "SINGLE" AND procedures.short_title = "Int insert lead in vent" | what is the number of patients whose marital status is single and with procedure int insert lead in vent?
|
<table0>[table_74779] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] } | SELECT "Home team" FROM `<table0>` WHERE "Away `<col2>` score" = '9.10 ( 64 )' | What was the home team when the away team scored 9.10 (64)?
|
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[... | SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table6>`.charttime FROM `<table6>` JOIN admissions ON `<table6>`.hadm_id = admissions.hadm_id WHERE `<table6>`.icd9_code = ( SELECT `<table11>`.icd9_code FROM `<table11>` WHERE `<table11>`.... | what were the four most frequent drugs prescribed to female patients with age 50s during the same month after being diagnosed with acute kidney failure nos during this year? |
<table0>[clinical_trials] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[drug_type]:[VARCHAR] <col3>[255]:[trial_outcome] <col4>[VARCHAR]:[255] <col5>[trial_date]:[DATE] } | SELECT country, drug_type, COUNT( * ) as success_count, RANK( ) OVER ( PARTITION BY `<col2>` ORDER BY COUNT( * ) DESC ) as success_rank FROM `<table0>` WHERE `<col5>` BETWEEN '2021-01-01' AND '2021-12-31' AND trial_outcome = 'success' GROUP BY country, `<col2>` HAVING success_rank <= 3; | Find the top 3 countries with the highest clinical trial success rate in 2021, partitioned by drug type. |
<table0>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_per_day]:[int] <col4>[Price]:[float] } <table1>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]:[Location] } <table2>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_... | SELECT Name, Capacity FROM `<table1>` ORDER BY Capacity DESC | Show the capacity for each cinema in a bar chart, and sort from high to low by the y axis. |
<table0>[iot_sensors] { <col0>[sensor_id]:[INTEGER] <col1>[sensor_name]:[TEXT] <col2>[status]:[INTEGER] } | SELECT sensor_name, `<col2>` FROM `<table0>` WHERE `<col2>` = 1 AND `<col1>` IN ( SELECT `<col1>` FROM `<table0>`_data WHERE data_date >= CURDATE( ) - INTERVAL 1 WEEK ) ORDER BY sensor_name; | Which IoT sensors have recorded an anomaly in the last week? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[charget... | SELECT `<table6>`.organism FROM `<table6>` WHERE `<table6>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '031-23724' ) ) AND `<table6>`.cultu... | what was the name of the organism found in the last blood, venipuncture microbiology test of patient 031-23724 in 08/last year? |
<table0>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[... | SELECT DISTINCT flight.departure_time FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRAN... | what time does the flight leave DENVER going to SAN FRANCISCO on CO
|
<table0>[table_name_66] { <col0>[score]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "48-55" | Which score has a Record of 48-55? |
<table0>[employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[salary] <col3>[DECIMAL]:[gender] <col4>[VARCHAR]:[INSERT] } | SELECT department, AVG( salary ), gender FROM `<table0>` WHERE department = 'Software Engineer' GROUP BY gender; | What is the average salary of engineers in the "tech_company" database by gender? |
<table0>[model_scores] { <col0>[INT]:[model_id] <col1>[INT]:[safety_score] <col2>[FLOAT]:[category] <col3>[VARCHAR]:[255] <col4>[quarter]:[INT] <col5>[year]:[INT] } | SELECT MAX( safety_score ) FROM `<table0>` WHERE category = 'Algo Fairness' AND `<col4>` = 4 AND `<col5>` = 2021 | What is the maximum safety score for models from the 'Algo Fairness' category in Q4 2021? |
<table0>[table_47051] { <col0>[Volume]:[Issue] <col1>[text]:[Issue] <col2>[Date]:[text] <col3>[Weeks]:[text] <col4>[Song]:[text] <col5>[Artist]:[text] } | SELECT "Artist" FROM `<table0>` WHERE "Song" = ' bang bang boom ' | What is the name of the artist of ' bang bang boom '? |
<table0>[PrecisionAgriculture] { <col0>[SoilAnalysis]:[FieldID] <col1>[INT]:[SoilType] <col2>[VARCHAR]:[255] <col3>[MoistureLevel]:[FLOAT] } | SELECT FieldID, SoilType FROM PrecisionAgriculture.SoilAnalysis WHERE MoistureLevel > 0.3 AND MoistureLevel < 0.7; | Select the fields that have a moisture level between 30% and 70% |
<table0>[table_name_14] { <col0>[traditional_chinese]:[VARCHAR] <col1>[standard_order]:[VARCHAR] <col2>[simplified_chinese]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 9 AND `<col2>` = "国殇" | What is the Traditional Chinese of which is over 9? |
<table0>[timber_production] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[state] <col2>[TEXT]:[annual_production] <col3>[INT]:[INSERT] } | UPDATE timber_production SET annual_production = 1000 WHERE state = 'Oregon'; | Update the timber_production table to set the annual_production to 1000 for 'Oregon' |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heart... | SELECT COUNT( * ) > 0 FROM `<table9>` WHERE `<table9>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '027-154299' ) ) AND `<table9>`.cellpath ... | has there ever been any enteral meds given to patient 027-154299 on this month/27? |
<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 date_of_birth, COUNT( `<col4>` ) FROM `<table4>` WHERE `<col1>` = "Male" ORDER BY COUNT( `<col4>` ) DESC | Return the date of birth for all the guests with gender code 'Male', and count them by a bar chart, I want to order the number of date of birth from high to low order.
|
<table0>[fans] { <col0>[INT]:[name] <col1>[VARCHAR]:[city] <col2>[VARCHAR]:[age] <col3>[INT]:[gender] <col4>[VARCHAR]:[INSERT] } | SELECT AVG( age ) FROM `<table0>` WHERE city = 'Los Angeles' AND gender = 'Male'; | What is the average age of male fans from Los Angeles? |
<table0>[table_78166] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Record]:[text] } | SELECT "Home" FROM `<table0>` WHERE "Visitor" = 'ottawa senators' AND "Score" = '1–5' | Which home team had a visitor of Ottawa Senators with a score of 1 5? |
<table0>[community_health_center] { <col0>[name]:[TEXT] <col1>[patient_id]:[INTEGER] <col2>[age]:[INTEGER] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Community health center B' | What is the average age of patients in community health center B? |
<table0>[table_name_31] { <col0>[swimsuit]:[INTEGER] <col1>[interview]:[VARCHAR] <col2>[average]:[VARCHAR] <col3>[country]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 9.23 AND `<col3>` = "delaware" AND `<col1>` > 9.73 | Name the sum of swimsuit for average more than 9.23 for delaware for interview more than 9.73 |
<table0>[table_name_38] { <col0>[crowd]:[INTEGER] <col1>[away_team]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "collingwood" | What is the average crowd when the team Collingwood was away? |
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[... | SELECT UnitPrice * Quantity * ( 1 - Discount ) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * ( 1 - Discount ) DESC LIMIT 1 | What is the highest total price paid for an order? |
<table0>[employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[INSERT] } | SELECT department, COUNT( * ) FROM hr.employees WHERE department IN ( 'IT', 'HR' ) GROUP BY department; | List the number of employees in the "IT" and "HR" departments in the "hr" schema |
<table0>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table1>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table2>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table3>[flight] { <col0>[ai... | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE ( ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.c... | what kind of airplane is flight UA 270 from DENVER to PHILADELPHIA
|
<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 `<table2>` WHERE `<table2>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '009-13409' ) ) AND DATETIME( `<table2>`.... | has patient 009-13409 undergone any procedure until 4 years ago?
|
<table0>[table_name_15] { <col0>[horse]:[VARCHAR] <col1>[faults]:[VARCHAR] <col2>[total]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0" AND `<col2>` = 4.1 | Tell me the horse with faults of 0 when the total is 4.1 |
<table0>[City] { <col0>[integer]:[text] <col1>[CountryCode]:[text] <col2>[District]:[text] <col3>[Population]:[integer] } <table1>[Country] { <col0>[Code]:[text] <col1>[text]:[Continent] <col2>[text]:[Region] <col3>[text]:[SurfaceArea] <col4>[real]:[IndepYear] <col5>[integer]:[Population] <col6>[integer]:[LifeExpectan... | SELECT CAST( ( T1.GNP - T1.GNPOld ) AS REAL ) / T1.GNPOld FROM `<table1>` AS T1 INNER JOIN City AS T2 ON T1.Code = T2.`<table1>`Code WHERE T2.Name = 'Shanghai' | What is the GNP growth rate by the country of Shanghai? |
<table0>[table_name_69] { <col0>[ihsaa_class]:[VARCHAR] <col1>[school]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "portage" | What is the IHSAA class for Portage? |
<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 Name, `<col5>` FROM `<table0>` ORDER BY `<col5>` DESC | What are the names, and revenues for manufacturers, sorted by revenue descending in a bar graph?
|
<table0>[mobile_subscribers] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[data_allowance]:[INT] <col3>[contract_start]:[DATE] } <table1>[customer_complaints] { <col0>[INT]:[subscriber_id] <col1>[INT]:[complaint_date] <col2>[DATE]:[complaint_type] <col3>[VARCHAR]:[255] } | DELETE FROM `<table0>` WHERE id NOT IN ( SELECT subscriber_id FROM `<table1>` ); | Delete mobile subscribers who have not filed any complaints |
<table0>[Contractors] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] } <table1>[Reports] { <col0>[INT]:[contractor_id] <col1>[INT]:[report_date] <col2>[DATE]:[threat_level] <col3>[INT]:[INSERT] <col4>[Contractors]:[name] <col5>[VALUES]:[Lockheed] <col6>[Martin]:[Boeing] } | SELECT AVG( COUNT( * ) ) FROM `<table1>` r JOIN `<col4>` c ON r.contractor_id = c.id WHERE c.name = 'Lockheed Martin' GROUP BY YEAR( r.report_date ), MONTH( r.report_date ); | What is the average number of threat intelligence reports generated per month, by a specific defense contractor? |
<table0>[table_name_8] { <col0>[round]:[INTEGER] <col1>[player]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "adrien clarke" | What is the average Round number of Player Adrien Clarke? |
<table0>[table_name_92] { <col0>[event]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "toa naketoatama" | Which event has Toa Naketoatama as an opponent? |
<table0>[security_incidents] { <col0>[INT]:[risk_score] <col1>[INT]:[region] <col2>[TEXT]:[date] <col3>[DATE]:[INSERT] } | SELECT AVG( risk_score ) FROM `<table0>` WHERE region = 'APAC' AND date >= '2021-10-01' AND date < '2022-01-01'; | What is the average risk score of security incidents in the APAC region in Q4 2021? |
<table0>[lists] { <col0>[user_id]:[integer] <col1>[list_id]:[integer] <col2>[list_title]:[text] <col3>[list_movie_number]:[integer] <col4>[list_update_timestamp_utc]:[text] <col5>[list_creation_timestamp_utc]:[text] <col6>[list_followers]:[integer] <col7>[list_url]:[text] <col8>[list_comments]:[integer] <col9>[list_des... | SELECT SUM( CASE WHEN T2.movie_title = 'Innocence Unprotected' THEN T1.rating_score ELSE 0 END ) / SUM( CASE WHEN T2.movie_title = 'Innocence Unprotected' THEN 1 ELSE 0 END ) - SUM( CASE WHEN T2.movie_title = 'When Will I Be Loved' THEN T1.rating_score ELSE 0 END ) / SUM( CASE WHEN T2.movie_title = 'When Will I Be Love... | How much higher is the average rating score of the movie "Innocence Unprotected" than the movie "When Will I Be Loved"? |
<table0>[mill] { <col0>[architect_id]:[VARCHAR] } <table1>[architect] { <col0>[VARCHAR]:[name] <col1>[VARCHAR]:[gender] } <table2>[bridge] { <col0>[architect_id]:[VARCHAR] } | SELECT T1.id, T1.name, T1.gender FROM `<table1>` AS T1 JOIN bridge AS T2 ON T1.id = T2.`<table1>`_id GROUP BY T1.id HAVING COUNT( * ) = 2 UNION SELECT T1.id, T1.name, T1.gender FROM `<table1>` AS T1 JOIN mill AS T2 ON T1.id = T2.`<table1>`_id GROUP BY T1.id HAVING COUNT( * ) = 1 | What are the ids, names and genders of the architects who built two bridges or one mill? |
<table0>[table_name_82] { <col0>[top_5]:[INTEGER] <col1>[events]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 18 | What are the least Top-5 finish when the events are greater than 18? |
<table0>[table_69618] { <col0>[Representative]:[text] <col1>[Years]:[text] <col2>[State]:[text] <col3>[Party]:[text] <col4>[Lifespan]:[text] } | SELECT "Representative" FROM `<table0>` WHERE "Party" = 'whig' | Name the representative for party of whig
|
<table0>[artists] { <col0>[INT]:[name] <col1>[TEXT]:[INSERT] } <table1>[artworks] { <col0>[INT]:[title] <col1>[TEXT]:[year_created] <col2>[INT]:[artist_id] <col3>[INT]:[INSERT] } | DELETE FROM `<table1>` WHERE artist_id = 1; | Delete all artworks by artist 'Artist 1'. |
<table0>[LanguagePreservation] { <col0>[INT]:[region] <col1>[VARCHAR]:[255] <col2>[language]:[VARCHAR] <col3>[255]:[preserved] <col4>[BOOLEAN]:[INSERT] } | SELECT region, language, COUNT( * ) FROM `<table0>` WHERE preserved = TRUE GROUP BY region; | What are the names and number of languages preserved in each region? |
<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 HIRE_DATE, AVG( `<col10>` ) FROM `<table0>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col10>` ) DESC | For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the average of department_id bin hire_date by weekday in a bar chart, I want to show in desc by the y-axis.
|
<table0>[table_name_64] { <col0>[record]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 26" | What was the record for May 26? |
<table0>[table_name_28] { <col0>[races]:[INTEGER] <col1>[points]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 257 | What is the number of races that took place with points of 257?
|
<table0>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[account_name]:[VARCHAR] <col3>[other_account_details]:[VARCHAR] } <table1>[Financial_Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[previous_transaction_id]:[INTEGER] <col2>[account_id]:[INTEGER] <col3>[card_id]:[INTEGER] <... | SELECT transaction_type, COUNT( * ) FROM `<table1>` GROUP BY `<col4>` ORDER BY COUNT( * ) | What are the different transaction types, and how many transactions of each have taken place Show bar chart, and sort by the the total number in ascending.
|
<table0>[table_25828] { <col0>[Episode]:[real] <col1>[Title]:[text] <col2>[Directed]:[text] <col3>[Written]:[text] <col4>[Original]:[air] <col5>[date]:[text] <col6>[Viewers]:[millions] } | SELECT "Title" FROM `<table0>` WHERE "Written by" = 'Mark Goffman' | What was the title of the episode written by Mark Goffman?
|
<table0>[table_204_587] { <col0>[number]:[drop] <col1>[text]:[multiplayer] <col2>[map]:[text] <col3>[spec]:[ops] <col4>[mission]:[text] <col5>[face]:[map] <col6>[text]:[xbox] <col7>[360]:[release] <col8>[date]:[text] <col9>[playstation]:[release] <col10>[date]:[text] } | SELECT SUM( "face off map( s )" ) FROM `<table0>` | tell me the number of face off maps .
|
<table0>[FACULTY] { <col0>[Room]:[VARCHAR] <col1>[Rank]:[VARCHAR] <col2>[Building]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Professor" AND `<col2>` = "NEB" | Find the rooms of faculties with rank professor who live in building NEB.
|
<table0>[marine_protected_areas] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[area_size]:[FLOAT] <col3>[avg_depth]:[FLOAT] <col4>[region]:[VARCHAR] <col5>[255]:[INSERT] } | SELECT MAX( `<col2>` ) FROM `<table0>` WHERE `<col4>` = 'Atlantic'; | What is the maximum area of a marine protected area (MPA) in the Atlantic Ocean? |
<table0>[status] { <col0>[station_id]:[INTEGER] <col1>[bikes_available]:[INTEGER] <col2>[docks_available]:[INTEGER] <col3>[time]:[TEXT] } <table1>[station] { <col0>[INTEGER]:[name] <col1>[TEXT]:[lat] <col2>[NUMERIC]:[long] <col3>[NUMERIC]:[dock_count] <col4>[INTEGER]:[city] <col5>[TEXT]:[installation_date] } <table2>... | SELECT date, COUNT( `<col0>` ) FROM `<table3>` WHERE `<col6>` < ( SELECT MIN( `<col6>` ) FROM `<table3>` WHERE `<col23>` = 94107 ) | For dates had a minimum dew point smaller than any day in zip code 94107, show the total number of such days for each year using a bar chart.
|
<table0>[table_name_65] { <col0>[sales__billion]:[INTEGER] <col1>[headquarters]:[VARCHAR] <col2>[assets__billion_]:[VARCHAR] } | SELECT AVG( sales__billion_ ) AS $_ FROM `<table0>` WHERE `<col1>` = "france" AND assets__billion_$_ > 2 OFFSET 539.1 | What is the average sales in billions of the company headquartered in France with more than 2,539.1 billion in assets? |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[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] <c... | SELECT COUNT( DISTINCT `<table3>`.hadm_id ) FROM `<table3>` WHERE `<table3>`.subject_id = 2482 AND DATETIME( `<table3>`.admittime ) <= DATETIME( CURRENT_TIME( ), '-1 year' ) | count on the number of hospital visits of patient 2482 until 1 year ago. |
<table0>[memberships] { <col0>[INT]:[member_type] <col1>[VARCHAR]:[region] } <table1>[workout_data] { <col0>[member_id]:[INT] <col1>[workout_type]:[VARCHAR] <col2>[duration]:[INT] <col3>[heart_rate_avg]:[INT] <col4>[calories_burned]:[INT] <col5>[workout_date]:[DATE] } | SELECT m.id FROM `<table0>` m JOIN workout_data w ON m.id = w.member_id WHERE m.region = 'North' AND w.workout_type = 'Spin' AND w.duration > 60 GROUP BY m.id; | Which members in the North region have completed a workout of type 'Spin' with a duration of more than 60 minutes? |
<table0>[Exhibitions] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[type]:[VARCHAR] } <table1>[Tickets] { <col0>[INT]:[visitor_id] <col1>[INT]:[exhibition_id] } | SELECT `<table0>`.type, COUNT( Tickets.visitor_id ) FROM `<table0>` JOIN Tickets ON `<table0>`.id = Tickets.exhibition_id GROUP BY `<table0>`.type; | Show the number of visitors for each exhibition type |
<table0>[party] { <col0>[First_year]:[VARCHAR] <col1>[Last_year]:[VARCHAR] <col2>[Party_Theme]:[VARCHAR] } | SELECT First_year, `<col1>` FROM `<table0>` WHERE `<col2>` = "Spring" OR `<col2>` = "Teqnology" | Show the first year and last year of parties with theme 'Spring' or 'Teqnology'. |
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.gender = "F" AND `<table3>`.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" | how many patients whose gender is f and primary disease is coronary artery disease\coronary artery bypass graft /sda? |
<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 Headquarter, AVG( Revenue ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of revenue , and group by attribute headquarter, and could you display in descending by the names? |
<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 MAX( `<table4>`.days_stay ) FROM `<table4>` WHERE `<table4>`.admission_type = "ELECTIVE" | what is maximum days of hospital stay of patients whose admission type is elective?
|
<table0>[FoodSafetyRecords] { <col0>[RecordID]:[INT] <col1>[UpdateDate]:[DATE] } | SELECT EXTRACT( MONTH FROM `<col1>` ) AS Month, COUNT( * ) FROM `<table0>` WHERE `<col1>` BETWEEN '2022-01-01' AND '2022-12-31' GROUP BY EXTRACT( MONTH FROM `<col1>` ); | How many food safety records were updated in each month of 2022? |
<table0>[table_41772] { <col0>[Rank]:[real] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] } | SELECT SUM( "Gold" ) FROM `<table0>` WHERE "Nation" = 'south korea' | How much gold did South Korea get?
|
<table0>[table_25363904_2] { <col0>[season__number]:[INTEGER] <col1>[title_english]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Two marriage proposals" | Name the least season number for two marriage proposals |
<table0>[table_name_71] { <col0>[first_elected]:[INTEGER] <col1>[incumbent]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "john sullivan" | Incumbent John Sullivan has what as biggest first elected? |
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <c... | SELECT HIRE_DATE, AVG( `<col10>` ) FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table1>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY AVG( `<col10>` ) | For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of hire_date and the average of department_id bin hire_date by time, order y-axis in asc order.
|
<table0>[SmartCities] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[country]:[VARCHAR] <col4>[255]:[population] <col5>[INT]:[founded_date] <col6>[DATE]:[smart_waste] <col7>[BOOLEAN]:[green_buildings] <col8>[BOOLEAN]:[INSERT] } | SELECT SUM( population ) as total_population FROM `<table0>` WHERE `<col3>` = 'India' AND smart_waste = TRUE AND green_buildings = TRUE; | What is the total population of Smart Cities that have implemented smart waste management systems and green buildings in India? |
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]... | SELECT `<table6>`.short_title FROM `<table6>` WHERE `<table6>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table11>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.age BETWEEN 20 AND 29 ) ... | since 2104, what was the four most frequent procedure for patients 20s?
|
<table0>[table_15977768_1] { <col0>[del_pueblo]:[VARCHAR] <col1>[centennial]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1988" | Name the del pueblo for centennial 1988
|
<table0>[table_name_63] { <col0>[silver]:[VARCHAR] <col1>[nation]:[VARCHAR] <col2>[rank]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "france" AND `<col2>` > 14 | What is the total number of Silvers held by France when their rank was over 14?
|
<table0>[table_19594] { <col0>[Year]:[real] <col1>[Candidate]:[text] <col2>[Hare]:[quota] <col3>[real]:[Mandate] <col4>[text]:[List] <col5>[Votes]:[real] <col6>[List]:[Pct] } | SELECT COUNT( "List Votes" ) FROM `<table0>` WHERE "List Pct" = '20.95%' | Name the total number of list votes for 20.95%
|
<table0>[price] { <col0>[element]:[VARCHAR] <col1>[255]:[year] } | SELECT year, `<table0>` FROM `<table0>` WHERE `<col0>` = 'Gadolinium' ORDER BY year; | What is the market price trend of Gadolinium from 2018 to 2021? |
<table0>[gwyjzb] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text]... | SELECT COUNT( * ) FROM `<table0>` JOIN t_kc22 ON `<table0>`.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE `<table0>`.MED_SER_ORG_NO = '7252912' AND t_kc22.SOC_SRT_DIRE_NM = '五氟利多片( 糖衣 )' UNION SELECT COUNT( * ) FROM f`<table0>` JOIN t_kc22 ON f`<table0>`.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE f`<table0>`.MED_SER_ORG_N... | 五氟利多片(糖衣)在医疗机构7252912的检查记录有多少?
|
<table0>[table_name_13] { <col0>[laps]:[INTEGER] <col1>[class]:[VARCHAR] <col2>[entrant]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "v8" AND `<col2>` = "diet-coke racing" | What was the highest amount of laps when the class was v8 and the entrant was diet-coke racing? |
<table0>[jyjgzbb] { <col0>[JYZBLSH]:[text] <col1>[YLJGDM]:[text] <col2>[BGDH]:[text] <col3>[BGRQ]:[time] <col4>[JYRQ]:[time] <col5>[JCRGH]:[text] <col6>[JCRXM]:[text] <col7>[SHRGH]:[text] <col8>[SHRXM]:[text] <col9>[JCXMMC]:[text] <col10>[JCZBDM]:[text] <col11>[JCFF]:[text] <col12>[JCZBMC]:[text] <col13>[JCZBJGDX]:[tex... | SELECT ZYZYZDZZBM, ZYZYZDZZMC FROM `<table3>` WHERE `<col1>` = '64067392634' | 住院的病人64067392634其中医诊断的编号以及名称分别是什么啊?
|
<table0>[table_23614702_1] { <col0>[horse__power]:[VARCHAR] <col1>[warship]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Cochrane" | How many different horse-powers does the Cochrane have? |
<table0>[table_148535_2] { } | SELECT MIN( 3 AS _credits ) FROM `<table0>` | Name the most 3 credits
|
<table0>[table_name_8] { <col0>[league]:[VARCHAR] <col1>[play_offs]:[VARCHAR] <col2>[name]:[VARCHAR] } | SELECT COUNT( `<col0>` ) AS Cup FROM `<table0>` WHERE `<col1>` > 2 AND `<col2>` = "mitch cook category:articles with hcards" | What's the total number of League Cup with a Play-off larger than 2, and a Name of Mitch Cook Category:Articles with hCards?
|
<table0>[table_name_25] { <col0>[event]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "joe nameth" | In what event is the opponent Joe Nameth?
|
<table0>[table_2801442_1] { <col0>[population__2001_census]:[VARCHAR] <col1>[headquarters]:[VARCHAR] } | SELECT population__2001_census_ FROM `<table0>` WHERE `<col1>` = "Bhubaneswar" | How many people lived in the district whose headquarters is in Bhubaneswar in 2001?
|
<table0>[table_26162] { <col0>[Episode]:[text] <col1>[broadcast]:[text] <col2>[Davids]:[team] <col3>[text]:[Lees] <col4>[team]:[text] <col5>[Scores]:[text] } | SELECT "Scores" FROM `<table0>` WHERE "Lees team" = 'Kevin Bridges and Katy Wix' | When kevin bridges and katy wix are both on the less team what is the score? |
<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>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID... | SELECT LAST_NAME, `<col10>` FROM `<table6>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table2>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col2>` DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and department_id , and I want to list in descending by the X please.
|
<table0>[table_37320] { <col0>[District]:[real] <col1>[Incumbent]:[text] <col2>[2008]:[Status] <col3>[text]:[Democratic] <col4>[text]:[Republican] } | SELECT AVG( "District" ) FROM `<table0>` WHERE "2008 Status" = 're-election' AND "Democratic" = 'david price' | Which District has a 2008 Status of re-election, and a Democratic david price? |
<table0>[Concerts] { <col0>[INT]:[city] <col1>[VARCHAR]:[255] <col2>[price]:[DECIMAL] <col3>[tickets_sold]:[INT] } | SELECT SUM( `<col2>` * `<col3>` ) FROM `<table0>` WHERE city = 'New York'; | What is the total revenue from concert ticket sales in New York? |
<table0>[table_1342315_12] { <col0>[district]:[VARCHAR] <col1>[party]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Republican" | Which district has a Republican elected? |
<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>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type... | SELECT `<table4>`.icd9_code, prescriptions.drug FROM `<table4>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.subject_id = "10317" | what is procedure icd9 code and drug name of subject id 10317? |
<table0>[table_1342256_10] { <col0>[result]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Robert L. F. Sikes" | What was the result of Robert L. F. Sikes' election bid? |
<table0>[table_name_96] { <col0>[nationality]:[VARCHAR] <col1>[player]:[VARCHAR] <col2>[position]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "darren lockyer" AND `<col2>` = "five-eighth" | What was the nationality of five-eighth player Darren Lockyer? |
<table0>[BusRoutes] { <col0>[INT]:[route] } <table1>[TramRoutes] { <col0>[INT]:[route] <col1>[VARCHAR]:[INSERT] <col2>[BusRoutes]:[route] <col3>[VALUES]:[Route1] <col4>[Route2]:[Route3] } | SELECT `<table0>`.route FROM `<table0>` INNER JOIN TramRoutes ON `<table0>`.route = TramRoutes.route; | What are the bus routes that intersect with tram routes? |
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:... | SELECT Posts.Id AS "post_link", Posts.Score, v.BountyAmount, Posts.OwnerUserId AS "user_link" FROM `<table11>` AS v INNER JOIN Posts ON v.PostId = Posts.Id WHERE v.VoteTypeId = 9 AND Posts.Score < 1 AND v.BountyAmount > 0 ORDER BY Posts.Score | Bounty winning answers with low score. See http://data.stackexchange.com/stackoverflow/qe/375/bounties-won
|
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Date_of_Birth] } <table1>[entrepreneur] { <col0>[Entrepreneur_ID]:[int] <col1>[People_ID]:[int] <col2>[Company]:[text] <col3>[Money_Requested]:[real] <col4>[Investor]:[text] } | SELECT Investor, COUNT( * ) FROM `<table1>` GROUP BY `<col4>` ORDER BY `<col4>` | Display a bar chart for what are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?, and show by the X from low to high.
|
<table0>[Faculty_Participates_in] { <col0>[FacID]:[INTEGER] <col1>[actid]:[INTEGER] } <table1>[Activity] { <col0>[actid]:[INTEGER] <col1>[activity_name]:[varchar] } <table2>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[I... | SELECT Rank, COUNT( * ) FROM `<table2>` AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank | how many students are advised by each rank of faculty? List the rank and the number of students.
|
<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 ACC_Regular_Season, `<col0>` FROM `<table0>` ORDER BY `<col3>` DESC | A bar chart shows the distribution of ACC_Regular_Season and Team_ID , show x axis in descending order. |
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[Ethnicity]:[VARCHAR] <col2>[Department]:[VARCHAR] <col3>[Salary]:[INT] } | SELECT Department, AVG( `<col3>` ) as Avg_Salary FROM `<table0>` WHERE `<col1>` IN ( 'Black', 'African American' ) GROUP BY `<col2>` ORDER BY Avg_Salary ASC; | What is the average salary of employees who identify as Black or African American, per department, sorted by the lowest average salary? |
<table0>[table_35223] { <col0>[Date]:[text] <col1>[Label]:[text] <col2>[Region]:[text] <col3>[Format]:[text] <col4>[Catalog]:[text] } | SELECT "Label" FROM `<table0>` WHERE "Region" = 'germany' AND "Format" = '12" maxi' | Which Label has a Region of germany, and a Format of 12' maxi?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.