schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<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( `<col2>` ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | For those records from the products and each product's manufacturer, find headquarter and the sum of price , and group by attribute headquarter, and visualize them by a bar chart.
|
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labres... | SELECT `<table8>`.organism FROM `<table8>` WHERE `<table8>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '031-3355' AND `<table9>`.hospitaldi... | what was the name of the organism found in the microbiology test of the first other of patient 031-3355 on the current hospital visit? |
<table0>[sales] { <col0>[INT]:[artwork_id] <col1>[INT]:[location] <col2>[TEXT]:[price] <col3>[DECIMAL]:[INSERT] } | SELECT SUM( price ) FROM `<table0>` WHERE location = 'Paris'; | What is the total value of artwork sales in Paris? |
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>... | SELECT t2.drugname FROM ( SELECT `<table2>`.uniquepid, `<table9>`.`<table9>`time, `<table2>`.`<table2>`healthsystemstayid FROM `<table9>` JOIN `<table2>` ON `<table9>`.`<table2>`unitstayid = `<table2>`.`<table2>`unitstayid WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid... | what was the name of a drug that patient 006-71495 was prescribed during the same hospital visit after having received the analgesics - narcotic analgesic procedure until 02/2105? |
<table0>[table_name_93] { <col0>[points]:[INTEGER] <col1>[time___s]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE time___s__ = "81.78" | What is the average amount of points when the time (s) is 81.78? |
<table0>[baseball_players] { <col0>[player_id]:[INT] <col1>[player_name]:[VARCHAR] <col2>[home_runs]:[INT] } | SELECT player_name, home_runs FROM baseball_players; | How many home runs did each baseball player hit in the 2022 season? |
<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, `<col2>` FROM `<table1>` WHERE `<col2>` >= 180 ORDER BY `<col2>` DESC, Name | Return a bar chart on what are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending? |
<table0>[table_148535_2] { <col0>[hand]:[VARCHAR] } | SELECT MIN( 2 AS _credits ) FROM `<table0>` WHERE `<col0>` = "Straight" | Name the least 2 credits for straight hand
|
<table0>[table_name_8] { <col0>[gross_revenue__2011]:[VARCHAR] <col1>[state]:[VARCHAR] } | SELECT gross_revenue__2011_ FROM `<table0>` WHERE `<col1>` = "mo" | What is the gross revenue in 2011 for MO?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Send 500mg Vial" | what is the number of patients whose drug name is send 500mg vial? |
<table0>[Faculty] { <col0>[Sex]:[VARCHAR] <col1>[Rank]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col0>` = 'F' AND `<col1>` = "Professor" | How many female Professors do we have? |
<table0>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degr... | SELECT DISTINCT course_offering.end_time, course_offering.start_time, semester.semester, semester.year FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'AOSS' AND cou... | Are there times in the morning for the AOSS 521 course ? |
<table0>[table_7020] { <col0>[Year]:[text] <col1>[Team]:[text] <col2>[SckY]:[text] <col3>[Int]:[text] <col4>[Rate]:[text] <col5>[RAtt]:[text] <col6>[RYds]:[text] <col7>[RAvg]:[text] <col8>[RLng]:[text] <col9>[R1st]:[text] } | SELECT "RAvg" FROM `<table0>` WHERE "Year" = '2003' | What was the Ravg for 2003?
|
<table0>[table_204_235] { <col0>[number]:[season] <col1>[text]:[team] <col2>[text]:[country] <col3>[text]:[competition] <col4>[text]:[matches] <col5>[number]:[goals] } | SELECT COUNT( "season" ) FROM `<table0>` WHERE "matches" > 20 | how many teams had above 20 matches in the season ? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table0>`.`<table0>`time, patient.patienthealthsystemstayid FROM `<table0>` JOIN patient ON `<table0>`.patientunitstayid = patient.patientunitstayid WHERE `<table0>`.`<table0>`name = 'analgesics - narcotic analgesic' AND DATETIME( `<table0>`.`<tabl... | how many patients have undergone antiplatelet agent - aspirin during a year before after analgesics - narcotic analgesic procedure within the same hospital visit? |
<table0>[Workplace_Safety] { <col0>[industry]:[VARCHAR] <col1>[workplace_id]:[INT] <col2>[safety_issue]:[BOOLEAN] } | SELECT industry, ( SUM( `<col2>` ) / COUNT( * ) ) * 100 as safety_issue_percentage FROM `<table0>` WHERE `<col0>` = 'Retail' GROUP BY industry; | What percentage of workplaces in the retail industry have reported safety issues? |
<table0>[table_name_12] { <col0>[type]:[VARCHAR] <col1>[opened]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1982" | Which type opened in 1982?
|
<table0>[table_57438] { <col0>[text]:[Years] <col1>[text]:[Area] <col2>[text]:[Authority] <col3>[text]:[Decile] <col4>[text]:[Roll] } | SELECT "Years" FROM `<table0>` WHERE "Authority" = 'state integrated' AND "Decile" = '9' | What are the years when the authority was state integrated and a decile of 9?
|
<table0>[table_name_41] { <col0>[purse]:[VARCHAR] <col1>[champion]:[VARCHAR] <col2>[venue]:[VARCHAR] } | SELECT COUNT( purse___ ) AS $__ FROM `<table0>` WHERE `<col1>` = "sherri steinhauer" AND `<col2>` = "woburn golf and country club" | What was the purse when Sherri Steinhauer was champion at Woburn Golf and Country Club?
|
<table0>[table_name_99] { <col0>[part_1]:[VARCHAR] <col1>[part_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "fraus" | What is Part 1, when Part 2 is 'fraus'? |
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[... | SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table6>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col9>` ) DESC | For those employees who was hired before 2002-06-21, find hire_date and the average of manager_id bin hire_date by weekday, and visualize them by a bar chart, and order by the y-axis in descending. |
<table0>[table_name_83] { <col0>[division]:[VARCHAR] <col1>[apps]:[VARCHAR] <col2>[country]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 5 AND `<col2>` = "greece" | Name the total number of division for apps more than 5 for greece |
<table0>[table_name_6] { <col0>[tournament]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE 1992 = "a" | What's the tournament when 1992 is A? |
<table0>[table_69431] { <col0>[text]:[text] <col1>[text]:[text] <col2>[text]:[text] } | SELECT "9:30" FROM `<table0>` WHERE "8:30" = 'la porte des étoiles' | What is the 9:30 feature with la porte des toiles at 8:30? |
<table0>[table_38724] { <col0>[Date]:[text] <col1>[City]:[text] <col2>[Opponent]:[text] <col3>[Results]:[u00b9] <col4>[text]:[Type] <col5>[game]:[text] } | SELECT "City" FROM `<table0>` WHERE "Opponent" = 'norway' | What city did Yugoslavia play Norway in?
|
<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 T2.UnitPrice * T2.Quantity + T1.Freight FROM `<table6>` AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID ORDER BY T2.UnitPrice * T2.Quantity + T1.Freight DESC LIMIT 2 | How much is the total purchase price, including freight, of the top 2 most expensive products? |
<table0>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:... | SELECT p.Id AS "post_link", u.Id AS "user_link", p.Score, p.CreationDate, p.ViewCount, p.Tags FROM `<table11>` AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE u.Id IN ( '##list##' ) AND p.PostTypeId = 1 ORDER BY p.Id DESC LIMIT 100 | Recent questions from given users. |
<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>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[eve... | SELECT COUNT( * ) > 0 FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.subject_id = 1918 AND NOT `<table3>`.dischtime IS NULL ORDER BY `<table3>`.admittime DESC LIMIT 1 ) AND `<table12>`.drug = 'ampicillin-sulbactam' | was the ampicillin-sulbactam prescribed to patient 1918 in their last hospital visit? |
<table0>[table_16651] { <col0>[real]:[Episode] <col1>[text]:[Air] <col2>[Date]:[text] <col3>[Rating]:[text] <col4>[Share]:[real] <col5>[Rating]:[Share] <col6>[u201349]:[text] <col7>[Viewers]:[text] <col8>[Timeslot]:[Rank] <col9>[real]:[Night] <col10>[Rank]:[text] <col11>[Overall]:[Rank] } | SELECT "Viewers ( m )" FROM `<table0>` WHERE "Episode" = 'Legacy' | what's the viewers (m) with episode of 'legacy |
<table0>[RestaurantInspections] { <col0>[restaurant_id]:[INT] <col1>[inspection_date]:[DATE] <col2>[score]:[INT] <col3>[location]:[VARCHAR] } | SELECT restaurant_id, AVG( `<col2>` ) AS avg_score FROM `<table0>` WHERE `<col3>` = 'California' GROUP BY restaurant_id; | What is the average food safety score for each restaurant in California? |
<table0>[table_204_480] { <col0>[number]:[title] <col1>[text]:[alternate] <col2>[title]:[text] <col3>[year]:[number] <col4>[manufacturer]:[text] <col5>[genre]:[text] <col6>[max]:[players] } | SELECT COUNT( * ) FROM `<table0>` WHERE "year" < 1979 | how many arcade games were released before 1979 ?
|
<table0>[table_204_592] { <col0>[number]:[number] <col1>[title]:[text] <col2>[type]:[text] <col3>[opening]:[ndate] <col4>[text]:[closing] <col5>[ndate]:[text] <col6>[performances]:[number] <col7>[comment]:[text] } | SELECT "title" FROM `<table0>` ORDER BY "performances" DESC LIMIT 1 | which title has the largest number of performances ? |
<table0>[table_25548213_1] { <col0>[title]:[VARCHAR] <col1>[us_viewers__million]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE us_viewers__million_ = "4.65" | What was the name of the episode that had 4.65 million viewers? |
<table0>[music_streams] { <col0>[artist_name]:[VARCHAR] <col1>[255]:[country] <col2>[VARCHAR]:[streams] <col3>[INT]:[INSERT] } | SELECT artist_name, SUM( streams ) as total_streams FROM `<table0>` WHERE country = 'Brazil' GROUP BY `<col0>` ORDER BY total_streams DESC LIMIT 3; | Who are the top 3 music artists with the highest number of streams in Brazil? |
<table0>[table_name_30] { <col0>[away_team]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "windy hill" | Which away team was at windy hill? |
<table0>[table_2241101_1] { <col0>[year]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "February 27" | In how many different years did the race happen on February 27? |
<table0>[impact] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[site_id] <col2>[INT]:[impact_score] } | SELECT SUM( `<table0>`_score ) FROM `<table0>` WHERE site_id = 1; | Get total environmental impact for site 1 |
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT SUM( CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME( '%j', patient.hospitaldischargetime ) - STRFTIME( '%j', t4.`<table2>`time ) > 1 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t2.uniquepid, t2.`<table2>`time FROM ( SELECT t1.uniquepid, t1.`<table2>`time FROM ( SELECT pat... | what is the one year survival rate of hypotension / pressor dependent patients who were prescribed ondansetron (zofran) injection 4 mg?
|
<table0>[table_name_93] { <col0>[date]:[VARCHAR] <col1>[away_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "essendon" | What is the date when the away team is essendon?
|
<table0>[contributors_2] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[amount_donated] <col3>[FLOAT]:[INSERT] } | SELECT name FROM `<table0>` WHERE country IN ( 'UK', 'Germany', 'France' ) AND role = 'Language Preservation' ORDER BY amount_donated DESC LIMIT 2; | Who are the top 2 donors to language preservation efforts in Europe? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <... | SELECT `<table10>`.valuenum FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table4>`.icustay_id FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 1784 ) ) AND `<table10>`.itemid IN ( SELECT `<table12>`.itemid FROM `<table12>` WHERE `<table1... | since 10/11/2104 what was patient 1784's last arterial bp mean?
|
<table0>[team] { <col0>[Team_id]:[int] } <table1>[match_season] { <col0>[Season]:[real] <col1>[Player]:[text] <col2>[Position]:[text] <col3>[Country]:[int] <col4>[Team]:[int] <col5>[Draft_Pick_Number]:[int] <col6>[Draft_Class]:[text] <col7>[College]:[text] } <table2>[country] { <col0>[Country_id]:[int] <col1>[Country... | SELECT Position, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` ORDER BY `<col2>` | Return a bar chart on how many players played each position?, show in asc by the x-axis.
|
<table0>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11... | SELECT CRS_CODE, COUNT( * ) FROM `<table2>` GROUP BY `<col1>` | how many sections does each course has? |
<table0>[table_name_79] { <col0>[quarterfinals]:[VARCHAR] <col1>[rank]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "bronze" | What's the quarterfinals when the rank was bronze?
|
<table0>[table_33051] { <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 "Away team" FROM `<table0>` WHERE "Crowd" > '17,000' AND "Away `<col2>` score" = '12.17 ( 89 )' | Which Away team scored 12.17 (89) when the crowd was larger than 17,000? |
<table0>[Publications] { <col0>[PublicationID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[Title]:[VARCHAR] <col3>[255]:[Author] <col4>[VARCHAR]:[255] <col5>[Year]:[INT] <col6>[Type]:[VARCHAR] } | CREATE TABLE Publications ( PublicationID INT PRIMARY KEY, Title VARCHAR( 255 ), Author VARCHAR( 255 ), Year INT, Type VARCHAR( 255 ) ); | Create a table to store information about archaeological publications |
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1... | SELECT All_Home, SUM( `<col0>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY SUM( `<col0>` ) | Give me the comparison about the sum of Team_ID over the All_Home , and group by attribute All_Home by a bar chart, list Y in ascending order.
|
<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>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4... | SELECT COUNT( * ) > 0 FROM `<table12>` WHERE `<table12>`.icd9_code = ( SELECT `<table9>`.icd9_code FROM `<table9>` WHERE `<table9>`.short_title = 'rt/left heart card cath' ) AND `<table12>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 54825 ) AND DATETIME( `<table12>`.charttim... | had patient 54825 been given a rt/left heart card cath procedure until 1 year ago?
|
<table0>[wells] { <col0>[INT]:[state] <col1>[VARCHAR]:[date] <col2>[DATE]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE state IN ( 'Texas', 'Louisiana' ) AND YEAR( date ) = 2020; | Find the number of wells drilled in Texas and Louisiana in 2020 |
<table0>[table_15851155_1] { <col0>[enrollment]:[INTEGER] <col1>[school]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Montana Tech of the University of Montana" | Name the minimum enrollment for montana tech of the university of montana |
<table0>[table_18245] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Result]:[text] <col5>[Candidates]:[text] } | SELECT "Party" FROM `<table0>` WHERE "First elected" = '1982' | Which party is associated with the person who was first elected in 1982?
|
<table0>[table_name_69] { <col0>[chord]:[VARCHAR] <col1>[major_third]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "e" | What is the Chord with a Major that is third of e?
|
<table0>[table_name_76] { <col0>[method]:[VARCHAR] <col1>[res]:[VARCHAR] <col2>[time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "loss" AND `<col2>` = "5:00" | What is the method where there is a loss with time 5:00? |
<table0>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degr... | SELECT DISTINCT description, `<col1>` FROM `<table13>` WHERE `<col2>` = 'RCARTS' AND `<col3>` = 389 | What 's RCARTS 389 about ? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.ethnicity = "BLACK/AFRICAN AMERICAN" AND `<table3>`.dob_year < "2071" | provide the number of black/african ethnic background patients who were born before the year 2071. |
<table0>[table_name_46] { <col0>[total]:[INTEGER] <col1>[rank]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2" | What is the sum of Total when rank is 2?
|
<table0>[prices] { <col0>[INT]:[brand] <col1>[VARCHAR]:[255] <col2>[price]:[DECIMAL] } | UPDATE prices SET price = 30.00 WHERE brand = 'Lush'; | Update the price of all Lush products to $30.00. |
<table0>[concert_revenue] { <col0>[INT]:[concert] <col1>[VARCHAR]:[255] <col2>[city]:[VARCHAR] <col3>[255]:[revenue] <col4>[DECIMAL]:[INSERT] } | SELECT city, SUM( revenue ) as total_revenue FROM `<table0>` GROUP BY city; | What is the total revenue generated by each concert by city? |
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAn... | SELECT * FROM `<table4>` WHERE LENGTH( TagName ) BETWEEN 3 AND 4 AND Count BETWEEN 100 AND 3000 ORDER BY Count | Tags with names less than five characters.
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.admityear < "2168" AND procedures.long_title = "Endoscopic excision or destruction of lesion or tissue of stomach" | how many patients whose admission year is less than 2168 and procedure long title is endoscopic excision or destruction of lesion or tissue of stomach? |
<table0>[fish_stock] { <col0>[region]:[VARCHAR] <col1>[255]:[species] <col2>[VARCHAR]:[255] <col3>[stock_size]:[INT] } | SELECT species, `<col3>` FROM `<table0>` WHERE `<col0>` = 'Mediterranean Sea' AND `<col3>` > 2000; | Which fish species have a stock size greater than 2000 in the 'Mediterranean Sea'? |
<table0>[engagements] { <col0>[region]:[VARCHAR] <col1>[engagement_date]:[DATE] <col2>[users]:[INT] } | SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Middle East' AND `<col1>` >= DATEADD( day, -7, CURRENT_DATE ) | What is the total number of users who engaged with content in the Middle East in the last week? |
<table0>[Artists] { <col0>[INT]:[name] <col1>[VARCHAR]:[collaborations] } <table1>[Collaborations] { <col0>[INT]:[artist1] <col1>[INT]:[artist2] <col2>[INT]:[INSERT] <col3>[Artists]:[VALUES] <col4>[Artist]:[Artist] <col5>[Artist]:[INSERT] } | SELECT A.name, COUNT( * ) as collaborations_count FROM `<table0>` A INNER JOIN Collaborations C ON A.id = C.artist1 OR A.id = C.artist2 GROUP BY A.name ORDER BY collaborations_count DESC; | Which artists contributed to the most collaborations in the music industry? |
<table0>[table_name_38] { <col0>[alternate]:[VARCHAR] <col1>[second]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "magnus swartling" | Who is the alternate for Magnus Swartling as Second? |
<table0>[table_1514] { <col0>[Institution]:[text] <col1>[Wins]:[real] <col2>[Loss]:[real] <col3>[Home]:[Wins] <col4>[real]:[Home] <col5>[Losses]:[real] <col6>[Away]:[Wins] <col7>[real]:[Away] <col8>[Losses]:[real] <col9>[Neutral]:[Wins] <col10>[real]:[Neutral] <col11>[Losses]:[real] <col12>[Current]:[Streak] } | SELECT COUNT( "Home Losses" ) FROM `<table0>` WHERE "Away Losses" = '6' | How many numbers were recorded under home losses when away losses were 6? |
<table0>[table_26883] { <col0>[Ship]:[text] <col1>[Laid]:[text] <col2>[Builder]:[text] <col3>[Engine]:[builder] <col4>[text]:[Launched] <col5>[text]:[Completed] <col6>[text]:[Disposition] <col7>[text]:[Fate] } | SELECT "Launched" FROM `<table0>` WHERE "Ship" = 'Carysfort' | When was the Carysfort launched?
|
<table0>[table_28744929_1] { <col0>[school_type]:[VARCHAR] <col1>[nickname]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Seminoles" | what type of school is the institution nicknamed seminoles? |
<table0>[table_9338] { <col0>[Date]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Venue]:[text] <col6>[Box]:[Score] <col7>[text]:[Report] } | SELECT "Score" FROM `<table0>` WHERE "Away team" = 'perth wildcats' | What was the score for the Perth Wildcats as away team?
|
<table0>[subscribers] { <col0>[INT]:[type] <col1>[TEXT]:[region] <col2>[TEXT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE type = 'broadband' AND region = 'suburban'; | How many broadband subscribers are there in 'suburban' regions? |
<table0>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <ta... | SELECT DISTINCT flight.flight_id FROM `<table0>` AS AIRPORT_SERVICE_0, `<table0>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' A... | i'd like the first flight in the morning from BOSTON to WASHINGTON |
<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 WHERE `<table0>`.gender = "F" AND diagnoses.icd9_code = "2948" | how many female patients are diagnosed with icd9 code 2948? |
<table0>[jybgb] { <col0>[BBCJBW]:[text] <col1>[BBDM]:[text] <col2>[BBMC]:[text] <col3>[BBZT]:[number] <col4>[BGDH]:[text] <col5>[BGJGDM]:[text] <col6>[BGJGMC]:[text] <col7>[BGRGH]:[text] <col8>[BGRQ]:[time] <col9>[BGRXM]:[text] <col10>[BGSJ]:[time] <col11>[CJRQ]:[time] <col12>[JSBBRQSJ]:[time] <col13>[JSBBSJ]:[time] <c... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM `<table6>` JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON `<table6>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZL... | 哪些医务人员为患者何莹琇在12年2月15日到17年2月23日期间进行过检测指标048093的检查姓名和工号都是什么?
|
<table0>[Production] { <col0>[item_id]:[INT] <col1>[material]:[VARCHAR] <col2>[255]:[weight] <col3>[DECIMAL]:[sustainable] <col4>[BOOLEAN]:[INSERT] } | SELECT item_id, 100.0 * SUM( CASE WHEN sustainable THEN weight ELSE 0 END ) / SUM( weight ) OVER ( PARTITION BY `<col0>` ) AS percentage FROM `<table0>` ORDER BY percentage DESC; | What is the percentage of sustainable materials used in production for each item, ordered by the percentage in descending order? |
<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 MIN( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "F" AND `<table3>`.days_stay = "17" | what is minimum age of patients whose gender is f and days of hospital stay is 17? |
<table0>[community_engagement] { <col0>[city]:[language] <col1>[event_type]:[participants] } | INSERT INTO community_engagement ( id, city, language, event_type, participants, event_date ) VALUES ( 1, 'Bangkok', 'Thai', 'workshops', 150, '2022-09-10' ), ( 2, 'Delhi', 'Hindi', 'festivals', 200, '2022-11-15' ); | Insert new records into the community_engagement table with the following data: (1, 'Bangkok', 'Thai', 'workshops', 150, '2022-09-10') and (2, 'Delhi', 'Hindi', 'festivals', 200, '2022-11-15'). |
<table0>[table_30120556_1] { <col0>[barony]:[VARCHAR] <col1>[townland]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Ballyvadona" | How many barony's appear when Ballyvadona is the townland. |
<table0>[table_11144] { <col0>[Season]:[real] <col1>[Episodes]:[real] <col2>[Originally]:[aired] <col3>[text]:[Season] <col4>[Premiere]:[text] <col5>[Season]:[Finale] <col6>[text]:[DVD] <col7>[release]:[date] } | SELECT MAX( "Episodes" ) FROM `<table0>` WHERE "Season Premiere" = 'january 3, 2007' | Which series has a season premiere on January 3, 2007 with the most episodes?
|
<table0>[rural_infrastructure] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[100] <col2>[project_domain]:[VARCHAR] <col3>[project_location]:[VARCHAR] <col4>[100]:[investment] <col5>[FLOAT]:[start_date] <col6>[DATE]:[end_date] } | SELECT project_domain, SUM( investment ) FROM `<table0>` WHERE `<col3>` = 'South America' AND YEAR( start_date ) = 2015 GROUP BY project_domain; | What was the total investment in rural infrastructure projects in the 'South America' region for the year 2015, grouped by project_domain? |
<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 `<table6>` WHERE `<table6>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '030-72509' ) ) AND `<table6>`.drugname I... | was patient 030-72509 ordered sennosides-docusate sodium 8.6-50 mg po tabs, tamsulosin 0.4 mg cap, or neostigmine until 2104?
|
<table0>[GARMENTS] { <col0>[garment_id]:[INT] <col1>[category]:[VARCHAR] <col2>[production_cost]:[FLOAT] } | SELECT category, `<col2>` FROM `<table0>` WHERE `<col2>` > ( SELECT AVG( `<col2>` ) FROM `<table0>` ); | Show garment categories with production costs higher than the average production cost for all garment categories. |
<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>`.diagnosis, procedures.long_title FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.subject_id = "2560" | what is primary disease and procedure long title of subject id 2560?
|
<table0>[table_name_17] { <col0>[zone_2008]:[VARCHAR] <col1>[services]:[VARCHAR] <col2>[station]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "greater anglia" AND `<col2>` = "cheshunt" | Which Zone 2008 has Services of greater anglia, and a Station of cheshunt?
|
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[Department]:[VARCHAR] <col2>[Gender]:[VARCHAR] } | SELECT Department, COUNT( DISTINCT `<col2>` ) / COUNT( * ) * 100 AS DiversityPercentage FROM `<table0>` GROUP BY `<col1>` | What is the diversity percentage for each department? |
<table0>[table_name_94] { <col0>[played]:[INTEGER] <col1>[points]:[VARCHAR] <col2>[drawn]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 5 AND `<col2>` < 1 | Which Played is the highest one that has Points of 5, and a Drawn smaller than 1? |
<table0>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[COMP_ID]:[text] <col8>[COM_ACC_PAY]:[number] <col9>[COM_PAY]:[number] <col10>[DATA_ID]:[te... | SELECT `<table3>`.SOC_SRT_DIRE_CD, `<table3>`.SOC_SRT_DIRE_NM FROM `<table3>` JOIN t_kc21_`<table3>` JOIN t_kc21 ON t_kc21_`<table3>`.MED_EXP_DET_ID = `<table3>`.MED_EXP_DET_ID AND t_kc21_`<table3>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '71994560762' AND `<table3>`.UP_LIMIT_AMO > 9874.37 | 把开出药品的定价上限金额高于9874.37元的所有药品列出来,就是71994560762的那次治疗就诊用到的药
|
<table0>[community_policing_centers] { <col0>[INT]:[center_name] <col1>[TEXT]:[region] <col2>[TEXT]:[INSERT] } <table1>[emergency_incidents] { <col0>[INT]:[center_id] <col1>[INT]:[incident_type] <col2>[TEXT]:[incident_count] <col3>[INT]:[INSERT] } <table2>[crimes_reported] { <col0>[INT]:[center_id] <col1>[INT]:[crime... | SELECT SUM( e.incident_count + cr.crime_count ) AS total_incidents FROM `<table0>` c JOIN emergency_incidents e ON c.id = e.center_id JOIN crimes_reported cr ON c.id = cr.center_id WHERE c.region = 'Region 1'; | What is the total number of emergency incidents and crimes reported by community policing centers in region 1? |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE `<table0>`.age < "80" AND lab.fluid = "Cerebrospinal Fluid ( CSF )" | what is the number of patients less than 80 years who had cerebrospinal fluid lab test? |
<table0>[restaurants] { <col0>[restaurant_id]:[INT] <col1>[total_menu_items]:[INT] } <table1>[menus] { <col0>[menu_id]:[INT] <col1>[restaurant_id]:[INT] <col2>[menu_item_id]:[INT] <col3>[INSERT]:[restaurants] <col4>[VALUES]:[INSERT] <col5>[restaurants]:[VALUES] } | SELECT r.restaurant_id, COUNT( DISTINCT m.menu_item_id ) as unique_menu_items, SUM( m.menu_item_id ) as `<col1>` FROM `<table0>` r INNER JOIN menus m ON r.restaurant_id = m.restaurant_id GROUP BY r.restaurant_id; | Show the number of menu items that are unique to each restaurant, along with the total number of menu items offered by each restaurant. |
<table0>[Brands] { <col0>[BrandID]:[INT] <col1>[BrandName]:[VARCHAR] <col2>[IsCrueltyFree]:[BOOLEAN] <col3>[CertificationID]:[INT] } <table1>[Certifications] { <col0>[CertificationID]:[INT] <col1>[CertificationName]:[VARCHAR] <col2>[CertificationBody]:[VARCHAR] } | INSERT INTO Brands ( BrandID, BrandName, IsCrueltyFree, CertificationID ) VALUES ( 1, 'Lush', true, 104 ), ( 2, 'The Body Shop', true, 105 ), ( 3, 'Burt''s Bees', true, 106 ); INSERT INTO Certifications ( CertificationID, CertificationName, CertificationBody ) VALUES ( 104, 'Beauty Without Bunnies', 'PETA' ), ( 105, 'C... | Add new cruelty-free certifications for a cosmetic brand. |
<table0>[table_35471] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Game]:[site] <col5>[text]:[Attendance] } | SELECT AVG( "Week" ) FROM `<table0>` WHERE "Game site" = 'memorial stadium' | what week number was at memorial stadium?
|
<table0>[Ref_Hotel_Star_Ratings] { <col0>[star_rating_code]:[CHAR] <col1>[star_rating_description]:[VARCHAR] } <table1>[Shops] { <col0>[Shop_ID]:[INTEGER] <col1>[Shop_Details]:[VARCHAR] } <table2>[Staff] { <col0>[Staff_ID]:[INTEGER] <col1>[Tourist_Attraction_ID]:[INTEGER] <col2>[VARCHAR]:[Other_Details] <col3>[VARCHA... | SELECT Name, COUNT( * ) FROM `<table9>` AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID ORDER BY COUNT( * ) | A bar chart showing the number of tourist attractions for each attraction name, sort Y from low to high order please. |
<table0>[mzjzjlb] { <col0>[YLJGDM]:[text] <col1>[JZLSH]:[text] <col2>[text]:[KLX] <col3>[number]:[MJZH] <col4>[text]:[HZXM] <col5>[text]:[NLS] <col6>[number]:[NLY] <col7>[number]:[ZSEBZ] <col8>[number]:[JZZTDM] <col9>[number]:[JZZTMC] <col10>[text]:[JZJSSJ] <col11>[time]:[TXBZ] <col12>[number]:[ZZBZ] <col13>[number]:[W... | SELECT * FROM `<table1>` WHERE `<col12>` = ( SELECT `<col12>` FROM `<table1>` WHERE `<col0>` = '23193681621' ) AND `<col15>` = ( SELECT `<col15>` FROM `<table1>` WHERE `<col0>` = '23193681621' ) AND `<col14>` < ( SELECT `<col14>` FROM `<table1>` WHERE `<col0>` = '23193681621' ) | 提供检测指标名称与检测指标结果定量单位和检验指标记录23193681621相同,且检测指标结果定量小于其的检验指标记录详情
|
<table0>[table_8532] { <col0>[Heat]:[real] <col1>[Lane]:[real] <col2>[text]:[Country] <col3>[text]:[Mark] } | SELECT "Name" FROM `<table0>` WHERE "Mark" = '8.19' AND "Lane" = '3' | What name has 8.19 as the mark, with 3 as the lane?
|
<table0>[TeacherAccess] { <col0>[TeacherID]:[INT] <col1>[Resource]:[VARCHAR] <col2>[100]:[AccessDate] <col3>[DATE]:[INSERT] } | SELECT Resource, COUNT( * ) FROM `<table0>` GROUP BY `<col1>` ORDER BY COUNT( * ) DESC; | Which open pedagogy resources have been accessed by the most teachers? |
<table0>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[VoteTypes] { <col0>[number]:[text] } <table3>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[Creat... | SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", u.Id AS "user_link", u.Reputation, COUNT( p.Id ) FROM `<table13>` AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE LOWER( Location ) LIKE LOWER( '%##countryname##%... | user by tag and country. |
<table0>[college] { <col0>[college_id]:[number] <col1>[name]:[text] <col2>[leader_name]:[text] <col3>[college_location]:[text] } <table1>[member] { <col0>[member_id]:[number] <col1>[name]:[text] <col2>[country]:[text] <col3>[college_id]:[number] } <table2>[round] { <col0>[round_id]:[number] <col1>[member_id]:[number]... | SELECT T2.name, T1.`<table0>`_location FROM `<table0>` AS T1 JOIN member AS T2 ON T1.`<table0>`_id = T2.`<table0>`_id ORDER BY T2.name | Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.
|
<table0>[factories] { <col0>[factory_id]:[INT] <col1>[name]:[TEXT] <col2>[location]:[TEXT] <col3>[ethical_manufacturing]:[BOOLEAN] } | SELECT f1.name AS factory1, f2.name AS factory2, f1.ethical_manufacturing AS ethical_practice1, f2.ethical_manufacturing AS ethical_practice2 FROM `<table0>` f1 JOIN `<table0>` f2 ON f1.location = f2.location WHERE f1.factory_id <> f2.factory_id; | What are the differences in ethical manufacturing practices between factories in the same region? |
<table0>[community_policing] { <col0>[cp_id]:[INT] <col1>[INT]:[meetings_this_year] <col2>[INT]:[INSERT] } | INSERT INTO community_policing ( cp_id, did, meetings_this_year ) VALUES ( 4, 2, 2 ); | Insert a new record of a community meeting into the 'community_policing' table |
<table0>[table_name_25] { <col0>[winning_driver]:[VARCHAR] <col1>[race]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "dutch grand prix" | Who was the winning driver for the Dutch Grand Prix?
|
<table0>[table_16083989_1] { <col0>[citrate]:[VARCHAR] <col1>[species]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Salmonella spp." | What is the result for salmonella spp. if you use citrate? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.