schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_name_30] { <col0>[stadium]:[VARCHAR] <col1>[final_score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "27-34" | In what stadium did a game result in a final scoreline reading 27-34? |
<table0>[graduate_students] { <col0>[student_id]:[INT] <col1>[name]:[VARCHAR] <col2>[country]:[VARCHAR] } <table1>[research_grants] { <col0>[grant_id]:[INT] <col1>[student_id]:[INT] <col2>[INT]:[INSERT] } | SELECT SUM( rg.amount ) FROM `<table1>` rg JOIN graduate_students gs ON rg.student_id = gs.student_id WHERE gs.country = 'USA'; | What is the total number of research grants awarded to graduate students from the United States? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admissi... | SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.icd9_code = ( SELECT `<table2>`.icd9_code FROM `<table2>` WHERE `<table2>`.short_title = 'adv eff antilipemics' ) AND DATETIME( `<t... | since 4 years ago, how many patients were diagnosed with food/vomit pneumonitis during the same month after the previous diagnosis of adv eff antilipemics? |
<table0>[table_name_94] { <col0>[state]:[VARCHAR] <col1>[title]:[VARCHAR] <col2>[royal_house]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "duke" AND `<col2>` = "ji" | What state had a title of duke for the royal house of ji? |
<table0>[table_204_295] { <col0>[number]:[model] <col1>[text]:[origin] <col2>[text]:[type] <col3>[text]:[version] <col4>[text]:[service] <col5>[number]:[notes] } | SELECT COUNT( "model" ) FROM `<table0>` | what is the total number of models listed ? |
<table0>[Africa_Carbon_Offset] { <col0>[project]:[VARCHAR] <col1>[255]:[carbon_offset] <col2>[INT]:[INSERT] } | SELECT project, carbon_offset FROM `<table0>` ORDER BY carbon_offset DESC; | Show the carbon offset projects in Africa, sorted by the amount of carbon offset in descending order. |
<table0>[table_name_59] { <col0>[grid]:[VARCHAR] <col1>[rider]:[VARCHAR] <col2>[laps]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "fonsi nieto" AND `<col2>` > 22 | What is the total grid number when Fonsi Nieto had more than 22 laps?
|
<table0>[project_solar] { <col0>[project_name]:[TEXT] <col1>[country]:[TEXT] } | SELECT country, COUNT( * ) FROM `<table0>` GROUP BY `<col1>` ORDER BY COUNT( * ) DESC; | Which countries have the most solar power projects? |
<table0>[indian_ocean_species] { <col0>[species]:[TEXT] <col1>[biomass]:[INT] } | SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col1>` >= 100; | What is the total biomass of all species in the Indian Ocean, excluding species with a biomass less than 100? |
<table0>[table_name_19] { <col0>[new_channel_s]:[VARCHAR] <col1>[programme]:[VARCHAR] } | SELECT new_channel_s_ FROM `<table0>` WHERE `<col1>` = "gladiators" | What channel is Gladiators on? |
<table0>[table_72476] { <col0>[Locale]:[text] <col1>[Skip]:[text] <col2>[real]:[real] <col3>[real]:[real] <col4>[Ends]:[Won] <col5>[real]:[Ends] <col6>[Lost]:[real] <col7>[Blank]:[Ends] <col8>[real]:[Stolen] <col9>[Ends]:[real] <col10>[Shot]:[Pct] } | SELECT MIN( "PA" ) FROM `<table0>` WHERE "Ends Lost" = '45' | What is the minimum PA when ends lost is 45?
|
<table0>[table_name_65] { <col0>[language]:[VARCHAR] <col1>[draw]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 9 | What's the language of Draw number 9? |
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table2>[state] { <col0>[state_code]:[text] <col1>[state_name]:[t... | SELECT DISTINCT `<table15>`_code FROM `<table15>` WHERE `<table15>`_code = 'M80' | what is the seating capacity of the M80
|
<table0>[districts] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[calls] { <col0>[cid]:[INT] <col1>[INT]:[time] <col2>[DATETIME]:[response_time] <col3>[INT]:[INSERT] <col4>[districts]:[VALUES] <col5>[Downtown]:[Uptown] } | SELECT d.name, AVG( c.response_time ) as avg_response_time FROM `<table0>` d JOIN calls c ON d.did = c.did GROUP BY d.did; | What is the average response time for emergency calls in each city district? |
<table0>[table_256286_45] { <col0>[no_votes]:[VARCHAR] <col1>[description]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Forest Rehabilitation Debt Limit Amendment" | How many figures are there for No votes for the Forest Rehabilitation Debt Limit Amendment? |
<table0>[bridge_construction] { <col0>[INT]:[project_name] <col1>[TEXT]:[location] <col2>[TEXT]:[cost] <col3>[INT]:[completion_date] <col4>[DATE]:[INSERT] } | SELECT SUM( cost ) FROM `<table0>` WHERE location = 'Texas' AND YEAR( completion_date ) = 2018; | What was the total cost of bridge construction projects in 'Texas' in 2018? |
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[SuggestedEdits] { <col0>[number]:[P... | SELECT AnswerCount AS "answers", Id AS "post_link", CommentCount AS "comments" FROM `<table23>` ORDER BY AnswerCount DESC LIMIT 20 | Top 20 Most Answered Questions. Top 20 Most Answered Questions on your site. This is intended for sites like Puzzling.SE or Code Golf, but it should work anywhere. |
<table0>[Part_Faults] { <col0>[part_id]:[VARCHAR] <col1>[part_fault_id]:[VARCHAR] } <table1>[Skills_Required_To_Fix] { <col0>[part_fault_id]:[VARCHAR] } <table2>[Parts] { <col0>[part_id]:[VARCHAR] <col1>[part_name]:[VARCHAR] } | SELECT T1.part_id, T1.part_name FROM `<table2>` AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY COUNT( * ) DESC LIMIT 1 | Which part fault requires the most number of skills to fix? List part id and name. |
<table0>[table_15598] { <col0>[1910s]:[real] <col1>[1920s]:[real] <col2>[1930s]:[real] <col3>[1940s]:[real] <col4>[1950s]:[real] <col5>[1960s]:[real] <col6>[1970s]:[real] <col7>[1980s]:[real] <col8>[1990s]:[real] <col9>[2000s]:[real] } | SELECT MIN( "1910s" ) FROM `<table0>` WHERE "1950s" < '1952' AND "1980s" > '1981' | what is the lowest year in the 1910s that would be in the row were the 1950s are no larger than 1952, and the 1980s are no smaller than 1981? |
<table0>[Contractors] { <col0>[INT]:[VARCHAR] <col1>[LicenseNumber]:[VARCHAR] <col2>[City]:[VARCHAR] <col3>[State]:[VARCHAR] <col4>[Specialty]:[VARCHAR] } <table1>[ContractorProjects] { <col0>[ContractorId]:[INT] <col1>[ProjectId]:[INT] <col2>[ContractStartDate]:[DATE] <col3>[ContractEndDate]:[DATE] <col4>[ContractAmo... | SELECT AVG( cp.ContractAmount ) FROM `<table1>` cp JOIN Contractors c ON cp.ContractorId = c.Id JOIN Projects p ON cp.ProjectId = p.Id WHERE c.State = 'CA' AND c.LicenseNumber IS NOT NULL AND p.Specialty = 'Plumbing'; | What is the average contract amount for plumbing projects managed by contractors from California? |
<table0>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table1>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>... | SELECT Id AS "post_link", OwnerUserId AS "user_link", Score, Body FROM `<table22>` WHERE Body LIKE '%http%##ext?jpg##%' AND LastActivityDate >= '##Date1?2019-01-01##' AND LastActivityDate <= '##Date2?2020-01-01##' ORDER BY Id | Posts with links to files with particular extension (by LastActivityDate). |
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[... | SELECT COUNT( * ) > 0 FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 24971 AND NOT `<table13>`.dischtime IS NULL ORDER BY `<table13>`.admittime DESC LIMIT 1 ) AND `<table5>`.drug IN ( 'warfarin', 'albuterol mdi', 'glucagon' ) | have patient 24971 been prescribed with the medication warfarin, albuterol mdi, or glucagon on the last hospital visit?
|
<table0>[table_2850912_12] { <col0>[player]:[VARCHAR] <col1>[college_junior_club_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Brynäs IF ( Sweden )" | List the players for team bryn s if (sweden).
|
<table0>[table_59449] { <col0>[Outcome]:[text] <col1>[Date]:[text] <col2>[Tournament]:[text] <col3>[Surface]:[text] <col4>[Partner]:[text] <col5>[Opponents]:[final] <col6>[text]:[Score] <col7>[final]:[text] } | SELECT "Surface" FROM `<table0>` WHERE "Partner" = 'ruxandra dragomir' | What surface did Ruxandra Dragomir play on?
|
<table0>[table_name_82] { <col0>[floors]:[INTEGER] <col1>[name]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "dubai marriott harbour hotel & suites" | What is the lowest number of floors recorded for buildings built by Dubai Marriott Harbour Hotel & Suites?
|
<table0>[bank_info] { <col0>[bank_name]:[TEXT] <col1>[assets]:[NUMERIC] <col2>[region]:[TEXT] <col3>[socially_responsible]:[BOOLEAN] } | SELECT SUM( `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'Asia-Pacific' AND `<col3>` = TRUE; | What is the total assets of all banks in the Asia-Pacific region that offer socially responsible lending? |
<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 procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.admission_type = "EMERGENCY" AND procedures.short_title = "Enterovesico fist repair" | how many patients admitted in emergency have undergone the procedure with short title enterovesico fist repair? |
<table0>[departments] { <col0>[dept_id]:[INT] <col1>[dept_name]:[TEXT] } <table1>[employees] { <col0>[emp_id]:[INT] <col1>[dept_id]:[INT] <col2>[hire_date]:[DATE] <col3>[annual_salary]:[INT] <col4>[INSERT]:[departments] <col5>[dept_id]:[dept_name] <col6>[VALUES]:[Marketing] } | UPDATE employees SET annual_salary = 80000 WHERE dept_id = 2; | Update the annual salary of all employees in the IT department to 80000. |
<table0>[appointments] { <col0>[appointment_id]:[INT] <col1>[therapist_id]:[INT] <col2>[appointment_date]:[DATE] } | SELECT therapist_id, COUNT( * ) as count FROM `<table0>` WHERE YEAR( `<col2>` ) = 2022 AND QUARTER( `<col2>` ) = 1 GROUP BY `<col1>` ORDER BY count DESC LIMIT 3; | Who are the top 3 therapists with the most appointments in H1 2022? |
<table0>[table_204_226] { <col0>[number]:[municipality] <col1>[communes]:[text] <col2>[coalition]:[citizen] <col3>[text]:[coalition] <col4>[future]:[text] <col5>[independent]:[text] <col6>[winning]:[party] <col7>[coalition]:[text] <col8>[voter]:[turnout] } | SELECT ABS( ( SELECT "coalition for the citizen" FROM `<table0>` WHERE "coalition for the citizen" = 'sabire hoxhaj' ) - ( SELECT "coalition for the future" FROM `<table0>` WHERE "coalition for the future" = 'astrit sejdinaj' ) ) | what was the difference in votes -lrb- percentage -rrb- between savire hoxhaj and astrit sejdinaj in the fratar municipality ?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[regions] { <col0... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table4>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY AVG( `<col7>` ) | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of salary bin hire_date by time, and visualize them by a bar chart, show Y-axis from low to high order. |
<table0>[table_11220799_2] { <col0>[finish]:[VARCHAR] <col1>[first_air_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "March 6, 2008" | What were the results of episodes with the first air date of March 6, 2008? |
<table0>[table_name_90] { <col0>[winning_driver]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "30 may" | Who was the winning driver on 30 May?
|
<table0>[company] { <col0>[INT]:[name] <col1>[TEXT]:[founder_ethnicity] <col2>[TEXT]:[INSERT] } <table1>[investment] { <col0>[INT]:[company_id] <col1>[INT]:[INT] } | SELECT AVG( amount ) FROM `<table1>` JOIN company ON `<table1>`.company_id = company.id WHERE company.founder_ethnicity = 'Latinx' | Show the average amount of funds raised by companies founded by Latinx individuals. |
<table0>[Donations] { <col0>[donation_id]:[INT] <col1>[DECIMAL]:[program] <col2>[VARCHAR]:[255] } | SELECT MIN( amount ) FROM `<table0>` WHERE program = 'Arts'; | What is the minimum donation amount for the 'Arts' program? |
<table0>[address_status] { <col0>[status_id]:[integer] } <table1>[author] { <col0>[author_id]:[integer] <col1>[author_name]:[text] } <table2>[book_language] { <col0>[language_id]:[integer] <col1>[language_code]:[text] <col2>[language_name]:[text] } <table3>[country] { <col0>[country_id]:[integer] <col1>[country_name... | SELECT strftime( '%J', T2.status_date ) - strftime( '%J', T1.order_date ) FROM `<table12>` AS T1 INNER JOIN order_history AS T2 ON T1.order_id = T2.order_id WHERE T1.order_id = 2398 | How much time does it take to update the status of order "2398"? |
<table0>[table_11778] { <col0>[Driver]:[text] <col1>[Constructor]:[text] <col2>[Laps]:[real] <col3>[Time]:[Retired] <col4>[text]:[Grid] } | SELECT "Constructor" FROM `<table0>` WHERE "Laps" = '35' AND "Grid" > '5' | Tell me the constructor that has 35 Laps with a grid more than 5
|
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.gender = "M" AND diagnoses.long_title = "Atherosclerosis of native arteries of the extremities, unspecified" | how many male patients had the diagnosis long title atherosclerosis of native arteries of the extremities, unspecified? |
<table0>[table_26880] { <col0>[Rank]:[real] <col1>[text]:[Nationality] <col2>[text]:[1st] <col3>[text]:[2nd] <col4>[text]:[Points] <col5>[text]:[Overall] <col6>[FHT]:[Points] <col7>[text]:[Overall] <col8>[points]:[Rank] } | SELECT "Points" FROM `<table0>` WHERE "Name" = 'Thomas Morgenstern' | Name the points for thomas morgenstern
|
<table0>[marine_protected_areas] { <col0>[region]:[VARCHAR] <col1>[255]:[area_size] <col2>[FLOAT]:[INSERT] } | SELECT region, area_size - LAG( area_size ) OVER( ORDER BY region ) as area_size_difference FROM marine_protected_areas; | What is the difference in marine protected area size per region? |
<table0>[table_name_83] { <col0>[ratt]:[VARCHAR] <col1>[long]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "73" | What is the RAtt when the long is 73? |
<table0>[table_25800134_4] { <col0>[director]:[VARCHAR] <col1>[series__number]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 158 | How many directors worked on #158? |
<table0>[table_203_771] { <col0>[number]:[number] <col1>[artist]:[text] <col2>[featuring]:[text] <col3>[title]:[text] <col4>[version]:[text] <col5>[length]:[text] } | SELECT "title" FROM `<table0>` ORDER BY "#" LIMIT 1 | what is the title of the first track on the best of benassi bros greatest hit album ?
|
<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 `<table0>`.language FROM `<table0>` WHERE `<table0>`.name = "Charles Deshay" | what is language of subject name charles deshay? |
<table0>[table_2560677_1] { <col0>[fan_title]:[VARCHAR] <col1>[end_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1967-11-12" | What is the fan title with an end date of 1967-11-12?
|
<table0>[table_11654169_1] { <col0>[population_in_1000__1931]:[VARCHAR] <col1>[voivodeship_separate_city]:[VARCHAR] } | SELECT population_in_1000__1931_ FROM `<table0>` WHERE `<col1>` = "pomorskie" | What is the population in the city of Pomorskie? |
<table0>[table_name_64] { <col0>[grid]:[INTEGER] <col1>[rider]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mika kallio" | what is the grid when the rider is mika kallio? |
<table0>[SecurityIncidents] { <col0>[INT]:[analyst_id] <col1>[VARCHAR]:[incidents] <col2>[INT]:[resolution_date] } | SELECT MAX( incidents ) as max_incidents FROM `<table0>` WHERE resolution_date >= DATE_SUB( CURRENT_DATE( ), INTERVAL 1 MONTH ) GROUP BY analyst_id ORDER BY max_incidents DESC LIMIT 1; | What is the maximum number of security incidents resolved by a single analyst in the last month? |
<table0>[instructor] { <col0>[name]:[VARCHAR] <col1>[dept_name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 'Comp. Sci.' | Find the names of all instructors in computer science department
|
<table0>[employee] { <col0>[int]:[name] <col1>[varchar]:[plant] } <table1>[handling] { <col0>[int]:[employee_id] <col1>[int]:[material] <col2>[varchar]:[quantity] <col3>[int]:[INSERT] <col4>[employee]:[name] <col5>[plant]:[VALUES] <col6>[John]:[North] <col7>[Plant]:[Jane] <col8>[South]:[Plant] <col9>[Doe]:[West] <col1... | SELECT e.name, SUM( h.quantity ) as total_handled FROM `<table0>` e JOIN handling h ON e.id = h.`<table0>`_id WHERE e.plant = 'South Plant' AND material = 'Hazardous' GROUP BY e.name ORDER BY total_handled DESC LIMIT 5; | List the top 5 employees who handled the most hazardous materials in the 'South' plant in 2021. |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col... | SELECT COUNT( * ) FROM `<table3>` WHERE `<table3>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '006-62367' ) ) AND `<table3>`.`<table3>`name... | count how many times patient 006-62367 had received a lab calcium test during the last month. |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <t... | SELECT AVG( t1.c1 ) FROM ( SELECT COUNT( DISTINCT `<table0>`.patientunitstayid ) AS c1 FROM `<table0>` WHERE `<table0>`.`<table0>`name = 'anemia - iron deficiency anemia secondary to chronic blood' AND DATETIME( `<table0>`.`<table0>`time ) <= DATETIME( CURRENT_TIME( ), '-4 year' ) GROUP BY STRFTIME( '%y-%m-%d', `<table... | what is the average daily number of patients who have had anemia - iron deficiency anemia secondary to chronic blood until 4 years ago?
|
<table0>[party] { <col0>[LOCATION]:[VARCHAR] <col1>[Number_of_hosts]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` DESC LIMIT 1 | What is the location of the party with the most hosts?
|
<table0>[agricultural_innovation_projects] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[success]:[BOOLEAN] } | SELECT COUNT( * ) FROM `<table0>` WHERE country = 'Indonesia' AND `<col2>` = true AND completion_date BETWEEN '2015-01-01' AND '2017-12-31'; | How many agricultural innovation projects were successfully implemented in Indonesia between 2015 and 2017, inclusive? |
<table0>[digital_divide] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[problem] <col2>[VARCHAR]:[description] <col3>[TEXT]:[INSERT] } | UPDATE digital_divide SET description = 'Limited digital literacy and skills among older adults' WHERE id = 3; | Update the 'description' of the record with an id of 3 in the 'digital_divide' table to 'Limited digital literacy and skills among older adults' |
<table0>[cases] { <col0>[case_id]:[INT] <col1>[category]:[TEXT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'Family'; | What is the number of cases in the 'Family' category? |
<table0>[table_13426649_1] { <col0>[original_air_date]:[VARCHAR] <col1>[number]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE _number = 6 | How many different original air dates did the episode number 6 have? |
<table0>[table_203_583] { <col0>[number]:[title] <col1>[text]:[release] <col2>[number]:[6th] <col3>[gen]:[text] <col4>[handheld]:[text] <col5>[note]:[text] } | SELECT "release" FROM `<table0>` GROUP BY "release" ORDER BY COUNT( "title" ) DESC LIMIT 1 | which year had the most game releases ?
|
<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 diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Injury-hanging" AND lab.flag = "abnormal" | provide the number of patients whose diagnoses short title is injury-hanging and lab test abnormal status is abnormal?
|
<table0>[table_name_68] { <col0>[top_10]:[INTEGER] <col1>[avg_finish]:[VARCHAR] <col2>[starts]:[VARCHAR] <col3>[winnings]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col2>` = 2 AND `<col3>` = "$135,984" AND `<col1>` > 43 | What is the average top 10 score for 2 starts, winnings of $135,984 and an average finish more than 43? |
<table0>[table_name_40] { <col0>[tournament]:[VARCHAR] <col1>[runner_s__up]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ryan palmer" | Which tournaments was Ryan Palmer in as a runner-up?
|
<table0>[CREATE] { <col0>[SCHEMA]:[RuralHealth] <col1>[USE]:[RuralHealth] } <table1>[States] { <col0>[StateName]:[VARCHAR] <col1>[StateAbbreviation]:[VARCHAR] } <table2>[Hospitals] { <col0>[HospitalID]:[INT] <col1>[HospitalName]:[VARCHAR] <col2>[StateAbbreviation]:[VARCHAR] <col3>[Rural]:[BOOLEAN] <col4>[UninsuredPat... | SELECT StateAbbreviation, ( SUM( CASE WHEN `<col3>` THEN `<col4>` ELSE 0 END ) * 100.0 / AVG( `<col4>` ) ) as PercentUninsuredRural`<table2>` FROM `<table2>` GROUP BY `<col2>` ORDER BY PercentUninsuredRural`<table2>` DESC; | What is the percentage of uninsured patients among rural hospitals in each state, ordered from highest to lowest? |
<table0>[emissions] { <col0>[country]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[co2_emission] <col3>[FLOAT]:[INSERT] } | SELECT country, SUM( co2_emission ) as total_co2_emission FROM `<table0>` WHERE year = 2010 GROUP BY `<col0>` ORDER BY total_co2_emission DESC; | What is the total CO2 emission for each country in the 'emissions' table, ordered by total CO2 emission in descending order? |
<table0>[EventAttendance] { <col0>[EventID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[EventName]:[VARCHAR] <col3>[100]:[Date] <col4>[DATE]:[TotalAttendance] <col5>[INT]:[INSERT] } | SELECT * FROM `<table0>` WHERE TotalAttendance > 100; | List all events with attendance greater than 100 |
<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 AVG( t1.c1 ) FROM ( SELECT SUM( `<table6>`.`<table6>` ) AS c1 FROM `<table6>` WHERE `<table6>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.`<table8>`unitstayid IN ( SELECT `<table3>`.`<table8>`unitstayid FROM `<table3>` WHERE `<table3>`.`<tabl... | what is the average total hospital cost, that includes diagnostic ultrasound of heart - transthoracic echocardiography in 2105?
|
<table0>[school_details] { <col0>[School_ID]:[int] <col1>[Nickname]:[text] <col2>[Colors]:[text] <col3>[League]:[text] <col4>[Class]:[text] <col5>[Division]:[text] } <table1>[school] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Enrollment]:[real] <col4>[Founded]:[real] <col5>[Denomina... | SELECT Denomination, COUNT( * ) FROM `<table1>` GROUP BY `<col5>` ORDER BY COUNT( * ) DESC | Create a bar chart showing the total number across denomination, rank in desc by the Y-axis. |
<table0>[table_30060356_3] { <col0>[gt4_cup_winner]:[VARCHAR] <col1>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Spa-Francorchamps Report" | List all GT4 Cup winners played on the Spa-Francorchamps Report. |
<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 COUNT( `<col0>` ) FROM `<table2>` WHERE TitleOfCourtesy = 'Dr.' | How many employees have obtained a doctorate? |
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]... | SELECT COMMISSION_PCT, `<col9>` FROM `<table2>` WHERE `<col5>` < '2002-06-21' | For those employees who was hired before 2002-06-21, a scatter chart shows the correlation between commission_pct and manager_id . |
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varcha... | SELECT JOB_ID, SUM( `<col10>` ) FROM `<table6>` WHERE `<col5>` < '2002-06-21' GROUP BY `<col6>` | For those employees who was hired before 2002-06-21, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id.
|
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[PostsWithDeleted] { <col0>[number]:[PostTy... | SELECT t.TagName, COUNT( t.Id ) AS AnswersForTag FROM `<table3>` AS q INNER JOIN PostTags AS pt ON pt.PostId = q.Id INNER JOIN Tags AS t ON t.Id = pt.TagId INNER JOIN `<table3>` AS a ON a.ParentId = q.Id WHERE a.OwnerUserId = 68172 GROUP BY t.TagName HAVING COUNT( t.Id ) >= 5 ORDER BY 2 DESC | casperOne's Top Answers by Tags. casperOne's answers aggregated by tag, where
the number of answers per tag is greater
than or equal to five.
|
<table0>[traditional_artists] { <col0>[artist_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[country]:[VARCHAR] <col4>[art_type]:[VARCHAR] } | SELECT AVG( art_count ) FROM ( SELECT artist_id, COUNT( * ) OVER ( PARTITION BY `<col0>` ) AS art_count FROM `<table0>` ) t; | What is the average number of art pieces per artist in the 'traditional_artists' table? |
<table0>[table_name_28] { <col0>[round]:[INTEGER] <col1>[away_team]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "pohang steelers" | What is the latest round for Pohang Steelers as the away team? |
<table0>[Policyholders] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[FirstName] <col2>[VARCHAR]:[LastName] <col3>[VARCHAR]:[Age] <col4>[INT]:[Gender] <col5>[VARCHAR]:[City] } <table1>[Policies] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[PolicyholderId] <col2>[INT]:[PolicyType] <col3>[VARCHAR]:[CoverageAmount] <col4>[DECIMAL]:[FOREI... | SELECT P.City, P.FirstName, P.LastName, AVG( C.ClaimAmount ) as AverageClaimAmount, COUNT( C.Id ) as NumberOfClaims FROM `<table0>` P JOIN Policies PL ON P.Id = PL.PolicyholderId JOIN Claims C ON PL.Id = C.PolicyId WHERE P.City = 'Seattle' GROUP BY P.Id HAVING NumberOfClaims > 2 ORDER BY AverageClaimAmount DESC; | What is the average claim amount and number of claims for policyholders in the city of Seattle, WA, who have made more than 2 claims? |
<table0>[table_name_10] { <col0>[sr_no]:[INTEGER] <col1>[builder]:[VARCHAR] <col2>[secr_no]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "beyer peacock" AND `<col2>` = 769 | What is Beyer Peacock's SR number with a SECR number of 769? |
<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, SUM( 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, give me the comparison about the sum of revenue over the headquarter , and group by attribute headquarter by a bar chart, and list by the X from high to low.
|
<table0>[table_17355408_4] { <col0>[record]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "New Orleans" | Name the record for new orleans |
<table0>[vehicle_accessibility] { <col0>[vehicle_id]:[INT] <col1>[vehicle_type]:[VARCHAR] <col2>[accessible]:[BOOLEAN] } | SELECT vehicle_type, SUM( `<col2>` ) as number_of_accessible_vehicles, SUM( NOT `<col2>` ) as number_of_non_accessible_vehicles FROM `<table0>` GROUP BY vehicle_type; | Find the number of accessible and non-accessible vehicles in the fleet |
<table0>[table_29747178_2] { <col0>[title]:[VARCHAR] <col1>[series__number]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 7 | What is the title when the series # is 7?
|
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number... | SELECT `<table7>`.Id, `<table7>`.Id AS "post_link" FROM `<table7>` WHERE OwnerDisplayName = '##DisplayName##' AND PostTypeId = '##PostType##' ORDER BY `<table7>`.CreationDate DESC | Posts by a given user by displayname. |
<table0>[table_1342218_11] { <col0>[first_elected]:[VARCHAR] <col1>[candidates]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "William M. Wheeler ( D ) Unopposed" | What year was first elected william m. wheeler (d) unopposed?
|
<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( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table8>`.`<table8>`time, patient.patienthealthsystemstayid FROM `<table8>` JOIN patient ON `<table8>`.patientunitstayid = patient.patientunitstayid WHERE `<table8>`.`<table8>`name = 'oncology consultation' AND STRFTIME( '%y', `<table8>`.`<table8>`... | how many patients were diagnosed with hypercoagulable state - heparin induced thrombocytopenia in the same hospital visit in 2105 after they underwent oncology consultation?
|
<table0>[mobile_subscriptions] { <col0>[INT]:[user_id] <col1>[INT]:[subscription_plan] <col2>[VARCHAR]:[upgrade_date] <col3>[DATE]:[INSERT] } | SELECT COUNT( DISTINCT user_id ) * 100.0 / ( SELECT COUNT( DISTINCT user_id ) FROM `<table0>` ) as pct_upgraded FROM `<table0>` WHERE upgrade_date >= DATEADD( quarter, -1, GETDATE( ) ) GROUP BY subscription_plan; | What is the percentage of mobile users who upgraded their subscription plan in the last quarter? |
<table0>[table_203_67] { <col0>[number]:[place] <col1>[number]:[team] <col2>[text]:[played] <col3>[number]:[won] <col4>[number]:[draw] <col5>[number]:[lost] <col6>[number]:[goals] <col7>[nscored]:[number] <col8>[goals]:[nconceded] <col9>[number]:[number] <col10>[points]:[number] } | SELECT SUM( "played" ) FROM `<table0>` | how many games were played ?
|
<table0>[table_204_27] { <col0>[number]:[name] <col1>[text]:[position] <col2>[text]:[year] <col3>[text]:[league] <col4>[napps]:[number] <col5>[league]:[ngoals] <col6>[number]:[total] <col7>[napps]:[number] <col8>[total]:[ngoals] <col9>[number]:[notes] } | SELECT "name" FROM `<table0>` WHERE "total\ngoals" = "total\napps" | which player 's number of total goals is the same as his number of total appearances ?
|
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[n... | SELECT `<table0>`.charttime FROM `<table0>` WHERE `<table0>`.itemid IN ( SELECT `<table8>`.itemid FROM `<table8>` WHERE `<table8>`.label = 'neutrophils' ) AND `<table0>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 10624 ) AND STRFTIME( '%y-%m', `<table0>`.charttime ) = '2105-12'... | when did patient 10624 receive a neutrophils lab test, the first time, in 12/2105? |
<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 MIN( `<table1>`.age ) FROM `<table1>` WHERE `<table1>`.expire_flag = "0" AND `<table1>`.discharge_location = "DISC-TRAN CANCER/CHLDRN H" | tell me the minimum age of patients with death status as 0 and discharge location as disc-tran cancer chldrn h.
|
<table0>[table_name_23] { <col0>[snow__days_year]:[INTEGER] <col1>[sunshine__hrs_year]:[VARCHAR] <col2>[storms__days_year]:[VARCHAR] } | SELECT AVG( snow__days_year_ ) FROM `<table0>` WHERE sunshine__hrs_year_ = "1 633" AND storms__days_year_ < 29 | What is the amount of snow where the sunshine is 1 633, and storms are lower than 29? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <ta... | SELECT t2.drugname FROM ( SELECT `<table4>`.uniquepid, `<table1>`.`<table1>`time FROM `<table1>` JOIN `<table4>` ON `<table1>`.`<table4>`unitstayid = `<table4>`.`<table4>`unitstayid WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquep... | tell me the name of the drug that patient 012-58944 was prescribed in the same day after having received a trauma surgery consultation procedure since 83 months ago.
|
<table0>[CREATE] { <col0>[SCHEMA]:[urban_agriculture] } <table1>[urban_crops] { <col0>[INT]:[type] <col1>[VARCHAR]:[planting_date] <col2>[DATE]:[INSERT] } | SELECT type, planting_date FROM urban_agriculture.urban_crops; | Identify the types of crops grown in urban areas, along with their respective planting dates, from the 'urban_agriculture' schema? |
<table0>[table_name_83] { <col0>[team]:[VARCHAR] <col1>[laps]:[VARCHAR] <col2>[co_drivers]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 315 AND `<col2>` = "david brabham franck lagorce" | Name the team with laps less than 315 and co-drivers of david brabham franck lagorce? |
<table0>[table_name_97] { <col0>[bronze]:[VARCHAR] <col1>[gold]:[VARCHAR] <col2>[silver]:[VARCHAR] <col3>[total]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 0 AND `<col3>` = 7 AND `<col1>` < 1 | What is the total number of bronze a team with more than 0 silver, a total of 7 medals, and less than 1 gold medal has?
|
<table0>[drug_approval] { <col0>[INT]:[drug_id] <col1>[INT]:[country] <col2>[VARCHAR]:[INSERT] } | SELECT da.drug_id, da.country FROM `<table0>` da WHERE da.country = 'Canada'; | Which drugs have been approved in a specific country? |
<table0>[table_name_43] { <col0>[record]:[VARCHAR] <col1>[leading_scorer]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "andrew bogut ( 21 )" | What is the record of the game with Andrew Bogut (21) as the leading scorer? |
<table0>[table_23950611_2] { <col0>[rank__all__2013]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Cenovus Energy" | How many companies named cenovus energy?
|
<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 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table12>`.admittime ) ) FROM `<table12>` WHERE `<table12>`.subject_id = 40059 AND `<table12>`.dischtime IS NULL | how many hours have passed since patient 40059 was admitted to the hospital.
|
<table0>[table_28051859_3] { <col0>[tenure]:[VARCHAR] <col1>[school]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Field" | When were the members tenured in the Field school? |
<table0>[machines] { <col0>[INT]:[name] <col1>[VARCHAR]:[operational_status] <col2>[VARCHAR]:[region] <col3>[VARCHAR]:[INSERT] } | SELECT * FROM `<table0>` WHERE operational_status = 'active' AND region = 'South'; | List all the machines with an operational status of 'active' in the 'South' region |
<table0>[t_kc24] { <col0>[MED_SAFE_PAY_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[MED_CLINIC_ID]:[text] <col4>[REF_SLT_FLG]:[number] <col5>[CLINIC_SLT_DATE]:[time] <col6>[COMP_ID]:[text] <col7>[PERSON_ID]:[text] <col8>[FLX_MED_ORG_ID]:[text] <col9>[INSU_TYPE]:[text] <col10>[MED_AMO... | SELECT SUM( `<col18>` ), SUM( AMOUNT ) FROM `<table2>` WHERE `<col5>` = '086613-f' AND STA_DATE BETWEEN '2001-04-16' AND '2003-12-14' | 01年4月16日到03年12月14日这段时间里,一共开出了多少药品086613-f,看看总金额
|
<table0>[Player] { <col0>[Player_ID]:[INT] <col1>[VARCHAR]:[Date_Joined] <col2>[DATE]:[INSERT] } | INSERT INTO Player ( Player_ID, Name, Date_Joined ) VALUES ( 4, 'Bob Brown', '2020-08-10' ); | Insert a new record for a player with Player_ID 4, name 'Bob Brown', and date 2020-08-10 into the 'Player' table |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.