schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[divisions] { <col0>[division]:[text] <col1>[name]:[text] <col2>[country]:[text] } <table1>[matchs] { <col0>[Div]:[text] <col1>[Date]:[date] <col2>[HomeTeam]:[text] <col3>[AwayTeam]:[text] <col4>[FTHG]:[integer] <col5>[FTAG]:[integer] <col6>[FTR]:[text] <col7>[season]:[integer] } | SELECT T2.name FROM `<table1>` AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2009-09-13' and T1.HomeTeam = 'Club Brugge' AND T1.AwayTeam = 'Genk' | What is the name of the division in which Club Brugge and Genk competed on September 13, 2009? |
<table0>[table_203_158] { <col0>[number]:[date] <col1>[text]:[time] <col2>[text]:[opponent] <col3>[text]:[rank] <col4>[text]:[site] <col5>[text]:[text] <col6>[result]:[text] <col7>[attendance]:[number] } | SELECT COUNT( * ) FROM `<table0>` WHERE "result" > 20 AND "result" > 20 | how many games did each team score over 20 points ? |
<table0>[multimodal_trips] { <col0>[INT]:[cost] <col1>[FLOAT]:[city] } | SELECT AVG( cost ) FROM `<table0>` WHERE city = 'Sydney'; | What is the average cost of a multimodal trip in Sydney? |
<table0>[authors] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[TEXT]:[country] } <table1>[articles] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[title] <col2>[TEXT]:[author_id] <col3>[INT]:[word_count] <col4>[INT]:[INSERT] <col5>[authors]:[name] <col6>[country]:[VALUES] <col7>[John]:[Doe] <col8>[USA]:[Jane] <col9>[Smith]... | SELECT au.country, COUNT( a.id ) FROM `<table1>` a JOIN `<col5>` au ON a.author_id = au.id WHERE a.word_count > 1000 GROUP BY au.country; | Count the number of articles with a word count greater than 1000, grouped by author country. |
<table0>[table_42501] { <col0>[Date]:[text] <col1>[text]:[Opponent] <col2>[text]:[Score] <col3>[text]:[Attendance] <col4>[real]:[Record] } | SELECT SUM( "Attendance" ) FROM `<table0>` WHERE "Opponent'" = 'new jersey saints' AND "Date" = 'february 21, 1988' | How many were in Attendance on February 21, 1988 against the New Jersey Saints? |
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:... | SELECT `<table10>`.label FROM `<table10>` WHERE `<table10>`.itemid IN ( SELECT `<table11>`.itemid FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 80671 ) AND DATETIME( `<table11>`.charttime ) >= DATETIME( CURRENT_TIME( ), '-54 month' ) ORDER BY `<t... | what is the name of the lab test that is patient 80671 first received since 54 months ago?
|
<table0>[volunteers] { <col0>[INT]:[volunteer_name] <col1>[VARCHAR]:[program] <col2>[VARCHAR]:[INSERT] } <table1>[programs] { <col0>[INT]:[program] <col1>[VARCHAR]:[community] <col2>[VARCHAR]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` v INNER JOIN programs p ON v.program = p.program WHERE p.community = 'Underrepresented'; | How many volunteers have participated in programs for underrepresented communities? |
<table0>[expeditions] { <col0>[expedition_id]:[INT] <col1>[expedition_date]:[DATE] <col2>[researcher]:[VARCHAR] } | SELECT YEAR( `<col1>` ) AS year, COUNT( * ) AS total_`<table0>`, COUNT( DISTINCT `<col2>` ) AS unique_researchers FROM `<table0>` GROUP BY year; | Show the total number of research expeditions and the number of unique researchers involved for each year. |
<table0>[table_25572068_1] { <col0>[winning_driver]:[VARCHAR] <col1>[series]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "FR2.0 11" | Who was the winning driver in the FR2.0 11 series?
|
<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 COUNT( * ) FROM `<table5>` WHERE `<table5>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '003-48563' AND NOT `<table8>`.hospitaldischa... | make a count of the number of times patient 003-48563 has received a immunosuppressive therapy - thymoglobulin during their last hospital encounter. |
<table0>[table_12837_1] { <col0>[days_with_rain__year_summer]:[VARCHAR] <col1>[city_town]:[VARCHAR] } | SELECT days_with_rain__year_summer_ FROM `<table0>` WHERE `<col1>` = "Santiago de Compostela" | What is the days with rain figure for the city of Santiago de Compostela?
|
<table0>[certificate] { <col0>[eid]:[number] <col1>[aid]:[number] } <table1>[employee] { <col0>[eid]:[number] <col1>[name]:[varchar2] <col2>[salary]:[number] } <table2>[flight] { <col0>[flno]:[number] <col1>[origin]:[varchar2] <col2>[destination]:[varchar2] <col3>[distance]:[number] <col4>[departure_date]:[date] <col... | SELECT name, `<col2>` FROM `<table3>` ORDER BY `<col1>` DESC | What are the names and distances for all airplanes Visualize by bar chart, list from high to low by the bar. |
<table0>[freight_forwarder] { <col0>[INT]:[name] <col1>[VARCHAR]:[INSERT] } <table1>[shipment] { <col0>[INT]:[forwarder_id] <col1>[INT]:[weight] <col2>[INT]:[INSERT] } | SELECT f.name, COUNT( s.id ) FROM `<table0>` f JOIN shipment s ON f.id = s.forwarder_id GROUP BY f.name HAVING COUNT( s.id ) > 1000; | Which freight forwarders have handled more than 1000 shipments in total? |
<table0>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <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>[month] { <col0>[month_number]:[int] <... | SELECT DISTINCT flight.flight_id FROM `<table18>` AS AIRPORT_SERVICE_0, `<table18>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_da... | an early flight on wednesday morning from BALTIMORE to NEWARK |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[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] ... | SELECT MAX( `<table5>`.valuenum ) FROM `<table5>` WHERE `<table5>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.subject_id = 4469 ) ) AND `<table5>`.itemid IN ( SELECT `<table7>`.itemid FROM `<table7>` WHERE `<ta... | indicate the daily maximum amount of arterial bp mean for patient 4469 since 08/18/2100.
|
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivi... | SELECT q.Id AS "post_link", q.Tags, q.CreationDate, q.LastActivityDate FROM `<table18>` AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tag1:string?geometry##' AND NOT ( q.Tags LIKE '%<##tag2?mg.metric-geometry##>%' ) ORDER BY q.CreationDate DESC | Questions with tag1 but not tag2. |
<table0>[european_tourism] { <col0>[destination]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[quarter] <col3>[INT]:[visitors] <col4>[INT]:[INSERT] } | SELECT destination, year, quarter, visitors, NTILE( 4 ) OVER ( ORDER BY visitors ) as quartile, ( visitors - LAG( visitors ) OVER ( PARTITION BY destination ORDER BY year, quarter ) )*100.0 / LAG( visitors ) OVER ( PARTITION BY destination ORDER BY year, quarter ) as pct_change FROM european_tourism; | What is the percentage change in international visitor numbers for each destination in Europe compared to the same quarter last year? |
<table0>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table1>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayN... | SELECT Comment, TagName FROM PostHistory, Tags WHERE PostHistoryTypeId = 36 AND Comment LIKE 'from http://' + '##site##' + '%' AND TagName LIKE '##tag##' GROUP BY Comment, TagName ORDER BY 2 DESC | Posts migrated here from site and with tag. |
<table0>[invoices] { <col0>[invoice_number]:[number] <col1>[invoice_date]:[time] <col2>[invoice_details]:[text] } <table1>[products] { <col0>[product_id]:[number] <col1>[product_name]:[text] <col2>[product_details]:[text] } <table2>[order_items] { <col0>[order_item_id]:[number] <col1>[product_id]:[number] <col2>[orde... | SELECT `<col0>` FROM `<table5>` ORDER BY `<col3>` DESC LIMIT 1 | Find the id of the order made most recently. |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table3>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of hire_date and the average of salary bin hire_date by weekday. |
<table0>[news_articles] { <col0>[INT]:[title] <col1>[TEXT]:[publish_date] <col2>[DATE]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE publish_date >= '2021-01-01' AND publish_date < '2022-01-01'; | What is the total number of news articles published in 2021, in the news_articles table? |
<table0>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]:[Location] } <table1>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_per_day]:[int] <col4>[Price]:[float] } <table2>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_... | SELECT Openning_year, AVG( Capacity ) FROM `<table0>` GROUP BY Openning_year ORDER BY AVG( Capacity ) DESC | A bar chart showing the average of capacity of cinemas open for each year, order by the y-axis in descending.
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatme... | SELECT `<table3>`.`<table3>`resulttime FROM `<table3>` WHERE `<table3>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '011-55642' AND `<table6... | when is the last time patient 011-55642 had the maximum value of creatinine during this hospital visit? |
<table0>[spacecraft_mars] { <col0>[INT]:[spacecraft_name] <col1>[VARCHAR]:[255] <col2>[launch_date]:[DATE] <col3>[organization]:[VARCHAR] <col4>[255]:[INSERT] } | SELECT DISTINCT `<col3>` FROM `<table0>` WHERE spacecraft_name IS NOT NULL; | Which organizations have launched spacecraft to Mars? |
<table0>[renewable_energy] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[cost] <col3>[FLOAT]:[INSERT] } | SELECT COUNT( * ) FROM renewable_energy; | How many projects are in the 'renewable_energy' table? |
<table0>[table_name_99] { <col0>[track]:[INTEGER] <col1>[song_title]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "raised on rock" | I want the sum of tracks for raised on rock
|
<table0>[table_name_9] { <col0>[cup_goals]:[INTEGER] <col1>[league_apps]:[INTEGER] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 34 | How many cup goals for the season with more than 34 league apps?
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <co... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table0>`.drugstarttime FROM `<table0>` JOIN patient ON `<table0>`.patientunitstayid = patient.patientunitstayid WHERE `<table0>`.drugname = 'zosyn 3.375 gram in ns 100 ml ivpb' AND DATE... | what are the five most commonly prescribed drugs at the same time since 2 years ago among patients who were prescribed zosyn 3.375 gram in ns 100 ml ivpb?
|
<table0>[table_204_525] { <col0>[number]:[rank] <col1>[number]:[player] <col2>[text]:[county] <col3>[text]:[tally] <col4>[text]:[total] <col5>[number]:[opposition] } | SELECT "opposition" FROM `<table0>` WHERE "rank" = 27 LIMIT 1 | who is the first opposition in rank 27 ? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admissi... | SELECT `<table2>`.long_title FROM `<table2>` WHERE `<table2>`.short_title = 'ab nos w compl nos-inc' UNION SELECT `<table11>`.long_title FROM `<table11>` WHERE `<table11>`.short_title = 'ab nos w compl nos-inc' | ab nos w compl nos-inc what does it stand for? |
<table0>[handling_times] { <col0>[INT]:[transaction_id] <col1>[INT]:[duration] <col2>[INT]:[INSERT] } | SELECT AVG( ht.duration ) as average_duration FROM transactions t JOIN handling_times ht ON t.id = ht.transaction_id JOIN vessels v ON t.vessel_id = v.id WHERE v.flag_state = 'Greece'; | What is the average cargo handling duration for vessels from Greece? |
<table0>[climber] { <col0>[Climber_ID]:[int] <col1>[text]:[Country] <col2>[text]:[Time] <col3>[text]:[Points] <col4>[real]:[Mountain_ID] } <table1>[mountain] { <col0>[Mountain_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Prominence] <col3>[real]:[Range] <col4>[text]:[Country] } | SELECT T2.Name, COUNT( T2.Name ) FROM `<table0>` AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID GROUP BY T2.Name ORDER BY T2.Name DESC | Show the number of climbers for each mountain in a bar chart, and sort Name in descending order. |
<table0>[table_name_73] { <col0>[week]:[VARCHAR] <col1>[air_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "august 30, 2008" | Which Week has an Air Date of august 30, 2008? |
<table0>[ship] { <col0>[Ship_ID]:[int] <col1>[text]:[Type] <col2>[text]:[Nationality] <col3>[text]:[Tonnage] } <table1>[mission] { <col0>[Mission_ID]:[int] <col1>[Ship_ID]:[int] <col2>[Code]:[text] <col3>[Launched_Year]:[int] <col4>[Location]:[text] <col5>[Speed_knots]:[int] <col6>[Fate]:[text] } | SELECT Type, COUNT( Type ) FROM `<table0>` GROUP BY Nationality, Type | Draw a bar chart showing the total number of every ship type by categorizing by nationality. |
<table0>[Policies] { <col0>[PolicyID]:[INT] <col1>[PolicyType]:[VARCHAR] <col2>[IssueState]:[VARCHAR] <col3>[RiskScore]:[DECIMAL] } | SELECT PolicyType, `<col3>` FROM `<table0>` WHERE `<col2>` = 'Illinois' ORDER BY `<col3>` ASC; | What is the policy type and corresponding risk score for each policy, ordered by risk score in ascending order, for policies issued in 'Illinois'? |
<table0>[country] { <col0>[country_id]:[integer] <col1>[country_iso_code]:[text] <col2>[country_name]:[text] } <table1>[department] { <col0>[department_id]:[integer] <col1>[department_name]:[text] } <table2>[gender] { <col0>[gender_id]:[integer] } <table3>[genre] { <col0>[genre_id]:[integer] <col1>[genre_name]:[text... | SELECT CAST( COUNT( CASE WHEN T4.genre_name = 'Animation' THEN T1.`<table7>`_id ELSE NULL END ) AS REAL ) * 100 / COUNT( T1.`<table7>`_id ) FROM `<table7>` AS T1 INNER JOIN `<table7>`_genres AS T2 ON T1.`<table7>`_id = T2.`<table7>`_id INNER JOIN production_COUNTry AS T3 ON T1.`<table7>`_id = T3.`<table7>`_id INNER JOI... | What percentage of movies that came from Japan belong in the 'animation' genre? |
<table0>[table_name_44] { <col0>[team]:[VARCHAR] <col1>[round_winner]:[VARCHAR] <col2>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "john bowe" AND `<col2>` = "winton motor raceway" | On what team did John Bowe round winner at Winton Motor Raceway belong to? |
<table0>[circular_economy] { <col0>[company]:[VARCHAR] <col1>[location]:[VARCHAR] <col2>[circular_score]:[FLOAT] <col3>[certification_date]:[DATE] } | CREATE TABLE circular_economy ( company VARCHAR( 50 ), location VARCHAR( 50 ), circular_score FLOAT, certification_date DATE ); | Create a table named 'circular_economy' with columns 'company', 'location', 'circular_score' and 'certification_date' |
<table0>[table_name_40] { <col0>[date]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "antigua recreation ground" | When did a Venue of Antigua Recreation Ground happen? |
<table0>[products] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[is_cruelty_free]:[BOOLEAN] } <table1>[sales] { <col0>[sale_id]:[INT] <col1>[product_id]:[INT] <col2>[sale_date]:[DATE] <col3>[region]:[VARCHAR] } | SELECT `<table0>`.product_name FROM `<table0>` INNER JOIN sales ON `<table0>`.product_id = sales.product_id WHERE `<table0>`.is_cruelty_free = true AND sales.region = 'US'; | Which cruelty-free products were sold in the US? |
<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>[demogr... | SELECT `<table0>`.short_title, `<table0>`.long_title FROM `<table0>` WHERE `<table0>`.icd9_code = "7761" | find the diagnoses title and description of diagnoses icd9 code 7761. |
<table0>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table1>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table2>[restriction]... | SELECT DISTINCT ground_service.transport_type FROM `<table18>` AS CITY_0, `<table18>` AS CITY_1, ground_service WHERE ( ground_service.`<table18>`_code = CITY_0.`<table18>`_code AND CITY_0.`<table18>`_name = 'DALLAS' ) OR ( ground_service.`<table18>`_code = CITY_1.`<table18>`_code AND CITY_1.`<table18>`_name = 'FORT WO... | what kinds of ground transportation is available in DALLAS FORT WORTH
|
<table0>[table_name_75] { <col0>[opponent]:[VARCHAR] <col1>[round]:[VARCHAR] <col2>[season]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "q2" AND `<col2>` = "2005–06" | What is the Opponent with a Round of q2, in the 2005 06 season?
|
<table0>[all_prevalences] { <col0>[ITEM]:[text] <col1>[POPULATION]:[TYPE] <col2>[text]:[OCCURRENCES] <col3>[integer]:[POPULATION] <col4>[COUNT]:[integer] <col5>[PREVALENCE]:[RATE] <col6>[real]:[PREVALENCE] <col7>[PERCENTAGE]:[real] } <table1>[patients] { <col0>[patient]:[text] <col1>[birthdate]:[date] <col2>[deathdate... | SELECT T1.first, T1.last FROM `<table1>` AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT( DISTINCT T2.DESCRIPTION ) > 3 | Indicate the full name of the patients who have 3 different allergies. |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Other diseases of lung, not elsewhere classified" AND prescriptions.drug_type = "ADDITIVE" | count the number of patients whose diagnoses long title is other diseases of lung, not elsewhere classified and drug type is additive? |
<table0>[school] { <col0>[School_ID]:[int] <col1>[Grade]:[text] <col2>[School]:[text] <col3>[Location]:[text] <col4>[Type]:[text] } <table1>[driver] { <col0>[Driver_ID]:[int] <col1>[text]:[Party] <col2>[text]:[Home_city] <col3>[text]:[Age] } <table2>[school_bus] { <col0>[School_ID]:[int] <col1>[Driver_ID]:[int] <col2... | SELECT Name, Age FROM `<table1>` | Bar graph to show age from different name
|
<table0>[table_name_98] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "essendon" | What is the score of the away team that played Essendon? |
<table0>[donations] { <col0>[INT]:[donor_id] <col1>[INT]:[state] <col2>[TEXT]:[DECIMAL] } | SELECT AVG( amount ) FROM `<table0>` WHERE state = 'New York'; | What is the average donation amount in the state of New York? |
<table0>[mining_production_australia] { <col0>[production_date]:[DATE] <col1>[production_volume]:[INT] <col2>[mining_method]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT mining_method, MAX( `<col1>` ) as max_production_volume FROM `<table0>` WHERE `<col0>` >= DATEADD( month, -1, CURRENT_DATE ) GROUP BY mining_method; | What is the maximum production volume per mining method in Australia in the past month? |
<table0>[table_22384475_1] { <col0>[winner]:[VARCHAR] <col1>[margin]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "131 runs" | Who won the match when the margin was 131 runs?
|
<table0>[table_1984697_53] { <col0>[city___town]:[VARCHAR] <col1>[principal]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Mark Fletcher" | Where's the school that Mark Fletcher is the principal of?
|
<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( * ) > 0 FROM `<table1>` WHERE `<table1>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '006-254182' ) ) AND `<table1>`.drugname ... | had the enoxaparin sodium 40 mg/0.4ml sc soln, lactated ringers or potassium chloride 20 meq ud liq been prescribed for patient 006-254182 in 01/last year?
|
<table0>[school] { <col0>[LOCATION]:[VARCHAR] <col1>[Enrollment]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY `<col1>` | List the locations of schools in ascending order of enrollment. |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table2>[medicati... | SELECT t2.drugname FROM ( SELECT `<table5>`.uniquepid, `<table1>`.`<table1>`time FROM `<table1>` JOIN `<table5>` ON `<table1>`.`<table5>`unitstayid = `<table5>`.`<table5>`unitstayid WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquep... | what is the name of the medication that patient 010-20205 was prescribed within 2 days after having received a cpap/peep therapy - titrate peep procedure in 08/last year? |
<table0>[langs] { <col0>[lid]:[integer] <col1>[lang]:[text] <col2>[locale]:[text] <col3>[pages]:[integer] <col4>[words]:[integer] } <table1>[pages] { <col0>[pid]:[integer] <col1>[lid]:[integer] <col2>[page]:[integer] <col3>[revision]:[integer] <col4>[title]:[text] <col5>[words]:[integer] } <table2>[words] { <col0>[wi... | SELECT CASE WHEN ( SELECT `<col3>` FROM `<table5>` WHERE `<col1>` = ( SELECT `<col0>` FROM `<table2>` WHERE `<col1>` = 'àbac' ) AND `<col2>` = ( SELECT `<col0>` FROM `<table2>` WHERE `<col1>` = 'xinès' ) ) > ( SELECT `<col3>` FROM `<table5>` WHERE `<col1>` = ( SELECT `<col0>` FROM `<table2>` WHERE `<col1>` = 'àbac' ) A... | Which biwords pair has a higher occurrence, "àbac-xinès" or "àbac-grec"? |
<table0>[table_name_77] { <col0>[bronze_medals]:[INTEGER] <col1>[gold_medals]:[INTEGER] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 0 | What is the highest number of bronze medals received by an ensemble who received fewer than 0 gold medals? |
<table0>[models] { <col0>[model_id]:[INT] <col1>[model_name]:[VARCHAR] <col2>[model_type]:[VARCHAR] <col3>[country]:[VARCHAR] <col4>[safety_score]:[DECIMAL] } | DELETE FROM `<table0>` WHERE `<col3>` = 'Russia'; | Delete all records from the models table for models developed in Russia. |
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Country] <col2>[text]:[Is_Male] <col3>[text]:[Age] } <table1>[church] { <col0>[Church_ID]:[int] <col1>[text]:[Organized_by] <col2>[text]:[Open_Date] <col3>[int]:[Continuation_of] } <table2>[wedding] { <col0>[Church_ID]:[int] <col1>[Male_ID]:[int] <col2>[Female_... | SELECT Country, COUNT( Country ) FROM `<table0>` WHERE Age < ( SELECT AVG( Age ) FROM `<table0>` ) GROUP BY Country | Show the number of countries for all people whose age is smaller than the average. |
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table2>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[hi... | SELECT DISTINCT flight.flight_id FROM `<table16>` AS AIRPORT_SERVICE_0, `<table16>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ( ( ( DATE_DAY... | i would like to book a flight on US FIRST class from CLEVELAND to MIAMI on 2 22
|
<table0>[ships] { <col0>[INT]:[name] } <table1>[visits] { <col0>[ship_id]:[INT] <col1>[port_id]:[INT] <col2>[visit_date]:[DATE] } <table2>[cargo_weights] { <col0>[INT]:[visit_id] <col1>[INT]:[weight] <col2>[INT]:[INSERT] <col3>[ships]:[name] <col4>[VALUES]:[Sealand] <col5>[Pride]:[Cosco] <col6>[Hope]:[MSC] <col7>[Ann... | SELECT `<table0>`.name, SUM( cargo_weights.weight ) FROM `<table0>` INNER JOIN visits ON `<table0>`.id = visits.ship_id INNER JOIN cargo_weights ON visits.id = cargo_weights.visit_id GROUP BY `<table0>`.name; | Show the total weight of cargo moved by each ship. |
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[... | SELECT `<table1>`.charttime FROM `<table1>` WHERE `<table1>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 138 ) ) AND `<table1>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>`.... | when was patient 138's arterial bp [diastolic] the last time measured greater than 58.0 until 11/08/2105? |
<table0>[table_5634] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Score]:[text] <col4>[Series]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Game" = '1' | What date has 1 for the game?
|
<table0>[table_18950885_3] { <col0>[char_cells]:[VARCHAR] <col1>[graphics_mode]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 1.0 | If graphics mode is less than 1.0, what are the char cells? |
<table0>[table_55934] { <col0>[Rank]:[real] <col1>[text]:[Nation] <col2>[text]:[Placings] <col3>[text]:[Total] } | SELECT COUNT( "Rank" ) FROM `<table0>` WHERE "Placings" = '28.5' AND "Total" < '92.7' | What is the rank number for a placing of 28.5 and a total less than 92.7?
|
<table0>[country] { <col0>[country_id]:[integer] <col1>[country_iso_code]:[text] <col2>[country_name]:[text] } <table1>[department] { <col0>[department_id]:[integer] <col1>[department_name]:[text] } <table2>[gender] { <col0>[gender_id]:[integer] } <table3>[genre] { <col0>[genre_id]:[integer] <col1>[genre_name]:[text... | SELECT `<col4>` FROM `<table7>` WHERE `<col1>` = 'The Pacifier' | Provide the overview for the movie "The Pacifier". |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[Creation... | SELECT u.Id, u.Reputation, u.DisplayName, TIME_TO_STR( p.CreationDate, '%YEAR' ) AS Year, TIME_TO_STR( p.CreationDate, '%-mONT%-H' ) AS Month, COUNT( * ) AS Count FROM `<table22>` AS u INNER JOIN Posts AS p ON u.Id = p.OwnerUserId WHERE TIME_TO_STR( p.CreationDate, '%Year' ) = 2017 AND p.PostTypeId = 2 AND u.Reputation... | Nombre de r ponses par utilisateur haute r putation.
|
<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... | WITH fights AS ( SELECT myAnswer.ParentId AS Question, myAnswer.Score AS MyScore, otherAnswer.Score AS OtherScore FROM `<table2>` AS myAnswer INNER JOIN `<table2>` AS otherAnswer ON otherAnswer.OwnerUserId = '##OtherId##' AND myAnswer.ParentId = otherAnswer.ParentId WHERE myAnswer.OwnerUserId = @UserId AND myAnswer.Pos... | Me vs Other in answers..
|
<table0>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table1>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table2>[management] { <col0>[department_ID]:[int]... | SELECT born_state, AVG( `<col3>` ) FROM `<table1>` GROUP BY `<col2>` ORDER BY `<col2>` DESC | Show the average age of heads of departments born in each state with a bar chart, list by the X-axis in desc. |
<table0>[artworks] { <col0>[artwork_id]:[INT] <col1>[title]:[VARCHAR] <col2>[year]:[INT] <col3>[artist_id]:[INT] <col4>[country]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col4>` = 'USA'; | How many artworks are in the 'artworks' table for the USA? |
<table0>[Union_Info] { <col0>[INT]:[union] <col1>[VARCHAR]:[255] <col2>[industry]:[VARCHAR] <col3>[255]:[member_count] <col4>[INT]:[INSERT] } | SELECT AVG( member_count ) FROM `<table0>` WHERE `<col2>` = 'Manufacturing'; | What is the average union membership size for unions in the manufacturing industry? |
<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 Founder, SUM( `<col2>` ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder | For those records from the products and each product's manufacturer, a bar chart shows the distribution of founder and the sum of price , and group by attribute founder, and order by the x-axis in asc. |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.gender = "M" AND diagnoses.short_title = "Long-term use anticoagul" | how many patients whose gender is m and diagnoses short title is long-term use anticoagul?
|
<table0>[table_1342292_2] { <col0>[party]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Alabama 3" | what's the party with district being alabama 3
|
<table0>[patients] { <col0>[INT]:[department] <col1>[VARCHAR]:[255] } <table1>[physicians] { <col0>[INT]:[department] <col1>[VARCHAR]:[255] <col2>[INSERT]:[patients] <col3>[department]:[VALUES] <col4>[Department]:[Department] } | SELECT department, COUNT( DISTINCT id ) AS unique_physicians, COUNT( p.id ) AS total_`<table0>` FROM `<table0>` p JOIN physicians ph ON p.department = ph.department GROUP BY department; | List the total number of patients and the number of unique physicians for each rural health department. |
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[SuggestedEditVotes] { <col0>[number]:[Sugg... | SELECT ROW_NUMBER( ) OVER ( ORDER BY `<table3>`.Reputation DESC ) AS "#", `<table3>`.Id AS "user_link", `<table3>`.Age, `<table3>`.Location, `<table3>`.Reputation, `<table3>`.Views, `<table3>`.UpVotes, `<table3>`.DownVotes, ( SELECT COUNT( * ) FROM `<table23>` AS PQ WHERE PostTypeId = 1 AND PQ.OwnerUserId = `<table3>`.... | Top 20 users in Pune.
|
<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 SUM( `<table16>`.amount ) FROM `<table16>` WHERE `<table16>`.icustay_id IN ( SELECT `<table7>`.icustay_id FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 1372 ) ) AND `<table16>`.itemid IN ( SELECT `<table9>`.itemid FROM `<table9>` WHERE `<... | calculate the total amount of patient 1372's impact w/fiber intake until 03/26/2103. |
<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 SOC_SRT_DIRE_CD, `<col6>` FROM `<table1>` WHERE `<col3>` = '13308271628' GROUP BY `<col5>` ORDER BY SUM( SELF_PAY_AMO ) DESC LIMIT 1 | 在医疗就诊13308271628中,患者周阳飇自费金额最高的项目是哪一项?
|
<table0>[t_kc21_t_kc22] { <col0>[MED_CLINIC_ID]:[text] <col1>[MED_EXP_DET_ID]:[number] } <table1>[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>[... | SELECT `<table2>`.MED_INV_ITEM_TYPE FROM `<table2>` JOIN t_kc21_`<table2>` JOIN t_kc21 ON t_kc21_`<table2>`.MED_EXP_DET_ID = `<table2>`.MED_EXP_DET_ID AND t_kc21_`<table2>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '27842861619' AND `<table2>`.SOC_SRT_DIRE_NM = '妥布霉素滴眼液' | 妥布霉素滴眼液在医疗就诊27842861619中开出的医疗发票项目类别有几种?
|
<table0>[table_name_29] { <col0>[host_team]:[VARCHAR] <col1>[visiting_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "new england patriots" | Which host team played against the New England Patriots? |
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <co... | SELECT COUNT( * ) FROM `<table4>` WHERE `<table4>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '030-42006' ) ) AND `<table4>`.cellpath LIKE ... | how many times did patient 030-42006 this month receive d5lr ivf? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[t... | SELECT COUNT( * ) > 0 FROM `<table1>` WHERE `<table1>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '011-49193' ) ) AND `<table1>`.`<table1>`... | had patient 011-49193 received during this year a laxatives - doss (colace) procedure?
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patie... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table0>`.drugstarttime FROM `<table0>` JOIN patient ON `<table0>`.patientunitstayid = patient.patientunitstayid WHERE `<table0>`.drugname = '1 ml crtrdg-ndl : morphine sulfate 2 mg/ml i... | what were the five most frequently prescribed drugs at the same time until 2104 among patients who were prescribed 1 ml crtrdg-ndl : morphine sulfate 2 mg/ml ij soln?
|
<table0>[table_name_88] { <col0>[crowd]:[INTEGER] <col1>[venue]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "princes park" | What is the largest crowd at princes park? |
<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>` WHERE `<table1>`.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND `<table1>`.admityear < "2167" | give the number of patients whose admission location is transfer from hosp/extram and who were admitted before the year 2167. |
<table0>[shariah_customers] { <col0>[customer_id]:[INT] <col1>[shariah]:[BOOLEAN] <col2>[financial_wellbeing_score]:[INT] } <table1>[shariah_mortgages] { <col0>[mortgage_id]:[INT] <col1>[customer_id]:[INT] } | SELECT AVG( sc.financial_wellbeing_score ) FROM `<table0>` sc JOIN shariah_mortgages sm ON sc.customer_id = sm.customer_id WHERE sc.shariah = TRUE; | What is the average financial wellbeing score for customers who have a Shariah-compliant mortgage? |
<table0>[Sales] { <col0>[INT]:[item_name] <col1>[VARCHAR]:[size] <col2>[VARCHAR]:[INSERT] } | SELECT COUNT( DISTINCT item_name ) FROM `<table0>` WHERE size IN ( 'XS', 'S', 'M', 'L', 'XL', 'XXL' ); | How many unique clothing items were sold in sizes XS, S, M, L, XL, and XXL? |
<table0>[table_dev_41] { <col0>[int]:[gender] <col1>[string]:[serum_potassium] <col2>[float]:[systolic_blood_pressure_sbp] <col3>[int]:[serum_bicarbonate] <col4>[int]:[renal_disease] <col5>[bool]:[temperature] <col6>[float]:[diastolic_blood_pressure_dbp] <col7>[int]:[liver_disease] <col8>[bool]:[hdl] <col9>[int]:[serum... | SELECT * FROM `<table0>` WHERE serum_bicarbonate < 20 OR serum_sodium_concentration < 125 OR serum_sodium_concentration > 150 OR ( serum_potassium < 3.5 AND serum_potassium > 5.5 ) | serum bicarbonate level < 20 meq / l, serum sodium < 125 & > 150 meq / l or serum potassium < 3.5 & > 5.5 meq / l |
<table0>[CREATE] { <col0>[SCHEMA]:[exists] } <table1>[exists] { <col0>[genetics]:[studies] <col1>[INT]:[name] <col2>[VARCHAR]:[100] <col3>[location]:[VARCHAR] <col4>[100]:[INSERT] <col5>[genetics]:[studies] <col6>[name]:[location] <col7>[VALUES]:[StudyA] <col8>[Cape]:[Town] <col9>[StudyB]:[Nairobi] <col10>[StudyC]:[Al... | SELECT name FROM genetics.studies WHERE location = 'Africa'; | Which genetic research studies have been conducted in Africa? |
<table0>[ai_ethics_trainings] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[date] <col2>[DATE]:[topic] <col3>[VARCHAR]:[255] <col4>[description]:[VARCHAR] } | WITH updated_data AS ( UPDATE ai_ethics_trainings SET topic = 'AI bias and fairness' WHERE id = 1 RETURNING * ) SELECT * FROM updated_data; | Update the "topic" of the training with id 1 in the "ai_ethics_trainings" table to 'AI bias and fairness' |
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[Wik... | SELECT DISTINCT `<table14>`.PostId AS "post_link", Posts.OwnerUserId AS "user_link", Posts.CreationDate, Posts.LastActivityDate FROM `<table14>` INNER JOIN Posts ON `<table14>`.PostId = Posts.Id WHERE `<table14>`TypeId IN ( 3, 6, 9 ) AND `<col7>` LIKE '%<##tagName?featured##>%' ORDER BY Posts.CreationDate DESC | Posts which had the given tag in the past. |
<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 p.Id AS reference FROM `<table24>` AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId WHERE pt.TagId IN ( 61339 ) | Posts with tags 'domain-driven-design', 'cqrs' or 'event-sourcing'. |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[it... | SELECT COUNT( * ) > 0 FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 83182 ) AND `<table12>`.spec_type_desc = 'urine' AND STRFTIME( '%y', `<table12>`.charttime ) = '2105' | was there any microbiology test results for the urine of patient 83182 in 2105? |
<table0>[genetic_research] { <col0>[INT]:[study_name] <col1>[VARCHAR]:[method] <col2>[VARCHAR]:[data] <col3>[TEXT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE method LIKE '%genetic mutation%'; | Count the number of genetic research studies related to genetic mutations in the genetic_research table |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[charget... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT `<table2>`.uniquepid, COUNT( * ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table2>`unitstayid = ( SELECT `<table0>`.`<table2>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`name = 'immunosuppressives - mycophenolate' AND DATETIME( `<table0>`.`<table0>`time ) >= ... | what is the total number of patients who had received a immunosuppressives - mycophenolate procedure two times since 6 years ago?
|
<table0>[table_45866] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Score]:[text] <col4>[Location]:[text] <col5>[Record]:[text] } | SELECT "Location" FROM `<table0>` WHERE "Score" = '115-105' | What is the location of the game with a 115-105 score?
|
<table0>[table_name_92] { <col0>[report]:[VARCHAR] <col1>[constructor]:[VARCHAR] <col2>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ferrari" AND `<col2>` = "monza" | What is the report status of the race with Ferrari as the constructor and a monza circuit?
|
<table0>[table_19722233_5] { <col0>[field_goals]:[INTEGER] <col1>[assists]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 27 | what is the highest number of goals did the player with 27 asists score |
<table0>[table_204_673] { <col0>[number]:[name] <col1>[text]:[egot] <col2>[completed]:[text] <col3>[emmy]:[number] <col4>[grammy]:[number] <col5>[oscar]:[number] <col6>[tony]:[number] } | SELECT "egot completed" FROM `<table0>` WHERE "name" = 'richard rodgers' | how long did it take richard rodgers to complete egot ? |
<table0>[table_name_75] { <col0>[rank]:[VARCHAR] <col1>[games]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2009 hanoi" | What was the rank in the 2009 Hanoi Games? |
<table0>[table_name_24] { <col0>[score]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[winners]:[VARCHAR] <col3>[runners_up]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "galatasaray" AND `<col3>` = "trabzonspor" AND `<col1>` = 1990 | What was Galatasaray score when when he won in 1990 and Trabzonspor was the runner-up? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.