schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[SeoulDigitalExhibitions] { <col0>[INT]:[exhibition_name] <col1>[VARCHAR]:[city] <col2>[VARCHAR]:[launch_date] <col3>[DATE]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE city = 'Seoul' AND launch_date BETWEEN DATE_SUB( CURRENT_DATE, INTERVAL 3 YEAR ) AND CURRENT_DATE; | How many digital exhibitions were launched by museums in Seoul in the last three years? |
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.admission_type = "EMERGENCY" AND diagnoses.long_title = "Chronic pancreatitis" | provide the number of patients whose admission type is emergency and diagnoses long title is chronic pancreatitis?
|
<table0>[table_train_240] { <col0>[int]:[anemia] <col1>[bool]:[gender] <col2>[string]:[systolic_blood_pressure_sbp] <col3>[int]:[hemoglobin_a1c_hba1c] <col4>[float]:[estimated_glomerular_filtration_rate_egfr] <col5>[int]:[diastolic_blood_pressure_dbp] <col6>[int]:[insulin_requirement] <col7>[float]:[kidney_disease] <co... | SELECT * FROM `<table0>` WHERE body_mass_index_bmi >= 18 AND body_mass_index_bmi <= 30 | all subjects must have bmi between 18 _ 30
|
<table0>[table_name_97] { <col0>[competition]:[VARCHAR] <col1>[result]:[VARCHAR] <col2>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "draw" AND `<col2>` = "29 november 1997" | What was the competition on 29 November 1997 that resulted in a draw?
|
<table0>[nasa_mars_rovers] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[agency]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'NASA'; | How many Mars rovers have been launched by NASA? |
<table0>[Textiles] { <col0>[brand]:[VARCHAR] <col1>[fabric_type]:[VARCHAR] } | SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'Eco-conscious Living' INTERSECT SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'Green Garments'; | Compare the number of sustainable fabric types in the 'Textiles' table between brands 'Eco-conscious Living' and 'Green Garments'. |
<table0>[companies] { <col0>[INT]:[name] <col1>[TEXT]:[industry] <col2>[TEXT]:[founding_year] <col3>[INT]:[founder_gender] <col4>[TEXT]:[INSERT] } | UPDATE companies SET founder_gender = 'Non-binary' WHERE name = 'TechForAll'; | Update the founder_gender to 'Non-binary' for the startup with name 'TechForAll'. |
<table0>[book] { <col0>[Book_ID]:[int] <col1>[Title]:[text] <col2>[Issues]:[real] <col3>[Writer]:[text] } <table1>[publication] { <col0>[Publication_ID]:[int] <col1>[Book_ID]:[int] <col2>[Publisher]:[text] <col3>[Publication_Date]:[text] <col4>[Price]:[real] } | SELECT Publisher, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` ORDER BY COUNT( * ) DESC | Show different publishers together with the number of publications they have in a bar chart, and I want to rank y axis from high to low order.
|
<table0>[table_name_69] { <col0>[opponent]:[VARCHAR] <col1>[championship]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pétange" | What is Opponent, when Championship is Pétange? |
<table0>[Agents] { <col0>[AgentID]:[INT] <col1>[AgentName]:[VARCHAR] <col2>[255]:[PolicyID] <col3>[INT]:[INSERT] } <table1>[Policies] { <col0>[PolicyID]:[INT] <col1>[ClaimAmount]:[DECIMAL] } | SELECT a.AgentName, SUM( p.ClaimAmount ) AS TotalClaimAmount FROM `<table0>` a JOIN Policies p ON a.PolicyID = p.PolicyID GROUP BY a.AgentName; | What is the total claim amount per sales agent? |
<table0>[Subjects] { <col0>[subject_id]:[INTEGER] <col1>[subject_name]:[VARCHAR] } <table1>[Student_Course_Enrolment] { <col0>[registration_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[course_id]:[INTEGER] <col3>[date_of_enrolment]:[DATETIME] <col4>[date_of_completion]:[DATETIME] } <table2>[Students] { <col0>[st... | SELECT date_of_enrolment, COUNT( `<col3>` ) FROM `<table1>` AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY `<col3>` | What are the enrollment dates of all the tests that have result 'Pass', and count them by a line chart |
<table0>[table_65028] { <col0>[Rank]:[real] <col1>[Athletes]:[text] <col2>[Country]:[text] <col3>[Time]:[text] <col4>[Notes]:[text] } | SELECT "Notes" FROM `<table0>` WHERE "Rank" > '2' AND "Time" = '1:48.179' | What are the notes for the person ranked larger than 2, and a time of 1:48.179?
|
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varcha... | SELECT LAST_NAME, `<col7>` FROM `<table5>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` 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, show me about the distribution of last_name and salary in a bar chart, and could you order in descending by the bar please?
|
<table0>[table_76619] { <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 "Grid" FROM `<table0>` WHERE "Points" = '24' | What grid has 24 points?
|
<table0>[table_203_781] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[notes] } | SELECT COUNT( "competition" ) FROM `<table0>` WHERE "year" = 2005 | how many competitions were held in 2005 ? |
<table0>[table_name_64] { <col0>[surface]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "15 february 1988" | What Surface has a Date of 15 february 1988? |
<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 INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "MAIN" AND lab.label = "Calculated TBG" | what is the number of patients whose drug type is main and lab test name is calculated tbg? |
<table0>[Reservations] { <col0>[Code]:[INTEGER] <col1>[Room]:[TEXT] <col2>[CheckIn]:[TEXT] <col3>[CheckOut]:[TEXT] <col4>[Rate]:[REAL] <col5>[LastName]:[TEXT] <col6>[FirstName]:[TEXT] <col7>[Adults]:[INTEGER] <col8>[Kids]:[INTEGER] } <table1>[Rooms] { <col0>[RoomId]:[TEXT] <col1>[roomName]:[TEXT] <col2>[beds]:[INTEGER... | SELECT roomName, COUNT( * ) FROM `<table0>` AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY roomName | Return the name of rooms and the number of reservations made for each of the rooms to draw a bar chart, and order bars in asc order. |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table4>`.unitadmittime ) ) FROM `<table4>` WHERE `<table4>`.uniquepid = '013-33898' AND `<table4>`.wardid = 559 AND `<table4>`.hospitaldischargetime IS NULL ORDER BY `<table4>`.unitadmittime DESC LIMIT 1 | how many hours have passed since the last stay of patient 013-33898 in the ward 559 during their current hospital visit?
|
<table0>[Workouts] { <col0>[MemberID]:[INT] <col1>[State]:[VARCHAR] <col2>[WorkoutType]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'Texas' AND `<col2>` = 'Yoga'; | How many 'Yoga' workouts were conducted by members from 'Texas'? |
<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 COUNT( * ) > 0 FROM `<table2>` INNER JOIN `<table2>`_offering ON `<table2>`.`<table2>`_id = `<table2>`_offering.`<table2>`_id INNER JOIN semester ON semester.semester_id = `<table2>`_offering.semester WHERE `<table2>`_offering.section_number = 269 AND `<table2>`.department = 'RCARTS' AND `<table2>`.number = 385 ... | Is RCARTS 385 section 269 offered this Summer 2014 semester ? |
<table0>[characteristics] { <col0>[characteristic_id]:[number] <col1>[characteristic_type_code]:[text] <col2>[characteristic_data_type]:[text] <col3>[characteristic_name]:[text] <col4>[other_characteristic_details]:[text] } <table1>[ref_colors] { <col0>[color_code]:[text] <col1>[color_description]:[text] } <table2>[p... | SELECT T1.product_name FROM `<table3>` AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow' | Give the name of the products that have a color description 'yellow'.
|
<table0>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] <col6>[Room]:[VARCHAR] <col7>[Building]:[VARCHAR] } <table1>[Department] { <col0>[DNO]:[INTEGER] <col1>[Division]:[VARCHAR] <col2>[DName]:[VARCHAR] <col3>[Roo... | SELECT T1.CName, COUNT( T1.CName ) FROM `<table2>` AS T1 JOIN Enrolled_in AS T2 ON T1.CID = T2.CID GROUP BY T1.CName, T2.CID HAVING COUNT( * ) >= 5 | What is the number of each course name that have at least five enrollments? Show me a bar chart. |
<table0>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6>[Oppose_rate]:[real] <col7>[Unsure_rate]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Bi... | SELECT Sex, SUM( Height ) FROM `<table1>` GROUP BY `<col1>` | Return a bar chart about the distribution of Sex and the sum of Height , and group by attribute Sex.
|
<table0>[hotels] { <col0>[hotel_id]:[INT] <col1>[name]:[TEXT] } <table1>[virtual_tours] { <col0>[tour_id]:[INT] <col1>[hotel_id]:[INT] <col2>[engagement]:[INT] <col3>[last_activity]:[TIMESTAMP] <col4>[INSERT]:[hotels] <col5>[hotel_id]:[name] <col6>[VALUES]:[Hotel] <col7>[Hotel]:[INSERT] } | SELECT `<table0>`.name FROM `<table0>` LEFT JOIN virtual_tours ON `<table0>`.hotel_id = virtual_tours.hotel_id WHERE virtual_tours.last_activity IS NULL OR virtual_tours.last_activity < DATE_SUB( CURRENT_TIMESTAMP, INTERVAL 1 MONTH ); | Which hotels have no virtual tour engagement in the last month? |
<table0>[Dorm] { <col0>[dormid]:[INTEGER] <col1>[dorm_name]:[VARCHAR] <col2>[student_capacity]:[INTEGER] <col3>[gender]:[VARCHAR] } <table1>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } <table2>[Has_amenity] { <col0>[dormid]:[INTEGER] <col1>[amenid]:[INTEGER] } <table3... | SELECT dorm_name, AVG( T1.Age ) FROM `<table4>` AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY AVG( T1.Age ) | what is the average age for each dorm and what are the names of each dorm?, list by the total number in asc. |
<table0>[business] { <col0>[bid]:[int] <col1>[business_id]:[varchar] <col2>[name]:[varchar] <col3>[full_address]:[varchar] <col4>[city]:[varchar] <col5>[latitude]:[varchar] <col6>[longitude]:[varchar] <col7>[review_count]:[bigint] <col8>[is_open]:[tinyint] <col9>[rating]:[float] <col10>[state]:[varchar] } <table1>[rev... | SELECT `<col4>` FROM `<table0>` WHERE `<col9>` < 1.5 | Find the cities of businesses rated below 1.5
|
<table0>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table1>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <... | SELECT meter_200, AVG( meter_100 ) FROM `<table2>` GROUP BY meter_200 ORDER BY AVG( meter_100 ) DESC | Give me the comparison about the average of meter_100 over the meter_200 , and group by attribute meter_200, display from high to low by the mean meter 100. |
<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>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[Tar... | SELECT p.Id, p.Title, p.Body, k.Body FROM `<table9>` AS p INNER JOIN `<table9>` AS k ON p.Id = k.ParentId WHERE p.Id IN ( '##id##' ) AND k.PostTypeId = 2 | Separate a post in id, title, question and answers for given post Id. Example input: 3006643,2106715,1429318
(.csv downloadable for about 200 PostID's)
|
<table0>[table_35444] { <col0>[School]:[text] <col1>[Mascot]:[text] <col2>[Location]:[text] <col3>[Enrollment]:[real] <col4>[IHSAA]:[Class] <col5>[text]:[IHSAA] <col6>[Football]:[Class] <col7>[text]:[County] } | SELECT "Mascot" FROM `<table0>` WHERE "Enrollment" > '2,191' AND "School" = 'noblesville' | What is the mascot for the school with a student body larger than 2,191 in Noblesville? |
<table0>[table_23284271_10] { <col0>[date]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "@ LA Clippers" | Which date is the team @ la clippers? |
<table0>[Settlements] { <col0>[Settlement_ID]:[INTEGER] <col1>[Claim_ID]:[INTEGER] <col2>[Date_Claim_Made]:[DATE] <col3>[Date_Claim_Settled]:[DATE] <col4>[Amount_Claimed]:[INTEGER] <col5>[Amount_Settled]:[INTEGER] <col6>[Customer_Policy_ID]:[INTEGER] } <table1>[Claims] { <col0>[Claim_ID]:[INTEGER] <col1>[Policy_ID]:[I... | SELECT Date_Payment_Made, SUM( Amount_Payment ) FROM `<table3>` GROUP BY Date_Payment_Made ORDER BY Date_Payment_Made | Return a trend line with sorting the payment day in ascending order to show the total amount of payment by each payment day.
|
<table0>[table_name_44] { <col0>[qual]:[VARCHAR] <col1>[rank]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "18" AND `<col2>` = "1964" | What is the qual for rank 18 in 1964? |
<table0>[table_23403578_3] { <col0>[original_air_date]:[VARCHAR] <col1>[prod_code]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "213" | When did the episode with production code 213 air for the first time?
|
<table0>[drones] { <col0>[INT]:[drone_model] <col1>[VARCHAR]:[status] <col2>[VARCHAR]:[last_maintenance] <col3>[DATETIME]:[INSERT] } | SELECT drone_model, last_maintenance as maintenance_request_date FROM `<table0>` WHERE status = 'inactive'; | List all drone maintenance requests along with the date of the request |
<table0>[table_2226817_12] { <col0>[title]:[VARCHAR] <col1>[production_code]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11.01" | what is the name of the episode when the production code is 11.01? |
<table0>[gwyjzb] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text]... | SELECT COUNT( * ) FROM `<table0>` WHERE `<table0>`.PERSON_ID = '35826599' AND `<table0>`.IN_HOSP_DATE BETWEEN '2013-01-05' AND '2017-02-08' AND `<table0>`.CLINIC_TYPE = '住院' UNION SELECT COUNT( * ) FROM f`<table0>` WHERE f`<table0>`.PERSON_ID = '35826599' AND f`<table0>`.IN_HOSP_DATE BETWEEN '2013-01-05' AND '2017-02-0... | 从2013年1月5日到2017年2月8日,患者35826599的住院次数总共多少次?
|
<table0>[Sales] { <col0>[sale_id]:[INT] <col1>[sale_date]:[DATE] <col2>[sale_country]:[VARCHAR] <col3>[255]:[sale_revenue] <col4>[DECIMAL]:[INSERT] } | SELECT sale_country, SUM( sale_revenue ) as total_sales_revenue FROM `<table0>` WHERE `<col1>` BETWEEN DATE_SUB( CURRENT_DATE, INTERVAL 3 MONTH ) AND CURRENT_DATE GROUP BY sale_country; | What is the total sales revenue for each country in the last quarter? |
<table0>[table_203_577] { <col0>[number]:[tenure] <col1>[text]:[coach] <col2>[text]:[years] <col3>[number]:[record] <col4>[text]:[pct] } | SELECT "coach" FROM `<table0>` ORDER BY "years" DESC LIMIT 1 | which coach had the most years as a coach ? |
<table0>[Students] { <col0>[student_id]:[INTEGER] <col1>[date_of_registration]:[DATETIME] <col2>[date_of_latest_logon]:[DATETIME] <col3>[login_name]:[VARCHAR] <col4>[password]:[VARCHAR] <col5>[personal_name]:[VARCHAR] <col6>[middle_name]:[VARCHAR] <col7>[family_name]:[VARCHAR] } <table1>[Course_Authors_and_Tutors] { <... | SELECT date_test_taken, COUNT( `<col1>` ) FROM `<table4>` WHERE `<col2>` = "Pass" GROUP BY `<col1>` | Find the dates of the tests taken with result 'Pass', and count them by a bar chart
|
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture... | SELECT `<table4>`.drugname FROM `<table4>` WHERE `<table4>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '012-25893' ) ) AND DATETIME( `<tabl... | what drug was the first drug prescribed for patient 012-25893 in 03/this year? |
<table0>[table_203_367] { <col0>[number]:[year] <col1>[text]:[driver] <col2>[text]:[constructor] <col3>[text]:[location] <col4>[text]:[report] } | SELECT "driver" FROM `<table0>` GROUP BY "driver" ORDER BY COUNT( * ) DESC LIMIT 1 | who had the most wins ? |
<table0>[table_name_28] { <col0>[rank]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "great britain" | What was the rank for Great Britain? |
<table0>[table_name_21] { <col0>[pick__number]:[INTEGER] <col1>[college]:[VARCHAR] <col2>[round]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "carson-newman" AND `<col2>` < 7 | What's the average draft pick number from Carson-Newman College before Round 7? |
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in... | SELECT COUNT( * ) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND co... | Can I take 523 on Mondays and Wednesdays ?
|
<table0>[Devices] { <col0>[INT]:[name] <col1>[VARCHAR]:[company] <col2>[VARCHAR]:[price] <col3>[DECIMAL]:[community] <col4>[VARCHAR]:[INSERT] } | SELECT MIN( price ) FROM `<table0>` WHERE community IN ( 'Minority Owned Business', 'Women Owned Business', 'Non-Profit' ); | What is the minimum price of devices produced by companies located in underrepresented communities? |
<table0>[materials] { <col0>[INT]:[name] <col1>[TEXT]:[recycled] } <table1>[inventory] { <col0>[INT]:[material_id] <col1>[INT]:[quantity] <col2>[INT]:[INSERT] <col3>[materials]:[name] <col4>[recycled]:[VALUES] <col5>[Material]:[true] <col6>[Material]:[false] <col7>[Material]:[true] } | SELECT SUM( `<table1>`.quantity ) FROM `<table1>` INNER JOIN `<col3>` ON `<table1>`.material_id = materials.id WHERE materials.recycled = true; | What is the total quantity of recycled materials in stock? |
<table0>[user_profiles] { <col0>[name]:[VARCHAR] <col1>[email]:[VARCHAR] <col2>[followers]:[INTEGER] } | SELECT name, `<col1>` FROM `<table0>` WHERE `<col2>` > 1000 | Find the name and email of the users who have more than 1000 followers.
|
<table0>[table_name_80] { <col0>[extra]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[result]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2002 AND `<col2>` = "8th" | What event (Extra) in 2002 did the competitor compete in and place 8th? |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:... | SELECT t3.`<table6>`name FROM ( SELECT t2.`<table6>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table6>`.`<table6>`time FROM `<table6>` JOIN patient ON `<table6>`.patientunitstayid = patient.patientunitstayid WHERE `<table6>`.`<table6>`name = 'neurosurgery consultation... | what is the top five most common procedures that followed during the same month for patients who received neurosurgery consultation during the previous year? |
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId]... | SELECT COUNT( * ) AS "`<table9>` participating in the strike" FROM `<table9>` WHERE LOWER( DisplayName ) LIKE '%reinstate%monica%' | Users participating the in strike. |
<table0>[community_development] { <col0>[member_id]:[INT] <col1>[member_name]:[VARCHAR] <col2>[age]:[INT] <col3>[area_id]:[INT] } <table1>[agriculture_innovation] { <col0>[farmer_id]:[INT] <col1>[farmer_name]:[VARCHAR] <col2>[member_id]:[INT] } | SELECT COUNT( c.member_id ) FROM `<table0>` c INNER JOIN agriculture_innovation a ON c.member_id = a.member_id WHERE c.area_id IN ( SELECT `<col3>` FROM `<table0>` WHERE area_name = 'rural_area_3' ); | Count the number of community members participating in agricultural innovation programs in 'rural_area_3' from the 'community_development' and 'agriculture_innovation' tables |
<table0>[table_18274425_1] { <col0>[written_by]:[VARCHAR] <col1>[production_code]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3T7573" | Who were the authors of episode having production code 3t7573? |
<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 Team_Name, `<col4>` FROM `<table0>` ORDER BY `<col4>` DESC | Give me the comparison about ACC_Percent over the Team_Name by a bar chart, could you display by the ACC_Percent in desc? |
<table0>[table_name_58] { <col0>[time]:[VARCHAR] <col1>[ground]:[VARCHAR] <col2>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "humber college north" AND `<col2>` = "toronto downtown dingos" | What time has humber college north as the ground, and toronto downtown dingos as the home? |
<table0>[authors] { <col0>[authid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] } <table1>[inst] { <col0>[instid]:[number] <col1>[name]:[text] <col2>[country]:[text] } <table2>[papers] { <col0>[paperid]:[number] <col1>[title]:[text] } <table3>[authorship] { <col0>[authid]:[number] <col1>[instid]:[number] <col2... | SELECT DISTINCT t3.name FROM `<table0>` AS t1 JOIN `<table0>`hip AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Katsuhiro" AND t1.lname = "Ueno" | Which institution does 'Katsuhiro Ueno' belong to?
|
<table0>[community_health_workers] { <col0>[worker_id]:[INT] <col1>[name]:[VARCHAR] <col2>[culture]:[VARCHAR] <col3>[score]:[INT] } | SELECT * FROM community_health_workers; | List all community health workers and their respective cultural competency scores. |
<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, COUNT( `<col9>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY COUNT( `<col9>` ) | Give me the comparison about the amount of All_Home over the All_Home , and group by attribute All_Home by a bar chart, and sort in asc by the total number. |
<table0>[SpeciesWaterTemp] { <col0>[SpeciesID]:[int] <col1>[Date]:[date] <col2>[WaterTemp]:[float] } | SELECT SpeciesName, AVG( `<col2>` ) as AvgTemp FROM `<table0>` INNER JOIN FishSpecies ON `<table0>`.SpeciesID = FishSpecies.SpeciesID WHERE MONTH( `<col1>` ) = 1 GROUP BY SpeciesName; | What is the average water temperature for each fish species in January? |
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT `<table1>`.admission_type, `<table1>`.discharge_location FROM `<table1>` WHERE `<table1>`.subject_id = "17570" | what is the admission type and discharge location of subject id 17570?
|
<table0>[table_name_16] { <col0>[place]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "wales" | What place has Wales as a country? |
<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>`.ethnicity = "ASIAN" AND lab.label = "Globulin" | how many of the asian patients had a test for globulin? |
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[numbe... | SELECT rate.TagName AS Tag, rate.Rate AS QuestionsTotal FROM ( SELECT COUNT( PostId ) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < DATEADD( month, -29, GETDATE( ) ) AND Posts.CreationDate > DATEADD( month, -30, GETDATE( ) ) AND TagName IN ( ... | Popularity of JavaScript frameworks for a given time period. Count and rank of Ember.js, Knockout.js, Backbone.js, and Angular.js tags in the last month.
|
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table2>[d... | SELECT DISTINCT flight.flight_id FROM `<table14>` AS AIRPORT_SERVICE_0, `<table14>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.arrival_time <= 1700 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code )... | i want a flight between OAKLAND and BOSTON that arrives before 1700
|
<table0>[table_name_1] { <col0>[attendance]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2 | Game 2 has how much attendance? |
<table0>[table_name_42] { <col0>[start_source]:[VARCHAR] <col1>[loan_club]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "fulham" | What is the loan start source when the loan club is fulham? |
<table0>[PolicyAdvocacy] { <col0>[PolicyAdvocacyID]:[INT] <col1>[AdvocacyType]:[VARCHAR] <col2>[255]:[INSERT] } | SELECT AdvocacyType, COUNT( * ) as TotalAdvocacy FROM `<table0>` GROUP BY AdvocacyType; | What is the policy advocacy history for all organizations, per type of advocacy? |
<table0>[table_1307842_6] { <col0>[gdp__billion_us]:[VARCHAR] <col1>[gdp_per_capita__us]:[VARCHAR] } | SELECT gdp__billion_us$_ FROM `<table0>` WHERE gdp_per_capita__us$_ = 18048 | What was the gdp of the country with a gdp per capita of $18048?
|
<table0>[Volunteers] { <col0>[VolunteerID]:[INT] <col1>[VolunteerName]:[TEXT] <col2>[DateOfBirth]:[DATE] } <table1>[VolunteerPrograms] { <col0>[ProgramID]:[INT] <col1>[ProgramName]:[TEXT] } <table2>[VolunteerEvents] { <col0>[EventID]:[INT] <col1>[ProgramID]:[INT] <col2>[VolunteerID]:[INT] <col3>[EventDate]:[DATE] } | SELECT AVG( DATEDIFF( CURDATE( ), `<table0>`.DateOfBirth ) / 365.25 ) AS AverageAge FROM `<table0>` INNER JOIN VolunteerEvents ON `<table0>`.VolunteerID = VolunteerEvents.VolunteerID INNER JOIN VolunteerPrograms ON VolunteerEvents.ProgramID = VolunteerPrograms.ProgramID WHERE VolunteerPrograms.ProgramName = 'Arts'; | What is the average age of volunteers in the 'Arts' program? |
<table0>[table_29094] { <col0>[Series]:[real] <col1>[Episode]:[real] <col2>[Title]:[text] <col3>[Director]:[text] <col4>[Writer]:[text] <col5>[Original]:[Airdate] } | SELECT "Episode #" FROM `<table0>` WHERE "Title" = 'Written in Dust' | The episode with the title 'Written in Dust' is what episode #?
|
<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>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[chartt... | SELECT t1.startdate FROM ( SELECT admissions.subject_id, `<table3>`.startdate FROM `<table3>` JOIN admissions ON `<table3>`.hadm_id = admissions.hadm_id WHERE `<table3>`.drug = 'lr' AND admissions.subject_id = 14836 AND STRFTIME( '%y-%m', `<table3>`.startdate ) = '2105-02' ) AS t1 JOIN ( SELECT admissions.subject_id, `... | when was the last time patient 14836 had been prescribed lr and eucerin at the same time in 02/2105? |
<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>`.discharge_location = "HOME HEALTH CARE" AND procedures.icd9_code = "92" | report the number of patients with procedure icd9 code 92 who had home health care discharge. |
<table0>[Settlements] { <col0>[Settlement_ID]:[INTEGER] <col1>[Claim_ID]:[INTEGER] <col2>[Date_Claim_Made]:[DATE] <col3>[Date_Claim_Settled]:[DATE] <col4>[Amount_Claimed]:[INTEGER] <col5>[Amount_Settled]:[INTEGER] <col6>[Customer_Policy_ID]:[INTEGER] } <table1>[Claims] { <col0>[Claim_ID]:[INTEGER] <col1>[Policy_ID]:[I... | SELECT Payment_Method_Code, COUNT( `<col2>` ) FROM `<table2>` GROUP BY `<col2>` | Plot the number of payment method code by grouped by payment method code as a bar graph
|
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[Creati... | SELECT ( ( SELECT Score FROM ( SELECT PERCENT AS Score FROM `<table1>` AS p WHERE p.PostTypeId = 2 AND NOT Score IS NULL ORDER BY Score LIMIT 50 ) AS A ORDER BY Score DESC LIMIT 1 ) + ( SELECT Score FROM ( SELECT PERCENT AS Score FROM `<table1>` AS p WHERE p.PostTypeId = 2 AND NOT Score IS NULL ORDER BY Score DESC LIMI... | Get the median question score for a tag.
|
<table0>[table_name_58] { <col0>[lead]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE others = "5%" | I want the lead for others being 5% |
<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>`.discharge_location FROM `<table0>` WHERE `<table0>`.subject_id = "3343" | what is the discharge location of subject id 3343?
|
<table0>[table_204_349] { <col0>[number]:[year] <col1>[number]:[conservative] <col2>[ncouncillors]:[number] <col3>[labour]:[ncouncillors] <col4>[number]:[independent] <col5>[ncouncillors]:[number] <col6>[liberal]:[ncouncillors] } | SELECT COUNT( "year" ) FROM `<table0>` WHERE "liberal\ncouncillors" = 0 | in how many years were there no liberal councillors ? |
<table0>[college] { <col0>[cName]:[VARCHAR] <col1>[enr]:[VARCHAR] } <table1>[tryout] { <col0>[pID]:[VARCHAR] <col1>[cName]:[VARCHAR] } <table2>[player] { <col0>[pName]:[VARCHAR] <col1>[pID]:[VARCHAR] } | SELECT T2.pName FROM `<table1>` AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = ( SELECT `<col1>` FROM `<table0>` ORDER BY `<col1>` DESC LIMIT 1 ) | Find the name of the tryout players who are from the college with largest size.
|
<table0>[table_name_93] { <col0>[enrollment]:[INTEGER] <col1>[location]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "onalaska" | What is the Enrollment at Onalaska? |
<table0>[table_11964154_11] { <col0>[record]:[VARCHAR] <col1>[high_rebounds]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Nick Collison ( 11 )" | What was the record when the high rebounds was from Nick Collison (11)? |
<table0>[table_204_313] { <col0>[number]:[date] <col1>[text]:[operation] <col2>[text]:[location] <col3>[text]:[type] <col4>[text]:[information] } | SELECT "date" - "date" FROM `<table0>` WHERE "operation" = 'operation maritime monitor' | how many months did operation maritime monitor last ?
|
<table0>[wells] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[TEXT]:[location] <col3>[TEXT]:[INSERT] } <table1>[production] { <col0>[well_id]:[INT] <col1>[date]:[DATE] } | SELECT w.name, SUM( p.gas_production ) as total_daily_production FROM `<table0>` w JOIN production p ON w.id = p.well_id WHERE w.location = 'Gulf of Mexico' GROUP BY w.name ORDER BY total_daily_production DESC LIMIT 3; | List the top 3 wells with the highest daily gas production in the Gulf of Mexico |
<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 `<table0>`.celllabel FROM `<table0>` WHERE `<table0>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '002-7771' ) ) AND `<table0>`.cellp... | what was the name of the output that patient 002-7771 got last until 1929 days ago? |
<table0>[DEX] { <col0>[transaction_date]:[DATE] <col1>[digital_asset]:[VARCHAR] <col2>[transaction_volume]:[DECIMAL] } | SELECT DATE_TRUNC( 'month', `<col0>` ) as month, digital_asset, SUM( `<col2>` ) as total_volume, RANK( ) OVER ( PARTITION BY month ORDER BY SUM( `<col2>` ) DESC ) as rank FROM `<table0>` GROUP BY month, digital_asset, `<col2>` HAVING rank <= 2; | Find the top 2 digital assets with the highest total transaction volume in the 'DEX' trading platform, partitioned by month and ordered by the total transaction volume in descending order. |
<table0>[table_name_29] { } | SELECT 2006 FROM `<table0>` WHERE 2011 = "0-0" | What 2006 has 0-0 as the 2011?
|
<table0>[CityPopulation] { <col0>[City]:[VARCHAR] <col1>[Population]:[INT] <col2>[Year]:[INT] } <table1>[ServiceRequests] { <col0>[RequestID]:[INT] <col1>[City]:[VARCHAR] <col2>[Service]:[VARCHAR] <col3>[RequestDate]:[DATE] } | SELECT City, Service, COUNT( * ) AS CurrentYearRequestCount, LAG( COUNT( * ) ) OVER( PARTITION BY City, `<col2>` ORDER BY Year ) AS PreviousYearRequestCount, COUNT( * ) - LAG( COUNT( * ) ) OVER( PARTITION BY City, `<col2>` ORDER BY Year ) AS RequestCountDifference FROM `<table1>` JOIN CityPopulation ON `<table1>`.City ... | Determine the number of service requests for each service type, and the difference in request count from the previous year for each service type, for cities with a population greater than 1 million. |
<table0>[incident] { <col0>[incident_id]:[INT] <col1>[incident_date]:[DATE] <col2>[incident_type]:[VARCHAR] } | SELECT `<table0>`_type, COUNT( * ) AS `<table0>`_count FROM `<table0>` WHERE `<table0>`_date >= CURDATE( ) - INTERVAL 30 DAY GROUP BY `<table0>`_type; | What is the distribution of security incidents by type (e.g., malware, phishing, etc.) for the last 30 days? |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[transfers] { <col0>[row_id]:[number] <col... | SELECT `<table7>`.charttime FROM `<table7>` WHERE `<table7>`.icustay_id IN ( SELECT `<table3>`.icustay_id FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 5142 ) ) AND `<table7>`.itemid IN ( SELECT `<table15>`.itemid FROM `<table15>` WHERE `<table1... | when was the last time patient 5142, , had the minimum arterial bp [systolic]?
|
<table0>[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>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1... | SELECT DISTINCT `<col5>` FROM `<table2>` WHERE `<col2>` = 'NERS' AND `<col3>` = 522 | What should I take before NERS 522 ? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <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 `<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.icd9_code = "E8859" AND prescriptions.drug_type = "ADDITIVE" | how many patients had the diagnosis icd9 code e8859 and drug type addictive?
|
<table0>[table_name_7] { <col0>[opponent]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "109–108" | Who was the opponent with a score of 109 108? |
<table0>[table_name_31] { <col0>[class]:[VARCHAR] <col1>[race_title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "xi coppa acerbo" | What class of car had the XI Coppa Acerbo title? |
<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>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "75733" AND lab.flag = "delta" | provide the number of patients with diagnoses icd9 code 75733 who had delta abnormal lab test status.
|
<table0>[table_name_9] { <col0>[event]:[VARCHAR] <col1>[round]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1" AND `<col2>` = "lance wipf" | What was the event for round 1 against Lance Wipf? |
<table0>[college] { <col0>[cname]:[text] <col1>[state]:[text] <col2>[enr]:[number] } <table1>[tryout] { <col0>[pid]:[number] <col1>[cname]:[text] <col2>[ppos]:[text] <col3>[decision]:[text] } <table2>[player] { <col0>[pid]:[number] <col1>[pname]:[text] <col2>[ycard]:[text] } | SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` WHERE `<col2>` < ( SELECT AVG( `<col2>` ) FROM `<table0>` ) | How many states have smaller colleges than average?
|
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <c... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table9>`.admittime ) ) FROM `<table9>` WHERE `<table9>`.subject_id = 68280 AND `<table9>`.dischtime IS NULL | what number of hours have it been since patient 68280 was admitted to the hospital?
|
<table0>[table_2850912_7] { <col0>[player]:[VARCHAR] <col1>[college_junior_club_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "New Westminster Bruins ( WHL )" | What is the name of the player when the college/junior/club team is new westminster bruins (whl)? |
<table0>[bdmzjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] <col5>[CYSJ]:[time] <col6>[CYZTDM]:[number] <col7>[HZXM]:[text] <col8>[JZKSDM]:[text] <col9>[JZKSMC]:[text] <col10>[JZLSH]:[number] <col11>[text]:[KLX] <col12>[number]:[MZBMLX] <col13>[numb... | SELECT COUNT( `<table5>`.RYBH ) FROM `<table5>` JOIN wdmzjzjlb ON `<table5>`.YLJGDM = wdmzjzjlb.YLJGDM AND `<table5>`.KH = wdmzjzjlb.KH AND `<table5>`.KLX = wdmzjzjlb.KLX WHERE wdmzjzjlb.YLJGDM = '6930782' AND DATEDIFF( wdmzjzjlb.CYSJ, wdmzjzjlb.RYSJ ) > 23 UNION SELECT COUNT( `<table5>`.RYBH ) FROM `<table5>` JOIN bdm... | 病人在医疗机构6930782就诊,住院天数超过23天的有多少人
|
<table0>[procedures] { <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>[la... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.language = "PORT" AND `<table4>`.age < "44" | give me the number of patients whose language is port and age is less than 44? |
<table0>[table_11869952_1] { <col0>[institutional_authority]:[VARCHAR] <col1>[rocket_launch]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Rehbar-II" | Which authority has a rocket launch called rehbar-ii?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.