schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<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 COUNT( DISTINCT `<table0>`.uniquepid ) FROM `<table0>` | find the number of patients who have been admitted in hospital.
|
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table2>[... | SELECT COUNT( DISTINCT `<table8>`.icustay_id ) FROM `<table8>` WHERE `<table8>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 90663 ) AND DATETIME( `<table8>`.intime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-0 year' ) | how many times did patient 90663 visit an icu in this year? |
<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>[prescriptions] { <c... | SELECT `<table16>`.charttime FROM `<table16>` WHERE `<table16>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 28443 ) AND `<table16>`.spec_type_desc = 'sputum' AND STRFTIME( '%y-%m', `<table16>`.charttime ) >= '2105-08' ORDER BY `<table16>`.charttime LIMIT 1 | since 08/2105, when did patient 28443 receive the first sputum microbiology test? |
<table0>[table_42524] { <col0>[Year]:[ended] <col1>[text]:[Passengers] <col2>[thousand]:[real] <col3>[RPK]:[million] <col4>[real]:[ASK] <col5>[million]:[real] <col6>[Load]:[factor] <col7>[real]:[Yield] <col8>[u00a2]:[real] } | SELECT MAX( "Yield ( S\u00a2/km )" ) FROM `<table0>` WHERE "ASK ( `<col5>` )" > '88,252.7' AND "RPK ( `<col5>` )" = '74,183.2' AND "Load factor ( % )" < '74.5' | What is the highest yield when the ASK is greater than 88,252.7, an RPK of 74,183.2, and a load factor less than 74.5? |
<table0>[table_name_23] { <col0>[competition]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11 feb 1990" | On 11 Feb 1990, the competition is listed as what?
|
<table0>[CREATE] { <col0>[SCHEMA]:[AI_Research] } <table1>[Safety_Papers] { <col0>[paper_id]:[INT] <col1>[publication_year]:[INT] <col2>[citations]:[INT] <col3>[INSERT]:[AI_Research] } | SELECT paper_id, citations FROM AI_Research.Safety_Papers WHERE publication_year < 2018 ORDER BY citations DESC; | List AI safety research papers published before 2018 in descending order by the number of citations. |
<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 MAX( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "F" AND `<table3>`.age >= "85" | what is maximum age of patients whose gender is f and age is greater than or equal to 85? |
<table0>[claims] { <col0>[INT]:[policy_id] <col1>[INT]:[claim_amount] <col2>[INT]:[INSERT] } <table1>[policies] { <col0>[INT]:[state] <col1>[VARCHAR]:[INSERT] } | SELECT MAX( claim_amount ) FROM `<table0>` JOIN policies ON `<table0>`.policy_id = policies.id WHERE policies.state = 'NY'; | What is the maximum claim amount for policies in 'NY'? |
<table0>[area] { <col0>[course_id]:[int] } <table1>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table4>[program_course] { <col0>[program_id]:[int] <col1>[cou... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course, course_offering, semester WHERE course.course_id = course_offe... | Next semester when is 430 offered ? |
<table0>[table_10548] { <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 "Venue" FROM `<table0>` WHERE "Home `<col2>` score" = '11.14 ( 80 )' | Where was the game played when the home team scored 11.14 (80)?
|
<table0>[table_44736] { <col0>[Coach]:[text] <col1>[real]:[real] <col2>[real]:[500] <col3>[real]:[plyf] <col4>[real]:[plyf] <col5>[real]:[plyf] <col6>[real]:[plyf] } | SELECT SUM( "Yr plyf" ) FROM `<table0>` WHERE "G plyf" = '0' AND "Coach" = 'ed robinson' | What is the sum of the yr plyf of coach ed robinson, who has a G plyf of 0?
|
<table0>[table_name_45] { <col0>[location]:[VARCHAR] <col1>[rank]:[VARCHAR] <col2>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 8 AND `<col2>` = "22 july 2011" | Which location had a race that took place on 22 July 2011 and has a rank greater than 8?
|
<table0>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table1>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[... | SELECT COUNT( * ) > 0 FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'BIOPHYS' AND course.number = 521 AND instructor.name LIKE '%Anuj Kumar%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructo... | Has the person Anuj Kumar ever taught the class BIOPHYS 521 ?
|
<table0>[table_name_94] { <col0>[opponent]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0-12" | What was the opponent of the game when the reocrd was 0-12? |
<table0>[table_203_112] { <col0>[number]:[choke] <col1>[text]:[constriction] <col2>[inch]:[number] <col3>[percentage]:[lead] <col4>[shot]:[inch] <col5>[circle]:[yards] <col6>[text]:[identification] <col7>[notches]:[number] <col8>[identification]:[stars] <col9>[spanish]:[shotguns] } | SELECT "choke" FROM `<table0>` WHERE "identification ( `<col7>` )" = '1' ORDER BY "percentage of lead `<col4>` in 30-inch `<col5>` at 40 yards" DESC LIMIT 1 | which of the 1 notch barrels has the highest constriction ?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[... | SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table3>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table4>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY SUM( `<col7>` ) DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the sum of salary bin hire_date by time in a bar chart, I want to order by the y-axis in descending.
|
<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 Id, Title, FavoriteCount FROM `<table5>` ORDER BY FavoriteCount DESC | Questions with most favourite stars. |
<table0>[products] { <col0>[code]:[number] <col1>[name]:[text] <col2>[price]:[number] <col3>[manufacturer]:[number] } <table1>[manufacturers] { <col0>[code]:[number] <col1>[name]:[text] <col2>[headquarter]:[text] <col3>[founder]:[text] <col4>[revenue]:[number] } | SELECT `<col3>` FROM `<table1>` WHERE `<col1>` = 'Sony' | Who is the founder of Sony?
|
<table0>[table_name_72] { <col0>[surface]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "16 april 2007" | Tell me the surface for 16 april 2007 |
<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>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Regional enteritis NOS" AND prescriptions.route = "IV" | count the number of patients whose diagnoses short title is regional enteritis nos and drug route is iv? |
<table0>[RenewableEnergyProjects] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[capacity] <col3>[INT]:[INSERT] } | SELECT SUBSTRING( location, 1, 1 ) AS Region, SUM( capacity ) FROM `<table0>` WHERE location IN ( 'East', 'Central' ) GROUP BY Region; | What is the total installed capacity of solar energy projects in 'East' and 'Central' regions? |
<table0>[table_name_98] { <col0>[builder]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "uss cambridge" | Who was the builder for the USS cambridge? |
<table0>[safe_dataset] { <col0>[INT]:[data_type] <col1>[TEXT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE data_type = 'images'; | How many 'images' are present in the 'safe_dataset'? |
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[... | SELECT COUNT( DISTINCT `<table9>`.uniquepid ) FROM `<table9>` WHERE `<table9>`.wardid = 99 AND DATETIME( `<table9>`.unitadmittime ) <= DATETIME( CURRENT_TIME( ), '-4 year' ) | what was the total number of patients on ward 99 until 4 years ago?
|
<table0>[Catalog_Structure] { <col0>[catalog_level_number]:[INTEGER] <col1>[catalog_id]:[INTEGER] <col2>[catalog_level_name]:[VARCHAR] } <table1>[Catalogs] { <col0>[catalog_id]:[INTEGER] <col1>[catalog_name]:[VARCHAR] <col2>[catalog_publisher]:[VARCHAR] <col3>[date_of_publication]:[DATETIME] <col4>[date_of_latest_revi... | SELECT catalog_entry_name, `<col10>` FROM `<table4>` WHERE `<col7>` > 700 ORDER BY `<col10>` DESC | Visualize a bar chart for which catalog contents has price above 700 dollars? Show their catalog entry names and capacities, and show by the y axis from high to low.
|
<table0>[exists] { <col0>[investments]:[investment_id] <col1>[INT]:[region] <col2>[VARCHAR]:[sector] <col3>[VARCHAR]:[DECIMAL] <col4>[investment_year]:[INT] <col5>[INSERT]:[investments] <col6>[investment_id]:[region] <col7>[sector]:[investment_year] <col8>[VALUES]:[Southeast] <col9>[Asia]:[Social] <col10>[Impact]:[Bond... | SELECT SUM( amount ) FROM investments WHERE region = 'Southeast Asia' AND sector = 'Social Impact Bonds' AND investment_year = 2019; | What is the total investment in social impact bonds in Southeast Asia in 2019? |
<table0>[table_204_793] { <col0>[number]:[sign] <col1>[text]:[location] <col2>[text]:[number] <col3>[psip]:[number] <col4>[programming]:[text] } | SELECT "programming" FROM `<table0>` GROUP BY "programming" ORDER BY COUNT( * ) DESC LIMIT 1 | which programming is played the most ? |
<table0>[table_61520] { <col0>[Score]:[text] <col1>[Pos]:[real] <col2>[Inn]:[real] <col3>[Venue]:[text] } | SELECT "H/A/N" FROM `<table0>` WHERE "Score" = '105*♠' | Which H/A/N has a score of 105* ?
|
<table0>[table_203_664] { <col0>[number]:[club] <col1>[text]:[town] <col2>[text]:[founded] <col3>[number]:[nickname] <col4>[text]:[colours] <col5>[text]:[home] <col6>[ground]:[text] <col7>[titles]:[number] <col8>[website]:[text] } | SELECT "titles" FROM `<table0>` WHERE "club" = 'fortuna 60' | how many titles does fortuna 60 have ? |
<table0>[menu_engineering] { <col0>[menu_category]:[VARCHAR] <col1>[255]:[daily_revenue] <col2>[DECIMAL]:[INSERT] } | SELECT MAX( daily_revenue ) FROM menu_engineering; | What is the highest daily revenue for any menu category? |
<table0>[table_15187735_10] { <col0>[episode]:[VARCHAR] <col1>[segment_a]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "s Fire Extinguisher" | Name the total number of episodes for s fire extinguisher |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.age < "86" AND diagnoses.long_title = "Wheelchair dependence" | count the number of patients whose age is less than 86 and diagnoses long title is wheelchair dependence? |
<table0>[table_46187] { <col0>[Fin]:[Pos] <col1>[text]:[Car] <col2>[text]:[Driver] <col3>[text]:[Team] <col4>[text]:[Laps] <col5>[text]:[Time] <col6>[Retired]:[text] <col7>[Grid]:[text] <col8>[Laps]:[Led] <col9>[text]:[Points] } | SELECT "Car No." FROM `<table0>` WHERE "Time/Retired" = '+0.3844' | What car number had a race time of +0.3844?
|
<table0>[table_name_62] { <col0>[high_rebounds]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "denver" | Who had the high rebounds, and how many, when they played Denver? |
<table0>[station] { <col0>[Station_ID]:[int] <col1>[text]:[Annual_entry_exit] <col2>[real]:[Annual_interchanges] <col3>[real]:[Total_Passengers] <col4>[real]:[Location] <col5>[text]:[Main_Services] <col6>[text]:[Number_of_Platforms] } <table1>[train] { <col0>[Train_ID]:[int] <col1>[text]:[Time] <col2>[text]:[Service] ... | SELECT Location, SUM( Number_of_Platforms ) FROM `<table0>` GROUP BY Location | Compute the total sum number of platforms across location as a pie chart. |
<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>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[E... | SELECT HIRE_DATE, SUM( `<col0>` ) FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table4>` ) ORDER BY SUM( `<col0>` ) DESC | For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the sum of employee_id bin hire_date by weekday, list total number of employee id from high to low order.
|
<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 T2.Name, T2.Revenue FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue | For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of revenue , and group by attribute name, list by the total number in asc. |
<table0>[table_9405] { <col0>[Country]:[text] <col1>[Date]:[text] <col2>[Label]:[text] <col3>[Format]:[text] <col4>[Catalog]:[text] } | SELECT "Label" FROM `<table0>` WHERE "Catalog" = '7243 8 49494 2 6' | Which Label has a Catalog of 7243 8 49494 2 6?
|
<table0>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table1>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wedne... | SELECT DISTINCT course.department, course.name, course.number, `<table8>`.workload, `<table8>`.workload FROM course, `<table8>` WHERE `<table8>`.category LIKE '%Other%' AND `<table8>`.course_id = course.course_id AND `<table8>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table8>` AS PROGRAM_COURSEal... | Which class will fulfill the Other requirement the easiest ? |
<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 TagName, `<table12>`.Count AS "count" FROM `<table12>` ORDER BY 'count' DESC, TagName | All tags by count, tagname. |
<table0>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table1>[Votes] { <col0>[number]:[Post... | SELECT p.Id AS "post_link" FROM `<table24>` AS p INNER JOIN `<table24>` AS a ON a.ParentId = p.Id WHERE a.Score = 0 AND p.AnswerCount = 1 AND p.AcceptedAnswerId IS NULL AND p.ClosedDate IS NULL AND NOT a.CommunityOwnedDate IS NULL ORDER BY a.CreationDate | Community Wiki answer not accepted or upvoted, no other answers.
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE lab.itemid = "51251" | give me the number of patients whose item id is 51251?
|
<table0>[tv_shows] { <col0>[INT]:[title] <col1>[VARCHAR]:[255] <col2>[release_year]:[INT] <col3>[viewership]:[INT] } | SELECT title, release_year, `<col3>` FROM `<table0>` WHERE `<col2>` > 2020 AND `<col3>` > 5000000; | Which TV shows have a release year higher than 2020 and viewership greater than 5 million? |
<table0>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table1>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>... | SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM `<table5>` WHERE ( LOWER( DisplayName ) LIKE '%Patel%' OR UPPER( DisplayName ) LIKE '%Patel%' OR DisplayName LIKE '%Patel%' OR LOWER( DisplayName ) LIKE '%patel%' OR UPPER( DisplayName ) LIKE '%patel%' OR DisplayName LIKE '%patel%' ) AND ( LOWER( Location ) ... | TOP 1000 users from Bangalore, India. Lists the top 1000 users (ranked by reputation) that are located in Bangalore, Karnataka, India according to their profile information.
Thanks to http://data.stackexchange.com/stackoverflow/query/60933/top-50-users-from-india
Edited by GNKeshava
|
<table0>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table2>[food_service] { <col0>[mea... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service 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_na... | what airlines fly from BOSTON to SAN FRANCISCO |
<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 Affiliation, SUM( `<col5>` ) FROM `<table1>` WHERE `<col3>` > 1850 GROUP BY `<col4>` | A bar chart about what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?
|
<table0>[table_name_39] { <col0>[total]:[INTEGER] <col1>[bronze]:[VARCHAR] <col2>[gold]:[VARCHAR] <col3>[rank]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 1 AND `<col3>` > 3 AND `<col1>` > 3 | What is the average total for teams with more than 1 gold, ranked over 3 and more than 3 bronze?
|
<table0>[ship] { <col0>[ship_id]:[number] <col1>[name]:[text] <col2>[type]:[text] <col3>[nationality]:[text] <col4>[tonnage]:[number] } <table1>[mission] { <col0>[mission_id]:[number] <col1>[ship_id]:[number] <col2>[code]:[text] <col3>[launched_year]:[number] <col4>[location]:[text] <col5>[speed_knots]:[number] <col6>... | SELECT `<col3>` FROM `<table0>` GROUP BY `<col3>` HAVING COUNT( * ) > 2 | List the nations that have more than two ships.
|
<table0>[table_49092] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[Par]:[real] <col5>[Money]:[real] } | SELECT AVG( "To Par" ) FROM `<table0>` WHERE "Player" = 'billy casper' | What is the average To Par, when Player is 'Billy Casper'?
|
<table0>[companies] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[industry]:[VARCHAR] <col4>[255]:[location] <col5>[VARCHAR]:[255] } | SELECT name, `<col3>` FROM `<table0>` WHERE `<col3>` = 'Biotechnology' AND location LIKE '%Canada%' OR location LIKE '%United Kingdom%'; | Retrieve the names and industry of biotech companies located in Canada or the United Kingdom. |
<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 prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.dob_year < "2180" AND prescriptions.drug = "D12.5W" | give me the number of patients whose year of birth is less than 2180 and drug name is d12.5w?
|
<table0>[table_name_69] { <col0>[home_team]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col0>` = "collingwood" | What was the score of Collingwood?
|
<table0>[asia_sustainable_tourism] { <col0>[INT]:[country] <col1>[VARCHAR]:[certifications] <col2>[INT]:[INSERT] } | SELECT AVG( certifications ) FROM asia_sustainable_tourism; | What is the average number of sustainable tourism certifications for countries in Asia? |
<table0>[AccessibilityImprovements] { <col0>[SchoolName]:[VARCHAR] <col1>[255]:[Year] <col2>[INT]:[Budget] <col3>[DECIMAL]:[INSERT] } | SELECT AVG( Budget ) FROM `<table0>` WHERE `<col0>` IN ( SELECT `<col0>` FROM Schools WHERE Type = 'School' ) AND Year = 2020; | What is the average budget allocated for accessibility improvements in schools in the 'DisabilityServices' schema? |
<table0>[table_name_54] { <col0>[lithium]:[VARCHAR] <col1>[rubidium]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nabr ( 1.9 )" | what is the type of lithium when rubidium is nabr (1.9)?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2... | SELECT LAST_NAME, `<col7>` FROM `<table5>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table1>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col2>` DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about salary over the last_name by a bar chart, I want to display in descending by the X please.
|
<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>`.days_stay > "2" AND lab.fluid = "Cerebrospinal Fluid ( CSF )" | Tell me the number of patients who stayed in hospital for more than 2 days and had a csf lab test done. |
<table0>[wrestler] { <col0>[wrestler_id]:[number] <col1>[name]:[text] <col2>[reign]:[text] <col3>[days_held]:[text] <col4>[location]:[text] <col5>[event]:[text] } <table1>[elimination] { <col0>[elimination_id]:[text] <col1>[wrestler_id]:[text] <col2>[team]:[text] <col3>[eliminated_by]:[text] <col4>[elimination_move]:[... | SELECT `<col1>` FROM `<table0>` WHERE NOT `<table0>`_id IN ( SELECT `<table0>`_id FROM `<table1>` ) | What are the names of wrestlers who have never been eliminated?
|
<table0>[table_204_475] { <col0>[number]:[home] <col1>[team]:[text] <col2>[score]:[text] <col3>[away]:[team] <col4>[text]:[date] <col5>[text]:[agg] } | SELECT "home team" FROM `<table0>` WHERE "score" = '0-0' | what is the home team of the only 0-0 score ? |
<table0>[competition_result] { <col0>[Competition_ID]:[int] <col1>[Club_ID_1]:[int] <col2>[Club_ID_2]:[int] <col3>[Score]:[text] } <table1>[club_rank] { <col0>[Rank]:[real] <col1>[Club_ID]:[int] <col2>[Gold]:[real] <col3>[Silver]:[real] <col4>[Bronze]:[real] <col5>[Total]:[real] } <table2>[competition] { <col0>[Compe... | SELECT Competition_type, COUNT( `<col2>` ) FROM `<table2>` GROUP BY `<col2>` | Show the number of different competition types with a bar graph.
|
<table0>[election] { <col0>[Election_ID]:[int] <col1>[Counties_Represented]:[text] <col2>[District]:[int] <col3>[Delegate]:[text] <col4>[Party]:[int] <col5>[First_Elected]:[real] <col6>[Committee]:[text] } <table1>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:... | SELECT Committee, COUNT( `<col6>` ) FROM `<table0>` AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" GROUP BY `<col6>` ORDER BY COUNT( `<col6>` ) | Return all the committees that have delegates from Democratic party, and count them by a bar chart, and sort in asc by the y-axis.
|
<table0>[county] { <col0>[County_Id]:[int] <col1>[County_name]:[text] <col2>[Population]:[real] <col3>[Zip_code]:[text] } <table1>[party] { <col0>[Party_ID]:[int] <col1>[Year]:[real] <col2>[Party]:[text] <col3>[Governor]:[text] <col4>[Lieutenant_Governor]:[text] <col5>[Comptroller]:[text] <col6>[Attorney_General]:[tex... | SELECT County_name, COUNT( * ) FROM `<table0>` AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY T1.County_Id | Show the name of each county along with the corresponding number of delegates from that county. Plot them as bar chart. |
<table0>[table_204_735] { <col0>[number]:[rank] <col1>[number]:[team] <col2>[text]:[names] <col3>[text]:[time] <col4>[text]:[qualification] } | SELECT "time" FROM `<table0>` WHERE "team" = 'italy' | how long did it take italy to finish in cycling at the 1996 summer olympics men 's team pursuit ? |
<table0>[team] { <col0>[team_id_br]:[VARCHAR] <col1>[name]:[VARCHAR] } <table1>[home_game] { <col0>[attendance]:[INTEGER] <col1>[team_id]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT SUM( T1.attendance ) FROM `<table1>` AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010 | What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?
|
<table0>[employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[salary] <col3>[DECIMAL]:[INSERT] } | SELECT name FROM `<table0>` WHERE department = 'quality control'; | What are the names of all employees who work in the 'quality control' department? |
<table0>[table_9646] { <col0>[Lane]:[real] <col1>[text]:[Country] <col2>[text]:[Mark] <col3>[real]:[React] } | SELECT COUNT( "Mark" ) FROM `<table0>` WHERE "Country" = 'russia' AND "React" < '0.165' | What is the total number of Mark, when Country is 'Russia', and when React is less than 0.165?
|
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[prescriptions] ... | SELECT AVG( t1.c1 ) FROM ( SELECT SUM( `<table12>`.`<table12>` ) AS c1 FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.icd9_code = ( SELECT `<table7>`.icd9_code FROM `<table7>` WHERE `<table7>`.short_title = 'skin closure nec' ) ) AND STRFTIME( '%y', `<table12>... | what is the average hospital cost that involves the procedure known as skin closure nec since 2105? |
<table0>[table_38259] { <col0>[Elementary]:[Schools] <col1>[text]:[Mascot] <col2>[text]:[Address] <col3>[text]:[Principal] <col4>[2013]:[2014] <col5>[text]:[Assistant] <col6>[Principal]:[2013] <col7>[2014]:[text] } | SELECT "Address" FROM `<table0>` WHERE "Assistant `<col6>` ( 2013-2014 )" = 'kelly papke' | What is the address for the assistant principal named Kelly Papke?
|
<table0>[table_191105_2] { <col0>[first_aired]:[VARCHAR] <col1>[performed_by]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Zachary Sanders" | When zachary sanders is the performer how many first aired are there?
|
<table0>[table_204_251] { <col0>[number]:[community] <col1>[text]:[area] <col2>[text]:[location] <col3>[text]:[population] <col4>[number]:[date] <col5>[established]:[text] } | SELECT COUNT( "community" ) FROM `<table0>` WHERE "population" = 0 | how many communities have a population of zero ?
|
<table0>[table_203_277] { <col0>[number]:[entered] <col1>[number]:[wrestler] <col2>[text]:[place] <col3>[text]:[eliminated] <col4>[text]:[time] } | SELECT "wrestler" FROM `<table0>` WHERE "wrestler" <> 'alex shelley' AND "wrestler" <> 'robert roode' AND "time" = ( SELECT "time" FROM `<table0>` WHERE "wrestler" = 'robert roode' ) | alex shelly and robert roode had the same time as which other wrestler ?
|
<table0>[defense_diplomacy_2] { <col0>[INT]:[event] <col1>[VARCHAR]:[255] <col2>[participants]:[INT] } | SELECT AVG( `<col2>` ) AS avg_participants FROM `<table0>` GROUP BY event ORDER BY avg_participants DESC; | What is the average number of participants per defense diplomacy event, ordered from highest to lowest? |
<table0>[vessels] { <col0>[INT]:[name] <col1>[TEXT]:[type] <col2>[TEXT]:[safety_score] } <table1>[inspections] { <col0>[INT]:[vessel_id] <col1>[INT]:[date] <col2>[DATE]:[result] <col3>[TEXT]:[INSERT] <col4>[vessels]:[name] <col5>[type]:[safety_score] <col6>[VALUES]:[VesselJ] <col7>[Research]:[INSERT] } | SELECT COUNT( * ) FROM `<table1>` i JOIN `<col4>` v ON i.vessel_id = v.id WHERE v.safety_score < 75 AND i.date BETWEEN '2021-01-01' AND '2021-12-31' AND v.type = 'Research' AND i.result = 'Passed'; | What is the number of inspections for vessels that have a safety score below 75 and have traveled to the Antarctic Ocean in 2021? |
<table0>[table_name_81] { <col0>[score]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2 | When the game is listed as 2, what is the score? |
<table0>[city] { <col0>[integer]:[city_name] } <table1>[games] { <col0>[integer]:[games_year] <col1>[integer]:[games_name] <col2>[text]:[season] } <table2>[games_city] { <col0>[games_id]:[integer] <col1>[city_id]:[integer] } <table3>[medal] { <col0>[integer]:[medal_name] } <table4>[noc_region] { <col0>[integer]:[no... | SELECT CAST( COUNT( CASE WHEN T3.gender = 'M' THEN 1 ELSE NULL END ) AS REAL ) * 100 / COUNT( T2.person_id ) FROM `<table4>` AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Estonia' | What is the percentage of male athletes from Estonia? |
<table0>[table_name_77] { <col0>[head_s__of_government]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "don stephen senanayake" | What is the head of government for Don Stephen Senanayake? |
<table0>[table_67353] { <col0>[Date]:[text] <col1>[City]:[text] <col2>[Event]:[text] <col3>[Winner]:[text] <col4>[Prize]:[text] } | SELECT "Winner" FROM `<table0>` WHERE "Prize" = '€880,000' | Who is the Winner, when the Prize is 880,000? |
<table0>[table_46942] { <col0>[Year]:[real] <col1>[Men]:[Open] <col2>[text]:[Women] <col3>[Open]:[text] <col4>[Mixed]:[Open] <col5>[text]:[Men] <col6>[u20]:[text] <col7>[Women]:[u20] <col8>[text]:[Senior] <col9>[Mixed]:[text] <col10>[Men]:[text] <col11>[Women]:[text] <col12>[Men]:[text] <col13>[Women]:[text] <col14>[Me... | SELECT "Women's 35" FROM `<table0>` WHERE "Men's 50" = 'n/a' AND "Men's 40" = 'southern suns def sunwest razorbacks' | Which Women's 35 has a Men's 50 of n/A, and a Men's 40 of southern suns def sunwest razorbacks?
|
<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>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id... | SELECT `<table13>`.short_title FROM `<table13>` WHERE `<table13>`.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, `<table15>`.charttime FROM `<table15>` JOIN admissions ON `<table15>`.hadm_id = admissions.hadm_id W... | until 2104 what were the top three most frequent diagnoses that patients were diagnosed with within 2 months after the diagnosis of cardiac arrest?
|
<table0>[table_name_85] { <col0>[race_1]:[VARCHAR] <col1>[race_4]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1" | What is Race 1, when Race 4 is 1? |
<table0>[consumer_preferences] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[255]:[preference_score] } | SELECT product_name, preference_score FROM `<table0>` ORDER BY preference_score DESC LIMIT 5; | What are the top 5 most preferred cosmetic products by consumers? |
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table8>`.unitadmittime ) ) FROM `<table8>` WHERE `<table8>`.uniquepid = '032-24135' AND `<table8>`.wardid = 1068 AND `<table8>`.hospitaldischargetime IS NULL ORDER BY `<table8>`.unitadmittime LIMIT 1 | what is the number of hours since patient 032-24135 first visited ward 1068 on this hospital visit?
|
<table0>[table_11622255_1] { <col0>[score]:[VARCHAR] } | SELECT MAX( 1 AS st_prize__ ) AS $__ FROM `<table0>` WHERE `<col0>` = "193 ( -17 )" | what is the maximum 1st prize( $ ) where score is 193 (-17) |
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer... | SELECT Users.DisplayName, SUM( LENGTH( Body ) ) * 1.0 / Reputation AS "letters_per_rep_point" FROM `<table24>` INNER JOIN Users ON `<table24>`.OwnerUserId = Users.Id WHERE Reputation > '##repthreshold##' GROUP BY Users.DisplayName, Reputation ORDER BY 2 | How hard did they work for their rep?. |
<table0>[nba_teams] { <col0>[player_name]:[VARCHAR] <col1>[age]:[INT] <col2>[position]:[VARCHAR] <col3>[team_name]:[VARCHAR] } | SELECT AVG( age ) FROM nba_teams; | What is the average age of basketball players in the 'nba_teams' table? |
<table0>[customer_master_index] { <col0>[cmi_details]:[VARCHAR] } | SELECT * FROM `<table0>` ORDER BY `<col0>` DESC | List all information about customer master index, and sort them by details in descending order.
|
<table0>[table_name_87] { <col0>[points_against]:[VARCHAR] <col1>[club]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "porthcawl rfc" | Name the points against for porthcawl rfc
|
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text]... | SELECT `<table6>`.uniquepid FROM `<table6>` WHERE `<table6>`.`<table6>`unitstayid IN ( SELECT `<table7>`.`<table6>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`name = 'transfusion reaction' AND DATETIME( `<table7>`.`<table7>`time ) <= DATETIME( CURRENT_TIME( ), '-1 year' ) ) | list patient ids of patients diagnosed with transfusion reaction until 1 year ago. |
<table0>[Dams] { <col0>[INT]:[name] <col1>[TEXT]:[height] <col2>[INT]:[river_id] } <table1>[Rivers] { <col0>[INT]:[name] <col1>[TEXT]:[INSERT] <col2>[Dams]:[name] <col3>[height]:[river_id] <col4>[VALUES]:[Hoover] <col5>[Dam]:[221] } | SELECT `<table0>`.name, `<table0>`.height, Rivers.name AS river_name FROM `<table0>` INNER JOIN Rivers ON `<table0>`.river_id = Rivers.id ORDER BY `<table0>`.height DESC; | List all the dams with their height and the name of the river they are located in, sorted by the dam's height 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 `<table3>`.admission_location, diagnoses.short_title FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.subject_id = "2560" | find the admission location and diagnosis of subject id 2560. |
<table0>[table_name_64] { <col0>[population]:[INTEGER] <col1>[area__km_2]:[VARCHAR] <col2>[type]:[VARCHAR] <col3>[name]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col2>` = "m" AND `<col3>` = "saint-blaise-sur-richelieu" AND area__km_2__ < 68.42 | Saint-Blaise-Sur-Richelieu is smaller than 68.42 km^2, what is the population of this type M municipality?
|
<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 `<col9>` FROM `<table1>` WHERE `<col3>` = '23643502008' AND `<col6>` = '盐酸普罗帕酮片' | 在编号23643502008的医疗就诊中,盐酸普罗帕酮片的医疗发票是开进哪个项目类别的
|
<table0>[suppliers] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[100] <col3>[product]:[VARCHAR] <col4>[100]:[country] <col5>[VARCHAR]:[100] <col6>[sustainability_score]:[INT] } <table1>[cosmetics_sales] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[product] <col2>[VARCHAR]:[100] <col3>[quantity]:[INT] <col4>[rev... | SELECT cp.product FROM `<table3>` cp JOIN customers c ON cp.customer_id = c.id JOIN suppliers s ON cp.product = s.product WHERE c.age <= 30 AND s.sustainability_score >= 80; | What are the cosmetic products that have a sustainability score of 80 or higher and are preferred by customers who are 30 or under? |
<table0>[table_204_511] { <col0>[number]:[number] <col1>[number]:[driver] <col2>[text]:[entrant] <col3>[text]:[chassis] <col4>[text]:[engine] <col5>[text]:[tyre] } | SELECT "engine" FROM `<table0>` GROUP BY "engine" HAVING COUNT( * ) = 1 | what was the only engine used one time ?
|
<table0>[AssignedTo] { <col0>[Scientist]:[int] <col1>[Project]:[char] } <table1>[Scientists] { <col0>[SSN]:[int] } <table2>[Projects] { <col0>[Code]:[Char] <col1>[Char]:[Hours] } | SELECT Name, COUNT( * ) FROM `<table2>` AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY Name DESC | Find the number of scientists involved for each project name, and sort by the X-axis in desc. |
<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 `<table0>`.drugname FROM `<table0>` WHERE `<table0>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '005-76912' ) ) AND DATETIME( `<tabl... | what was the name of the medication which was prescribed to patient 005-76912 the last time in 07/this year?
|
<table0>[table_2437] { <col0>[Conference]:[text] <col1>[Regular]:[Season] <col2>[Winner]:[text] <col3>[Conference]:[Player] <col4>[Year]:[text] <col5>[Conference]:[Tournament] <col6>[text]:[Tournament] <col7>[Venue]:[City] <col8>[text]:[Tournament] <col9>[Winner]:[text] } | SELECT "Tournament `<col7>` ( City )" FROM `<table0>` WHERE "Regular Season Winner" = 'Weber State' | Where was the tourney when Weber State won the regular season?
|
<table0>[Spacecrafts] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[manufacturer]:[VARCHAR] <col3>[100]:[mission_to_mars] } <table1>[Manufacturers] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[INSERT]:[Spacecrafts] <col3>[VALUES]:[Mars] <col4>[Rover]:[SpaceCorp] <col5>[TRUE]:[INSERT] <col6>[Spacecrafts]:[VALU... | SELECT Manufacturers.name, SUM( CASE WHEN `<table0>`.mission_to_mars = TRUE THEN 1 ELSE 0 END ) AS missions_to_mars, SUM( CASE WHEN `<table0>`.mission_to_mars = TRUE THEN 1 ELSE 0 END ) / COUNT( * ) * `<col3>` AS mars_mission_percentage FROM `<table0>` INNER JOIN Manufacturers ON `<table0>`.manufacturer = Manufacturers... | What is the total number of spacecraft built by each manufacturer and the number of those spacecraft that were part of missions to Mars? |
<table0>[table_62247] { <col0>[Tie]:[text] <col1>[Home]:[team] <col2>[text]:[Score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Date]:[text] } | SELECT "Home team" FROM `<table0>` WHERE "Tie no" = '27' | What is Home Team, when Tie no is '27'? |
<table0>[table_204_106] { <col0>[number]:[year] <col1>[number]:[title] <col2>[text]:[image] <col3>[text]:[dimensions] <col4>[text]:[collection] <col5>[text]:[comments] } | SELECT MIN( "year" ) - 1944 FROM `<table0>` WHERE "year" > 1944 | how long after 1944 did terence cuneo complete his next work ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.