schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[characteristics] { <col0>[characteristic_id]:[number] <col1>[characteristic_type_code]:[text] <col2>[characteristic_data_type]:[text] <col3>[characteristic_name]:[text] <col4>[other_characteristic_details]:[text] } <table1>[product_characteristics] { <col0>[product_id]:[number] <col1>[characteristic_id]:[numb... | SELECT COUNT( DISTINCT t3.characteristic_name ) FROM `<table4>` AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" | How many distinct characteristic names does the product 'cumin' have?
|
<table0>[table_name_19] { <col0>[laps]:[INTEGER] <col1>[team]:[VARCHAR] <col2>[points]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mi-jack conquest racing" AND `<col2>` < 11 | Name the sum of laps for mi-jack conquest racing and points less than 11 |
<table0>[table_name_93] { <col0>[week_5]:[VARCHAR] <col1>[week_4]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nicole woodruff" | Who was the girl of the week after nicole woodruff in the same month? |
<table0>[table_name_19] { <col0>[played]:[INTEGER] <col1>[points]:[VARCHAR] <col2>[VARCHAR]:[team] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE against < 15 AND team = "bangu" AND `<col1>` > 9 | How many games played for team bangu with under 15 against, and over 9 points? |
<table0>[table_204_681] { <col0>[number]:[2011] <col1>[rank]:[number] <col2>[2010]:[rank] <col3>[number]:[2009] <col4>[rank]:[number] <col5>[2008]:[rank] <col6>[number]:[2007] <col7>[rank]:[number] <col8>[company]:[country] <col9>[text]:[2011] <col10>[arms]:[sales] <col11>[number]:[2010] <col12>[arms]:[sales] <col13>[n... | SELECT ABS( ( SELECT "2007 `<col10>` `<col20>` ( us$ m. )" FROM `<table0>` WHERE "company ( country )" = 'boeing' ) - ( SELECT "2007 `<col10>` `<col20>` ( us$ m. )" FROM `<table0>` WHERE "company ( country )" = 'general dynamics' ) ) | what is the difference of the amount sold between boeing and general dynamics in 2007 ?
|
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuid... | SELECT Id AS "User Link", Reputation, LastAccessDate, WebsiteUrl AS "Website URL", Age, Location, AboutMe AS "About me" FROM `<table3>` WHERE Location LIKE '%##location##%' AND Reputation >= '##minimumReputation##' AND Age <= '##age##' ORDER BY LastAccessDate DESC | Query for Nerd Dinner Prospects!. Users with certain minimum requirements!
|
<table0>[economic_diversification] { <col0>[INT]:[country] <col1>[VARCHAR]:[project_name] <col2>[VARCHAR]:[project_budget] <col3>[FLOAT]:[INSERT] } | DELETE FROM `<table0>` WHERE country = 'Bolivia' AND project_budget < 75000.00; | Delete all economic diversification projects in Bolivia with a budget less than 75000.00. |
<table0>[table_47728] { <col0>[Date]:[text] <col1>[Home]:[text] <col2>[Score]:[text] <col3>[Away]:[text] <col4>[Attendance]:[real] } | SELECT MAX( "Attendance" ) FROM `<table0>` WHERE "Score" = '0:2' | Which Attendance has a Score of 0:2?
|
<table0>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[text] <col7>[US_Senate]:[text] } <table1>[election] { <col0>[Election_ID]:[int] <col1>[Counties_Represented]:[text] <col2>[Di... | SELECT T2.Party, COUNT( T2.Party ) FROM `<table1>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY COUNT( T2.Party ) | Please compare the number of names of parties using a bar chart, show by the y-axis in ascending please.
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.admission_location = "CLINIC REFERRAL/PREMATURE" AND `<table2>`.diagnosis = "S/P FALL" | Give me the number of office admissions who had s/p fall as their primary disease.
|
<table0>[table_71298] { <col0>[Rank]:[real] <col1>[Nation]:[text] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] } | SELECT MIN( "Rank" ) FROM `<table0>` WHERE "Silver" < '14' AND "Bronze" < '3' AND "Total" = '4' AND "Nation" = 'ukraine' | What is the lowest rank of Ukraine with fewer than 14 silver medals, fewer than 3 bronze medals, and a total of 4 medals?
|
<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>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal... | SELECT FIRST_NAME, `<col10>` FROM `<table5>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table1>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, find first_name and department_id , and visualize them by a bar chart. |
<table0>[table_name_10] { <col0>[money_requested__]:[VARCHAR] <col1>[company_or_product_name]:[VARCHAR] } | SELECT money_requested__£_ FROM `<table0>` WHERE `<col1>` = "basstoneslap" | How much Money is requested by BassToneSlap?
|
<table0>[water_usage] { <col0>[state]:[VARCHAR] <col1>[usage]:[INT] } | SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col0>` IN ( 'California', 'New York' ); | What is the total water usage in California and New York? |
<table0>[zzmzjzjlb] { <col0>[HXPLC]:[number] <col1>[HZXM]:[text] <col2>[JLSJ]:[time] <col3>[JZJSSJ]:[time] <col4>[JZKSBM]:[text] <col5>[JZKSMC]:[text] <col6>[JZKSRQ]:[time] <col7>[JZLSH]:[number] <col8>[JZZDBM]:[text] <col9>[JZZDSM]:[text] <col10>[JZZTDM]:[number] <col11>[JZZTMC]:[text] <col12>[text]:[KLX] <col13>[numb... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM `<table5>` JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON `<table5>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZ... | 患者邹嘉禧在09年10月29日到11年7月16日,是找的哪些工号及姓名的医务人员检测指标704270的
|
<table0>[table_67878] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] } | SELECT "10:00" FROM `<table0>` WHERE "8:00" = 'movies' | What is on tv at 10:00 on the same channel that had movies on at 8:00?
|
<table0>[table_name_41] { <col0>[opponent]:[VARCHAR] <col1>[round]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "32" | What opponent has 32 as the round? |
<table0>[claims_processing] { <col0>[claim_processing_id]:[number] <col1>[claim_id]:[number] <col2>[claim_outcome_code]:[text] <col3>[claim_stage_id]:[number] <col4>[staff_id]:[number] } <table1>[claims_processing_stages] { <col0>[claim_stage_id]:[number] <col1>[next_claim_stage_id]:[number] <col2>[claim_status_name]:... | SELECT `<col1>` FROM `<table3>` UNION SELECT `<table6>`_details FROM `<table6>` | Find the names of all the customers and staff members.
|
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_labitems] { <col0... | SELECT `<table6>`.short_title FROM `<table6>` WHERE `<table6>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table12>`.charttime FROM `<table12>` JOIN admissions ON `<table12>`.hadm_id = admissions.hadm_id WHER... | what were the top three most frequent diagnoses that patients were given within 2 months after being diagnosed with hiccough until 2 years ago?
|
<table0>[table_name_66] { <col0>[draws]:[INTEGER] <col1>[byes]:[VARCHAR] <col2>[ballarat_fl]:[VARCHAR] <col3>[losses]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col3>` > 0 AND against < 1728 AND `<col2>` = "melton" AND `<col1>` < 2 | What is the lowest draws that have losses greater than 0, an against less than 1728, melton as the ballarat fl, and byes less than 2? |
<table0>[table_203_773] { <col0>[number]:[season] <col1>[number]:[network] <col2>[text]:[play] <col3>[play]:[text] <col4>[color]:[commentator] <col5>[text]:[sideline] <col6>[reporter]:[text] } | SELECT MAX( "season" ) FROM `<table0>` | in what year was the last season of cbs 's play by play ? |
<table0>[table_name_74] { <col0>[host]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "horrid henry" | What was the host of Horrid Henry? |
<table0>[Hotels] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[rating] <col3>[FLOAT]:[eco_friendly] <col4>[BOOLEAN]:[INSERT] } | SELECT name, rating FROM `<table0>` WHERE country = 'United Kingdom' AND eco_friendly = true ORDER BY rating ASC LIMIT 1; | What is the lowest-rated eco-friendly hotel in the United Kingdom? |
<table0>[citizen_complaints] { <col0>[complaint_id]:[INT] <col1>[complaint_date]:[DATE] <col2>[complaint_type]:[VARCHAR] } | DELETE FROM `<table0>` WHERE `<col2>` = 'Pothole'; | Delete records in the "citizen_complaints" table where the "complaint_type" is "Pothole" |
<table0>[attorneys] { <col0>[attorney_id]:[INT] <col1>[gender]:[VARCHAR] <col2>[total_cases]:[INT] } | SELECT MAX( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Male'; | What is the maximum number of cases handled by attorneys who identify as male? |
<table0>[sales_2022] { <col0>[sale_id]:[INT] <col1>[sale_date]:[DATE] <col2>[brand_id]:[INT] <col3>[quantity]:[INT] <col4>[price]:[DECIMAL] } | SELECT DATE_FORMAT( sale_date, '%Y-%m' ) AS quarter, SUM( `<col3>` * `<col4>` ) AS revenue FROM `<table0>` GROUP BY quarter; | Calculate the total revenue of garments sold in each quarter of 2022, showing the quarter and revenue. |
<table0>[table_name_77] { <col0>[total]:[INTEGER] <col1>[to_par]:[VARCHAR] <col2>[player]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 7 AND `<col2>` = "corey pavin" | If the player is Corey Pavin when he had a To par of over 7, what was the sum of his totals? |
<table0>[water_usage] { <col0>[state]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[usage] <col3>[FLOAT]:[INSERT] } | SELECT state, usage FROM ( SELECT state, usage, ROW_NUMBER( ) OVER ( ORDER BY usage DESC ) AS rn FROM `<table0>` WHERE year = 2021 ) t WHERE rn <= 3; | Identify the top 3 states with the highest water usage in 2021. |
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]... | SELECT DISTINCT flight.flight_id FROM `<table1>` AS AIRPORT_SERVICE_0, `<table1>` 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 = 'PITTSBURGH' AND f... | i would like to arrange a flight from DENVER to PITTSBURGH |
<table0>[bool] { <col0>[name]:[text] } <table1>[person] { <col0>[name]:[text] } <table2>[disabled] { <col0>[name]:[text] } <table3>[enlist] { <col0>[name]:[text] <col1>[organ]:[text] } <table4>[filed_for_bankrupcy] { <col0>[name]:[text] } <table5>[longest_absense_from_school] { <col0>[name]:[text] <col1>[month]:[i... | SELECT COUNT( T1.name ) FROM `<table4>` AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.`name` = T2.`name` WHERE T2.`month` > 5 | Among the students that have filed for bankruptcy, how many of them have been absent from school for over 5 months? |
<table0>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[dir... | SELECT DISTINCT flight.flight_id FROM `<table2>` AS AIRPORT_SERVICE_0, `<table2>` 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 = 'BURBANK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND f... | i'd like to travel from BURBANK to MILWAUKEE |
<table0>[table_name_59] { <col0>[driver]:[VARCHAR] <col1>[grid]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 9 | I want the driver for grid of 9 |
<table0>[table_name_30] { <col0>[competition]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1993 | Which Competition has a Year of 1993? |
<table0>[table_63481] { <col0>[Year]:[real] <col1>[Title]:[text] <col2>[Director]:[text] <col3>[Studio]:[text] <col4>[Notes]:[text] } | SELECT "Director" FROM `<table0>` WHERE "Title" = 'antz' | Who is the director of Antz?
|
<table0>[table_name_74] { <col0>[win__percentage]:[INTEGER] <col1>[year]:[VARCHAR] <col2>[crew]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2008" AND `<col2>` = "varsity 8+" | What is the total of win percentages when the year is 2008 and the crew is varsity 8+?
|
<table0>[table_42798] { <col0>[text]:[Position] <col1>[text]:[Number] <col2>[real]:[Season] <col3>[text]:[Acquisition] } | SELECT "Name" FROM `<table0>` WHERE "Acquisition via" = 'import' AND "Number" > '22' | What is the name of the player acquired via import and larger than 22?
|
<table0>[cases] { <col0>[case_id]:[INT] <col1>[precedent_type]:[VARCHAR] <col2>[billing_amount]:[FLOAT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Precedential'; | Find the average billing amount for cases with a 'Precedential' precedent type? |
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[PostFeedback] { <col0>[number]:[PostId] <c... | SELECT u.Id AS "user_link", u.DownVotes, COUNT( DISTINCT c.PostId ) AS CommentedPosts, CAST( u.DownVotes AS FLOAT ) / CAST( COUNT( DISTINCT c.PostId ) AS FLOAT ) AS Ratio FROM `<table25>` AS u INNER JOIN Comments AS c ON c.UserId = u.Id WHERE u.DownVotes > '##min?100##' GROUP BY u.Id, u.DownVotes ORDER BY CAST( u.DownV... | Ratio between downvoted and commented posts. |
<table0>[InfrastructureProjects] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[100] <col3>[status]:[VARCHAR] <col4>[evaluation_date]:[DATE] } | SELECT name FROM `<table0>` WHERE `<col3>` = 'completed' AND `<col4>` IS NULL; | List the infrastructure projects that have been completed but not yet evaluated in the 'rural_development' database. |
<table0>[table_name_1] { <col0>[date]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "windy hill" | What dates were the matches at windy hill?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.dob_year < "2120" AND lab.fluid = "Blood" | how many patients are born before 2120 and tested with blood in lab? |
<table0>[biotech_startups] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[100]:[funding] <col4>[FLOAT]:[INSERT] } | UPDATE biotech_startups SET funding = 10000000 WHERE name = 'Startup A'; | Update the funding amount for 'Startup A' to 10000000. |
<table0>[table_204_763] { <col0>[number]:[county] <col1>[text]:[number] <col2>[intersecting]:[road] <col3>[text]:[notes] <col4>[text]:[coordinates] } | SELECT SUM( "km" ) FROM `<table0>` | what are the total km for this xhart |
<table0>[EthicalAIPractices] { <col0>[Project]:[VARCHAR] <col1>[Description]:[TEXT] <col2>[StartDate]:[DATE] <col3>[EndDate]:[DATE] } | UPDATE EthicalAIPractices SET Description = 'An AI project focused on addressing climate change and promoting environmental sustainability.' WHERE Project = 'AI for Environment'; | Update the description of an ethical AI project in the EthicalAIPractices table. |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table2>[c... | SELECT t3.`<table1>`name FROM ( SELECT t2.`<table1>`name, 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 = 'agitation - moderate' ) A... | what are the four most commonly used procedures for patients who had previously been diagnosed with agitation - moderate in the same month?
|
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[job_history] { <col0>[EMPLOY... | SELECT JOB_ID, SUM( `<col10>` ) FROM `<table4>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' GROUP BY `<col6>` ORDER BY SUM( `<col10>` ) DESC | For all employees who have the letters D or S in their first name, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, I want to show by the Y in desc.
|
<table0>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credi... | SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.end_time <= '2:00' AND course_offering.start_time >= '10:00' AND course.course_id = course_offering.course_id AND course.department = 'JAZZ' AND course.number... | Between 10:00 and 2:00 is there any section of JAZZ 471 offered ? |
<table0>[table_56446] { <col0>[Rank]:[real] <col1>[Movie]:[text] <col2>[Year]:[real] <col3>[Studio]:[text] <col4>[Opening]:[Day] <col5>[Net]:[Gross] <col6>[real]:[Day] <col7>[Week]:[text] } | SELECT "Studio( s )" FROM `<table0>` WHERE "Movie" = 'ra.one' | What is the studio of ra.one?
|
<table0>[Invoices] { <col0>[invoice_number]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[invoice_date]:[DATETIME] } <table1>[Product_Categories] { <col0>[production_type_code]:[VARCHAR] <col1>[product_type_description]:[VARCHAR] <col2>[vat_rating]:[DECIMAL] } <table2>[Financial_Transactions] { <col0>[transaction_id]:[... | SELECT T1.account_id, COUNT( * ) FROM `<table2>` AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id | What is the relationship between account id and the number of transactions for each account? Return a scatter chart.
|
<table0>[marine_protected_areas] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[location]:[VARCHAR] <col3>[255]:[size] <col4>[FLOAT]:[INSERT] } | SELECT AVG( size ) FROM `<table0>` WHERE `<col2>` IN ( 'Arctic Ocean', 'Atlantic Ocean', 'Antarctic Ocean' ); | What is the average size of marine protected areas in the Arctic, Atlantic, and Antarctic Oceans? |
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>... | SELECT LOG10( Score ), LOG10( COUNT( Score ) ) FROM `<table21>` WHERE PostTypeId = 2 AND Score > 0 GROUP BY Score ORDER BY Score | Distribution of Votes on Answers (Log-Log). Note the graph in particular.
See also http://data.stackexchange.com/physics/query/504890/distribution-of-votes-on-answers-log-counts
|
<table0>[table_10693] { <col0>[Driver]:[text] <col1>[Constructor]:[text] <col2>[Laps]:[real] <col3>[Time]:[Retired] <col4>[text]:[Grid] } | SELECT MAX( "Grid" ) FROM `<table0>` WHERE "Driver" = 'maurice trintignant' AND "Laps" < '87' | Tell me the highest Grid for Maurice Trintignant and laps less than 87
|
<table0>[Satellites] { <col0>[SatelliteID]:[INT] <col1>[VARCHAR]:[100] <col2>[Manufacturer]:[VARCHAR] <col3>[LaunchDate]:[DATE] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Aerospace Corp' AND `<col3>` >= DATEADD( year, -5, GETDATE( ) ); | How many satellites have been deployed by Aerospace Corp in the last 5 years? |
<table0>[gas_station] { <col0>[Station_ID]:[int] <col1>[Open_Year]:[int] <col2>[Location]:[text] <col3>[Manager_Name]:[text] <col4>[Vice_Manager_Name]:[text] <col5>[Representative_Name]:[text] } <table1>[company] { <col0>[Company_ID]:[int] <col1>[Rank]:[int] <col2>[Company]:[text] <col3>[Headquarters]:[text] <col4>[Ma... | SELECT Company, COUNT( * ) FROM `<table2>` AS T1 JOIN company AS T2 ON T1.Company_ID = T2.Company_ID GROUP BY T1.Company_ID ORDER BY Company | For each company id, what are the companies and how many gas stations does each one operate Plot them as bar chart, and display Company in asc order.
|
<table0>[CREATE] { <col0>[SCHEMA]:[exists] <col1>[funding]:[USE] } <table1>[exists] { <col0>[research_funding]:[INT] <col1>[project_id]:[INT] <col2>[country]:[VARCHAR] <col3>[255]:[funding] <col4>[DECIMAL]:[INSERT] <col5>[research_funding]:[project_id] <col6>[country]:[funding] <col7>[VALUES]:[Australia] <col8>[700000... | SELECT SUM( funding ) FROM funding.research_funding WHERE country = 'Australia'; | What is the total funding for genetic research projects in Australia? |
<table0>[Product_Categories] { <col0>[production_type_code]:[VARCHAR] <col1>[product_type_description]:[VARCHAR] <col2>[vat_rating]:[DECIMAL] } <table1>[Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_order_placed]:[DATETIME] <col3>[order_details]:[VARCHAR] } <table2>[Products] { <col0>... | SELECT product_id, COUNT( DISTINCT `<col1>` ) FROM `<table5>` | Show the product ids and the number of unique orders containing each product by a scatter chart. |
<table0>[table_1342393_10] { <col0>[district]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Gordon Lee" | what is the section where gordon lee ran |
<table0>[table_name_26] { <col0>[date]:[VARCHAR] <col1>[attendance]:[VARCHAR] <col2>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 875 AND `<col2>` = "platense" | What was date was the attendance larger than 875 against Platense? |
<table0>[engagements] { <col0>[engagement_id]:[INT] <col1>[post_id]:[INT] <col2>[user_id]:[INT] <col3>[engagement_date]:[DATE] } <table1>[posts] { <col0>[post_id]:[INT] <col1>[user_id]:[INT] <col2>[hashtags]:[VARCHAR] <col3>[255]:[region] <col4>[VARCHAR]:[255] <col5>[INSERT]:[engagements] <col6>[engagement_id]:[post_i... | SELECT COUNT( DISTINCT `<table0>`.user_id ) FROM `<table0>` JOIN posts ON `<table0>`.post_id = posts.post_id WHERE ( posts.hashtags LIKE '%#music%' OR posts.hashtags LIKE '%#dance%' ) AND posts.region = 'Europe' AND `<table0>`.engagement_date >= NOW( ) - INTERVAL 6 MONTH; | What is the total number of unique users who engaged with posts with the hashtag '#music' or '#dance' in the 'Europe' region in the last 6 months? |
<table0>[artists] { <col0>[number]:[name] } <table1>[sqlite_sequence] { <col0>[name]:[text] <col1>[seq]:[text] } <table2>[employees] { <col0>[number]:[last_name] <col1>[text]:[first_name] <col2>[text]:[title] <col3>[text]:[reports_to] <col4>[number]:[birth_date] <col5>[time]:[hire_date] <col6>[time]:[address] <col7>[... | SELECT billing_state, COUNT( * ), SUM( total ) FROM `<table6>` WHERE billing_state = "CA" | List the number of invoices and the invoice total from California.
|
<table0>[user_interactions] { <col0>[user_id]:[INT] <col1>[algorithm_name]:[VARCHAR] <col2>[255]:[INSERT] } <table1>[explainable_algorithms] { <col0>[algorithm_name]:[VARCHAR] <col1>[255]:[INSERT] } | SELECT `<col0>` FROM `<table0>` ui WHERE `<col1>` NOT IN ( SELECT `<col1>` FROM `<table1>` ) GROUP BY `<col0>` HAVING COUNT( `<col0>` ) > 0; | Find users who have not interacted with any explainable AI algorithms. |
<table0>[table_name_80] { <col0>[result]:[VARCHAR] <col1>[goal]:[VARCHAR] <col2>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 12 AND `<col2>` = "pasadena" | What was the result of the game with more than 12 goals at Pasadena?
|
<table0>[table_55618] { <col0>[Network]:[text] <col1>[text]:[text] <col2>[text]:[text] } | SELECT "10:00 PM" FROM `<table0>` WHERE "8:00 PM" = 'my thursday night movie' | Name the 10:00pm when 8:0pm is my thursday night movie |
<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 COUNT( DISTINCT `<table7>`.uniquepid ) FROM `<table7>` WHERE `<table7>`.`<table7>`unitstayid IN ( SELECT `<table6>`.`<table7>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`name = 'ammonia' ) | how many patients were given a ammonia test?
|
<table0>[Exhibitions] { <col0>[exhibition_id]:[INT] <col1>[museum_name]:[VARCHAR] <col2>[255]:[artist_id] <col3>[INT]:[artwork_id] <col4>[INT]:[INSERT] } | SELECT COUNT( artwork_id ) FROM `<table0>` WHERE `<col1>` = 'Museum X'; | How many artworks were exhibited in 'Museum X'? |
<table0>[table_5512] { <col0>[RBIs]:[real] <col1>[Player]:[text] <col2>[Team]:[text] <col3>[Date]:[text] <col4>[Opponent]:[text] } | SELECT "Player" FROM `<table0>` WHERE "Date" = 'june 14, 1969' | Which player is associated with the date June 14, 1969?
|
<table0>[table_57168] { <col0>[Round]:[real] <col1>[Grand]:[Prix] <col2>[text]:[Date] <col3>[text]:[Location] <col4>[text]:[Pole] <col5>[Position]:[text] <col6>[Fastest]:[Lap] <col7>[text]:[Winning] <col8>[Driver]:[text] <col9>[Winning]:[Constructor] <col10>[text]:[Report] } | SELECT "Date" FROM `<table0>` WHERE "Location" = 'hermanos rodríguez' | Which date was hermanos rodr guez the location?
|
<table0>[emergency_calls] { <col0>[INT]:[neighborhood] <col1>[VARCHAR]:[response_time] <col2>[FLOAT]:[INSERT] } | SELECT AVG( response_time ) FROM `<table0>` WHERE neighborhood = 'Westside'; | What is the average response time for emergency calls in the 'Westside' neighborhood? |
<table0>[table_name_39] { <col0>[bronze]:[INTEGER] <col1>[total]:[VARCHAR] <col2>[silver]:[VARCHAR] <col3>[nation]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 0 AND `<col3>` = "soviet union" AND `<col1>` > 3 | What is the total sum of bronze medals for the Soviet Union when there are more than 0 silver medals and more than 3 total medals? |
<table0>[mental_health_parity] { <col0>[INT]:[worker_id] <col1>[INT]:[incident_date] <col2>[DATE]:[violation_count] <col3>[INT]:[INSERT] } <table1>[community_health_workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[region] <col2>[VARCHAR]:[INSERT] } | SELECT SUM( violation_count ) FROM `<table0>` INNER JOIN community_health_workers ON `<table0>`.worker_id = community_health_workers.id WHERE community_health_workers.region = 'New York'; | What is the number of mental health parity violation incidents reported by community health workers in New York? |
<table0>[exhibition_record] { <col0>[Exhibition_ID]:[int] <col1>[Date]:[text] <col2>[Attendance]:[int] } <table1>[exhibition] { <col0>[Exhibition_ID]:[int] <col1>[Year]:[int] <col2>[Theme]:[text] <col3>[Artist_ID]:[int] <col4>[Ticket_Price]:[real] } <table2>[artist] { <col0>[Artist_ID]:[int] <col1>[text]:[Country] <c... | SELECT Year, COUNT( `<col1>` ) FROM `<table1>` GROUP BY `<col2>` | Stacked bar of year and the number of year colored by Theme
|
<table0>[ref_service_types] { <col0>[service_type_code]:[text] <col1>[parent_service_type_code]:[text] <col2>[service_type_description]:[text] } <table1>[invoices] { <col0>[invoice_id]:[number] <col1>[order_id]:[number] <col2>[payment_method_code]:[text] <col3>[product_id]:[number] <col4>[order_quantity]:[text] <col5>... | SELECT `<col1>` FROM `<table3>` GROUP BY `<col1>` HAVING AVG( `<col2>` ) < 1000000 | Find the product names whose average product price is below 1000000. |
<table0>[players] { <col0>[INT]:[name] <col1>[VARCHAR]:[age] <col2>[INT]:[INSERT] } <table1>[events] { <col0>[INT]:[name] <col1>[VARCHAR]:[date] <col2>[DATE]:[INSERT] } | SELECT `<table0>`.name FROM `<table0>` INNER JOIN events ON `<table0>`.id = events.id WHERE events.date >= DATEADD( month, -3, GETDATE( ) ); | List the names of players who have played in esports events, in the last 3 months, in any country. |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[locations] { <col0>[LOCATION... | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday. |
<table0>[schema1] { <col0>[vulnerabilities]:[INT] <col1>[name]:[VARCHAR] <col2>[255]:[severity] <col3>[VARCHAR]:[description] <col4>[TEXT]:[date_discovered] <col5>[DATE]:[last_observed] <col6>[DATE]:[INSERT] } | SELECT MAX( severity ) FROM schema1.vulnerabilities; | What is the maximum severity of vulnerabilities in the 'vulnerabilities' table? |
<table0>[table_name_59] { <col0>[tms]:[VARCHAR] <col1>[season]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2013" | which Tms has a Season of 2013? |
<table0>[table_30951] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Ground]:[text] <col8>[Date]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Home team" = 'Essendon' | When was the home team Essendon? |
<table0>[genre] { <col0>[g_name]:[varchar2] <col1>[rating]:[varchar2] <col2>[most_popular_in]:[varchar2] } <table1>[song] { <col0>[song_name]:[varchar2] <col1>[artist_name]:[varchar2] <col2>[country]:[varchar2] <col3>[f_id]:[number] <col4>[genre_is]:[varchar2] <col5>[rating]:[number] <col6>[languages]:[varchar2] <col7... | SELECT formats, COUNT( * ) FROM `<table3>` GROUP BY `<col4>` | Show me a pie chart for how many songs were released for each format?
|
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[... | SELECT SALARY, `<col10>` FROM `<table3>` WHERE `<col5>` < '2002-06-21' | For those employees who was hired before 2002-06-21, show me about the correlation between salary and department_id in a scatter chart. |
<table0>[status] { <col0>[statusId]:[INTEGER] } <table1>[circuits] { <col0>[circuitId]:[INTEGER] <col1>[circuitRef]:[TEXT] <col2>[name]:[TEXT] <col3>[location]:[TEXT] <col4>[country]:[TEXT] <col5>[lat]:[REAL] <col6>[lng]:[REAL] <col7>[alt]:[TEXT] <col8>[url]:[TEXT] } <table2>[pitStops] { <col0>[raceId]:[INTEGER] <col... | SELECT name, COUNT( `<col2>` ) FROM `<table10>` AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC | What are the number of the names of all the Japanese constructors that have earned more than 5 points?, and could you show how many name in desc order please?
|
<table0>[AutoShows] { <col0>[VARCHAR]:[255] <col1>[EVModel]:[VARCHAR] <col2>[255]:[INSERT] } | SELECT Show, COUNT( * ) FROM `<table0>` GROUP BY Show ORDER BY COUNT( * ) DESC LIMIT 1; | Which auto show had the most number of electric vehicle models displayed? |
<table0>[Guests] { <col0>[guest_id]:[INTEGER] <col1>[gender_code]:[CHAR] <col2>[guest_first_name]:[VARCHAR] <col3>[guest_last_name]:[VARCHAR] <col4>[date_of_birth]:[DATETIME] } <table1>[Apartments] { <col0>[apt_id]:[INTEGER] <col1>[building_id]:[INTEGER] <col2>[apt_type_code]:[CHAR] <col3>[apt_number]:[CHAR] <col4>[ba... | SELECT facility_code, COUNT( `<col1>` ) FROM `<table2>` AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY `<col1>` ORDER BY `<col1>` | A bar chart for showing the number of the facility codes of apartments with more than 4 bedrooms, and I want to display in ascending by the facility_code. |
<table0>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[PostHistoryTypes] { <col0>[number]:[text] } <table3>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <... | SELECT COUNT( * ) AS N, Reputation FROM `<table26>` WHERE Reputation < 2100 GROUP BY Reputation ORDER BY Reputation | Total Number of Users with Small Rep. |
<table0>[table_name_78] { <col0>[playoffs]:[VARCHAR] <col1>[manager]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "spencer abbott" AND `<col2>` = 1919 | Manager of spencer abbott, and a Year of 1919 involves what playoffs? |
<table0>[table_22180] { <col0>[Season]:[real] <col1>[Average]:[Attendance] <col2>[Home]:[text] <col3>[Highest]:[Attendance] <col4>[Home]:[text] <col5>[Average]:[Attendance] <col6>[Away]:[text] <col7>[Highest]:[Attendance] <col8>[Away]:[text] <col9>[Division]:[Section] <col10>[text]:[Level] <col11>[text]:[Average] <col1... | SELECT "Division / Section" FROM `<table0>` WHERE "Season" = '2012' | In which division did they compete in 2012?
|
<table0>[Programs] { <col0>[ProgramID]:[int] <col1>[ProgramName]:[varchar] <col2>[FundingSource]:[varchar] <col3>[Attendance]:[int] } | SELECT `<col1>` FROM `<table0>` WHERE `<col2>` = 'Private Donor' AND `<col3>` > ( SELECT 0.5 * SUM( `<col3>` ) FROM `<table0>` WHERE `<col2>` = 'Private Donor' ); | Which programs funded by private donors had over 50% attendance? |
<table0>[table_75281] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Record]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Score" = '2–7' AND "Record" = '5–8–2' | Which Date has a Score of 2 7, and a Record of 5 8 2? |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col... | SELECT `<table1>`.hospitaladmittime FROM `<table1>` WHERE `<table1>`.uniquepid = '030-8973' AND DATETIME( `<table1>`.hospitaladmittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) | what was the time of patient 030-8973's hospital admission last year?
|
<table0>[Documents] { <col0>[document_name]:[VARCHAR] <col1>[template_id]:[VARCHAR] } <table1>[Templates] { <col0>[template_id]:[VARCHAR] <col1>[template_type_code]:[VARCHAR] } | SELECT T2.document_name FROM `<table1>` AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" | Show all document names using templates with template type code BK. |
<table0>[table_name_87] { <col0>[name]:[VARCHAR] <col1>[apps]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 118 | What name has 118 as the apps? |
<table0>[table_name_9] { <col0>[round]:[INTEGER] <col1>[pick]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 7 | WHAT IS THE ROUND WITH PICK OF 7? |
<table0>[table_24762] { <col0>[Event]:[real] <col1>[Round]:[real] <col2>[Circuit]:[text] <col3>[Date]:[text] <col4>[Pole]:[Position] <col5>[text]:[Fastest] <col6>[Lap]:[text] <col7>[Winning]:[driver] <col8>[text]:[Winning] <col9>[team]:[text] } | SELECT COUNT( "Event" ) FROM `<table0>` WHERE "Fastest Lap" = 'Tim Macrow' AND "Pole Position" = 'Joey Foster' | How many times did Tim Macrow and Joey Foster both got the fastest lap and pole position respectively?
|
<table0>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[text] <col7>[US_Senate]:[text] } <table1>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[re... | SELECT Comptroller, COUNT( Comptroller ) FROM `<table2>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY COUNT( Comptroller ) | Find the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties, and count them by a bar chart, and rank the number of comptroller from low to high order.
|
<table0>[Student_Course_Enrolment] { <col0>[registration_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[course_id]:[INTEGER] <col3>[date_of_enrolment]:[DATETIME] <col4>[date_of_completion]:[DATETIME] } <table1>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table2>[Courses] { <col0>[cou... | SELECT date_test_taken, COUNT( `<col1>` ) FROM `<table4>` WHERE `<col2>` = "Pass" GROUP BY `<col1>` | Find the number of the dates of the tests taken with result 'Pass'. |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.admission_type = "EMERGENCY" AND prescriptions.drug = "Abacavir Sulfate" | how many patients admitted to emergency were treated with abacavir sulfate?
|
<table0>[table_36508] { <col0>[Res]:[text] <col1>[Record]:[text] <col2>[Opponent]:[text] <col3>[Method]:[text] <col4>[Event]:[text] <col5>[Round]:[real] <col6>[Time]:[text] <col7>[Location]:[text] } | SELECT "Method" FROM `<table0>` WHERE "Time" = '4:15' | What was the method of the bout lasting 4:15?
|
<table0>[table_203_835] { <col0>[number]:[season] <col1>[text]:[club] <col2>[text]:[country] <col3>[text]:[competition] <col4>[text]:[apps] <col5>[number]:[goals] } | SELECT "goals" FROM `<table0>` WHERE "season" = '2001/02' | how many goals did gunter thiebaut score in the 2001/02 season ?
|
<table0>[table_name_61] { <col0>[goal]:[VARCHAR] <col1>[competition]:[VARCHAR] <col2>[score]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "euro 2012 q" AND `<col2>` = "3-0" | How many goals when the score is 3-0 in the euro 2012 q? |
<table0>[accounts] { <col0>[account_id]:[number] <col1>[customer_id]:[number] <col2>[date_account_opened]:[time] <col3>[account_name]:[text] <col4>[other_account_details]:[text] } <table1>[financial_transactions] { <col0>[transaction_id]:[number] <col1>[account_id]:[number] <col2>[invoice_number]:[number] <col3>[trans... | SELECT T1.account_name, T1.other_account_details FROM `<table0>` AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling" | What are the names and other details for accounts corresponding to the customer named Meaghan Keeling? |
<table0>[table_203_674] { <col0>[number]:[name] <col1>[text]:[mark] <col2>[text]:[system] <col3>[text]:[number] <col4>[number]:[successor] <col5>[text]:[notes] } | SELECT "name" FROM `<table0>` ORDER BY "to" - "from" LIMIT 1 | what now defunct railroad existed for the shortest time ? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.