instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_10976 (
"Name" text,
"Street address in Detroit" text,
"Years as tallest" text,
"Height feet / m" text,
"Floors" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many floors does detroit marriott at the renaissance center have?
| SELECT MAX("Floors") FROM table_10976 WHERE "Name" = 'detroit marriott at the renaissance center' | wikisql |
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE T... | SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY AVG(capacity) | nvbench |
CREATE TABLE employees (
first_name VARCHAR,
last_name VARCHAR,
salary INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the full name (first and last name), and salary for those employees who earn below 6000.
| SELECT first_name, last_name, salary FROM employees WHERE salary < 6000 | sql_create_context |
CREATE TABLE table_204_638 (
id number,
"year" number,
"tournament" text,
"surface" text,
"round" text,
"winner" text,
"score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where was the tournament before the 1982 tournament in philadelphia... | SELECT "tournament" FROM table_204_638 WHERE id = (SELECT id FROM table_204_638 WHERE "year" = 1982 AND "tournament" = 'philadelphia') + 1 | squall |
CREATE TABLE table_name_99 (
preliminaries VARCHAR,
swimsuit VARCHAR,
interview VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the preliminaries of the contestant with a swimsuit less than 8.948 and an interview of 8.997?
| SELECT preliminaries FROM table_name_99 WHERE swimsuit < 8.948 AND interview = 8.997 | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.JZKSMC = '小儿心血管外科' AND zzmzjzjlb.JZKSRQ BETWEEN '2002-07-14' AND '2006-12-26' UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZKSMC = '小儿心血管外科' AND fzzmzjzjlb.JZKSRQ BETWEEN '2002-07-14' AND '2006-12-26' | css |
CREATE TABLE table_name_60 (
game INTEGER,
opponent VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Game has an Opponent of at kansas city chiefs, and an Attendance smaller than 40,213?
| SELECT SUM(game) FROM table_name_60 WHERE opponent = "at kansas city chiefs" AND attendance < 40 OFFSET 213 | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2087" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.icd9_code = "5939" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.icd9_code = "3771" | mimicsql_data |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '86565852' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 2978.48) | css |
CREATE TABLE table_35298 (
"Storm name" text,
"Dates active" text,
"Max 1-min wind mph (km/h)" text,
"Min. press. ( mbar )" text,
"Damage (millions USD )" text,
"Deaths" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the max 1-min wind m... | SELECT "Max 1-min wind mph (km/h)" FROM table_35298 WHERE "Min. press. ( mbar )" = '997' | wikisql |
CREATE TABLE table_36747 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of W. Jasper Talbert who was first elected in 1892?
| SELECT "Result" FROM table_36747 WHERE "First elected" = '1892' AND "Incumbent" = 'w. jasper talbert' | wikisql |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'CDB' AND COURSE_1.number = 5... | advising |
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
oth... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count >= 100 OR amount_of_transaction >= 100 ORDER BY COUNT(date_of_transaction) DESC | nvbench |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Cou... | SELECT RANK() OVER (ORDER BY R.Ratio DESC) AS Rank, R.Id AS "user_link", R.Ratio FROM (SELECT U.Id, CAST(SUM(A.Score) AS FLOAT) / COUNT(A.Score) AS Ratio FROM Posts AS A INNER JOIN Users AS U ON U.Id = A.OwnerUserId WHERE A.PostTypeId = 2 AND A.CommunityOwnedDate IS NULL GROUP BY U.Id HAVING COUNT(A.Id) >= '##MinimumAn... | sede |
CREATE TABLE table_13996 (
"Medal" text,
"Name" text,
"Sport" text,
"Event" text,
"Date" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the sport for wolfgang schattauer?
| SELECT "Sport" FROM table_13996 WHERE "Name" = 'wolfgang schattauer' | wikisql |
CREATE TABLE table_25706 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name t... | SELECT COUNT("High points") FROM table_25706 WHERE "Record" = '5-17' | wikisql |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varch... | SELECT DISTINCT flight.flight_id FROM 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILA... | atis |
CREATE TABLE table_76872 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Lost, when Drawn is '2'... | SELECT "Lost" FROM table_76872 WHERE "Drawn" = '2' AND "Points" = '36' | wikisql |
CREATE TABLE table_35428 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest round of the player with an overall of 152?
| SELECT MAX("Round") FROM table_35428 WHERE "Overall" = '152' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "HUMU100I" | mimicsql_data |
CREATE TABLE table_name_69 (
others_number INTEGER,
kerry_percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What percentage of other candidates did the county which voted 52.1% for Kerry vote for?
| SELECT MAX(others_number) FROM table_name_69 WHERE kerry_percentage = "52.1%" | sql_create_context |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varch... | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_name_94 (
lost INTEGER,
drawn VARCHAR,
goals_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Lost has Drawn larger than 12, and Goals Against of 54?
| SELECT MAX(lost) FROM table_name_94 WHERE drawn > 12 AND goals_against = 54 | sql_create_context |
CREATE TABLE table_48044 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Pick has a Nationality of canada, and a Round of 5?
| SELECT "Pick" FROM table_48044 WHERE "Nationality" = 'canada' AND "Round" = '5' | wikisql |
CREATE TABLE table_80363 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average attendance for games with a loss of papelbon (0 1)?
| SELECT AVG("Attendance") FROM table_80363 WHERE "Loss" = 'papelbon (0–1)' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc22.DOSE_FORM, t_kc22.SPEC FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '26611062115' AND t_kc22.SOC_SRT_DIRE_CD = '2220-d' | css |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime ... | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra... | mimic_iii |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4300893' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) < 17 | css |
CREATE TABLE table_79041 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Name has a Winning constructor of bugatti, and a Winning driver ... | SELECT "Name" FROM table_79041 WHERE "Winning constructor" = 'bugatti' AND "Winning driver" = 'louis chiron' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-40255' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospit... | eicu |
CREATE TABLE table_name_2 (
team_2 VARCHAR,
team_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the team 2 with cobreloa as team 1?
| SELECT team_2 FROM table_name_2 WHERE team_1 = "cobreloa" | sql_create_context |
CREATE TABLE table_203_716 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many nations scored more total medals than brazil ?
| SELECT COUNT("nation") FROM table_203_716 WHERE "total" > (SELECT "total" FROM table_203_716 WHERE "nation" = 'brazil') | squall |
CREATE TABLE table_name_69 (
final_year INTEGER,
north_or_east_terminus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most minimal Final year that has a North or east end of covington?
| SELECT MIN(final_year) FROM table_name_69 WHERE north_or_east_terminus = "covington" | sql_create_context |
CREATE TABLE table_44737 (
"Coach" text,
"First Yr" real,
"Last Yr" real,
"W-L%" real,
"G > .500" real,
"Yr plyf" real,
"G plyf" real,
"W plyf" real,
"L plyf" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of... | SELECT COUNT("Yr plyf") FROM table_44737 WHERE "G plyf" < '0' | wikisql |
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CR... | SELECT name, COUNT(name) FROM train GROUP BY name | nvbench |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" | mimicsql_data |
CREATE TABLE table_76547 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Total medals for the Nation ranking 33 with more than 1 Bronze?
| SELECT AVG("Total") FROM table_76547 WHERE "Rank" = '33' AND "Bronze" > '1' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '32680024' | css |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_20... | SELECT meter_500, meter_100 FROM swimmer ORDER BY meter_500 DESC | nvbench |
CREATE TABLE table_name_82 (
gold INTEGER,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of Gold medals when there are 5 bronze medals?
| SELECT AVG(gold) FROM table_name_82 WHERE bronze = 5 | sql_create_context |
CREATE TABLE table_74975 (
"Year" real,
"Location" text,
"Gold" text,
"Silver" text,
"Bronze" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years has Japan won silver?
| SELECT SUM("Year") FROM table_74975 WHERE "Silver" = 'japan' | wikisql |
CREATE TABLE table_24311 (
"Competition" text,
"Round" text,
"Opponent" text,
"Result" text,
"Score" text,
"Home/Away" text,
"Venue" text,
"Attendance" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many results have... | SELECT COUNT("Result") FROM table_24311 WHERE "Attendance" = '14,381' | wikisql |
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Ad... | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY dorm_name DESC | nvbench |
CREATE TABLE table_name_42 (
visitor VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the visiting team that played against the Kings?
| SELECT visitor FROM table_name_42 WHERE home = "kings" | sql_create_context |
CREATE TABLE table_58669 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who repla... | SELECT "Replaced by" FROM table_58669 WHERE "Outgoing manager" = 'istván sándor' | wikisql |
CREATE TABLE table_14903081_1 (
tournament VARCHAR,
current_venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tournaments current venue is the Madrid Arena?
| SELECT tournament FROM table_14903081_1 WHERE current_venue = "Madrid Arena" | sql_create_context |
CREATE TABLE table_name_89 (
ovrs INTEGER,
wkts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least ovrs for wkts of 0
| SELECT MIN(ovrs) FROM table_name_89 WHERE wkts = 0 | sql_create_context |
CREATE TABLE table_12566 (
"Coach" text,
"Years coached" text,
"Seasons" real,
"Wins" real,
"Losses" real,
"Percentage" real,
"Conference titles" text,
"NCAA" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which coach has 0 conference ti... | SELECT "Coach" FROM table_12566 WHERE "Conference titles" = '0' AND "Seasons" > '2' AND "Losses" > '87' AND "NCAA" = '0' | wikisql |
CREATE TABLE table_13003460_1 (
the_icelandic_of_the_glossary VARCHAR,
the_basque_of_the_glossary VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the iclandic of the glossary for presenta for mi locaria
| SELECT the_icelandic_of_the_glossary FROM table_13003460_1 WHERE the_basque_of_the_glossary = "presenta for mi locaria" | sql_create_context |
CREATE TABLE table_50052 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score in Spain T3?
| SELECT "Score" FROM table_50052 WHERE "Place" = 't3' AND "Country" = 'spain' | wikisql |
CREATE TABLE table_66854 (
"Round" text,
"Fixtures" real,
"Clubs" text,
"New entries" text,
"Leagues entering" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the value for New entries, when the value for Fixtures is less than 16, and when th... | SELECT "New entries" FROM table_66854 WHERE "Fixtures" < '16' AND "Clubs" = '4 → 2' | wikisql |
CREATE TABLE table_name_29 (
area__km²_ INTEGER,
deed_number VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest Area (km ) for Deed number of 21352022 with a Population of more than 184?
| SELECT MAX(area__km²_) FROM table_name_29 WHERE deed_number = "21352022" AND population > 184 | sql_create_context |
CREATE TABLE table_name_96 (
opponent VARCHAR,
week VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent after week 9 with an attendance of 44,020?
| SELECT opponent FROM table_name_96 WHERE week > 9 AND attendance = "44,020" | sql_create_context |
CREATE TABLE table_204_639 (
id number,
"poll company" text,
"source" text,
"publication date" text,
"psuv" number,
"opposition" number,
"undecided" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total opposition votes were cast a... | SELECT SUM("opposition") FROM table_204_639 WHERE "publication date" > (SELECT "publication date" FROM table_204_639 WHERE "publication date" = 'august 2010') | squall |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_name_70 (
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the away team West Ham United?
| SELECT date FROM table_name_70 WHERE away_team = "west ham united" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY SUM(SALARY) DESC | nvbench |
CREATE TABLE table_name_47 (
tries_against VARCHAR,
try_bonus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With a Try Bonus of 8, what is the Tries Against?
| SELECT tries_against FROM table_name_47 WHERE try_bonus = "8" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'esr')) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CUR... | eicu |
CREATE TABLE table_name_67 (
wins INTEGER,
position VARCHAR,
loses VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest wins the club with a position of 4 and less than 4 losses has?
| SELECT MIN(wins) FROM table_name_67 WHERE position = 4 AND loses < 4 | sql_create_context |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has friends that are ol... | SELECT friend, age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) ORDER BY age | nvbench |
CREATE TABLE table_name_6 (
date VARCHAR,
team VARCHAR,
venue VARCHAR,
win_draw_lose VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the away game that they lost to Accrington?
| SELECT date FROM table_name_6 WHERE venue = "away" AND win_draw_lose = "lost" AND team = "accrington" | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation ORDER BY Affiliation DESC | nvbench |
CREATE TABLE table_12152 (
"Position" real,
"Club" text,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT MIN("Position") FROM table_12152 WHERE "Goals against" = '53' AND "Points" = '26' AND "Goal Difference" > '-11' | wikisql |
CREATE TABLE qtb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(*) FROM zyb WHERE zyb.PERSON_SEX = '马文心' AND MOD(zyb.MED_CLINIC_ID, 1) = 0 | css |
CREATE TABLE table_4084 (
"School" text,
"Titles" real,
"Shared Titles" real,
"Runners-Up" real,
"Total Finals" real,
"Last Title" text,
"Last Final" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many shared titles does the club whose l... | SELECT "Shared Titles" FROM table_4084 WHERE "Last Final" = '2012' | wikisql |
CREATE TABLE table_28726 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the titles o... | SELECT "Title" FROM table_28726 WHERE "Written by" = 'Anne Cofell Saunders' | wikisql |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '柏泰初' AND IN_HOSP_DATE BETWEEN '2015-08-27' AND '2016-11-04' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_67615 (
"Year" real,
"Series title" text,
"Chinese title" text,
"Role" text,
"Channel" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The series titled dragon laws i: the undercover has what role?
| SELECT "Role" FROM table_67615 WHERE "Series title" = 'dragon laws i: the undercover' | wikisql |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | SELECT U.Id AS "user_link", COUNT(B.Id) AS NumBadges FROM Badges AS B INNER JOIN Users AS U ON U.Id = B.UserId WHERE B.Name = 'Necromancer' GROUP BY U.Id, U.DisplayName HAVING COUNT(B.Id) >= 5 ORDER BY NumBadges DESC | sede |
CREATE TABLE table_7077 (
"Name" text,
"Built by HM Dockyard" text,
"Ordered" text,
"Laid down" text,
"Launched" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name that has July 1823 as the Laid down, and portsmouth as the built by hm d... | SELECT "Name" FROM table_7077 WHERE "Laid down" = 'july 1823' AND "Built by HM Dockyard" = 'portsmouth' | wikisql |
CREATE TABLE table_18317 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which district is republican?
| SELECT "District" FROM table_18317 WHERE "Party" = 'Republican' | wikisql |
CREATE TABLE table_40597 (
"Sanderstead" text,
"Selsdon" text,
"Coombe Road" text,
"Bingham Road" text,
"Woodside" text,
"Elmers End" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Selsdon for the 17:19 Coombe Road?
| SELECT "Selsdon" FROM table_40597 WHERE "Coombe Road" = '17:19' | wikisql |
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREAT... | SELECT Sex, COUNT(*) FROM Student WHERE Age > (SELECT AVG(Age) FROM Student) GROUP BY Sex ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_204_140 (
id number,
"round" number,
"#" number,
"player" text,
"position" text,
"nationality" text,
"college/junior/club team (league)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many centers were drafted by the i... | SELECT COUNT(*) FROM table_204_140 WHERE "position" = 'center' | squall |
CREATE TABLE table_25330991_3 (
james_e_holmes VARCHAR,
reidsville VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the james e. holmes for erselle young
| SELECT james_e_holmes FROM table_25330991_3 WHERE reidsville = "Erselle Young" | sql_create_context |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '苗芳蔼' AND gwyjzb.MED_SER_ORG_NO = '3888607' AND NOT gwyjzb.OUT_DIAG_DIS_NM LIKE '%药%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '苗芳蔼' AND fgwyjzb.MED_SER_ORG_NO = '3888607' AND NOT fgwyjzb.OUT_DIAG_DIS_NM LIKE '%药%' | css |
CREATE TABLE table_15959 (
"Song" text,
"Mobiles" real,
"Northern Ireland" real,
"Northern England" real,
"Scotland" real,
"Southern England" real,
"Wales" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest ... | SELECT MIN("Scotland") FROM table_15959 | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.short_title = "Insert 2 vascular stents" | mimicsql_data |
CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE music_festival (
ID int,
Music_Festival text,
Date_of_ceremony text,
Category text,
Volume int,
Result text
)
CREATE TABLE artist (
Ar... | SELECT Result, COUNT(Result) FROM music_festival GROUP BY Result ORDER BY COUNT(Result) | nvbench |
CREATE TABLE table_52331 (
"Pac-12" text,
"Lost" real,
"Tied" real,
"Pct." real,
"Years" real,
"Total Games" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of years associated with 51 games tied and over 1184 total gam... | SELECT AVG("Years") FROM table_52331 WHERE "Tied" = '51' AND "Total Games" > '1184' | wikisql |
CREATE TABLE Invoice_Line_Items (
order_item_id INTEGER,
invoice_number INTEGER,
product_id INTEGER,
product_title VARCHAR(80),
product_quantity VARCHAR(50),
product_price DECIMAL(19,4),
derived_product_cost DECIMAL(19,4),
derived_vat_payable DECIMAL(19,4),
derived_total_cost DECIMAL... | SELECT account_id, account_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | nvbench |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '韩雅柔' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 2215.89) | css |
CREATE TABLE table_67061 (
"Name" text,
"Est." real,
"City" text,
"Country" text,
"Website" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the website for the yamagata international documentary film festival?
| SELECT "Website" FROM table_67061 WHERE "Name" = 'yamagata international documentary film festival' | wikisql |
CREATE TABLE table_name_19 (
d_49_√ VARCHAR,
d_41_√ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the D 49 number when the D 41 is d 61 ?
| SELECT d_49_√ FROM table_name_19 WHERE d_41_√ = "d 61 √" | sql_create_context |
CREATE TABLE table_15747 (
"Year" real,
"Denomination" text,
"Alloy" text,
"Reverse" text,
"Diameter" text,
"Weight" text,
"Obverse" text,
"Mintage" real,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the diameter o... | SELECT "Diameter" FROM table_15747 WHERE "Reverse" = 'archery' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE compartmen... | SELECT DISTINCT flight_id FROM flight WHERE (((((departure_time <= 2400 AND departure_time >= 1800) AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 22 AND DATE_DAYalias0... | atis |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Sex, MIN(Weight) FROM people GROUP BY Sex ORDER BY Sex | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.days_stay = "3" | mimicsql_data |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT city, COUNT(*) FROM station GROUP BY city ORDER BY COUNT(*) | nvbench |
CREATE TABLE Staff_Department_Assignments (
staff_id INTEGER,
department_id INTEGER,
date_assigned_from DATETIME,
job_title_code VARCHAR(10),
date_assigned_to DATETIME
)
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)... | SELECT payment_method_code, COUNT(*) FROM Customers GROUP BY payment_method_code | nvbench |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.MED_ORG_DEPT_NM FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '4813330' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-09-16' AND '2009-07-01' GROUP BY gwyjzb.MED_ORG_DEPT_CD ORDER BY SUM(t_kc24.OVE_PAY) DESC LIMIT 5 UNION SELECT fgw... | css |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(4... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text ... | SELECT * FROM Votes WHERE PostId = 21834245 | sede |
CREATE TABLE table_20013 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"For" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the won fo... | SELECT "Won" FROM table_20013 WHERE "Difference" = '33' | wikisql |
CREATE TABLE table_name_11 (
population__2009_estimate_ VARCHAR,
largest_city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 2009 estimate population of the region with Manaus as the largest city?
| SELECT population__2009_estimate_ FROM table_name_11 WHERE largest_city = "manaus" | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id... | SELECT Id, Title, CreationDate FROM Posts WHERE ((Tags LIKE '%##lib##%') OR (Tags LIKE '%##lib##') OR (Tags LIKE '##lib##%')) AND Score >= 5 AND CreationDate > '2018-03-01' | sede |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT pt.Name AS PostType, LENGTH(p.Body) AS Length, u.DisplayName AS UserName, ('site://q/' + CAST(p.Id AS TEXT(30)) + '|' + q.Title) AS Title FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id INNER JOIN PostTypes AS pt ON p.PostTypeId = pt.Id INNER JOIN Posts AS q ON p.ParentId = q.Id OR p.ParentId IS NU... | sede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.