instruction stringlengths 212 6.3k | output stringlengths 6 2.03k |
|---|---|
### Instruction:
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code text,
document_name text,
document_description text,
other_details text
)
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE employees (
employee_id ... | SELECT DISTINCT destruction_authorised_by_employee_id FROM documents_to_be_destroyed |
### Instruction:
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code text,
document_name text,
docu... | SELECT document_type_code FROM ref_document_types WHERE document_type_name = "Paper" |
### Instruction:
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Det... | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID |
### Instruction:
CREATE TABLE documents_to_be_destroyed (
document_id number,
destruction_authorised_by_employee_id number,
destroyed_by_employee_id number,
planned_destruction_date time,
actual_destruction_date time,
other_details text
)
CREATE TABLE ref_document_types (
document_type_code... | SELECT location_name, location_description FROM ref_locations WHERE location_code = "x" |
### Instruction:
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperfield (
fieldid int... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'lorenzo bruzzone' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE table_train_131 (
"id" int,
"thyroid_disease" bool,
"pulmonary_disease" bool,
"right_bundle_branch_block" bool,
"allergy_to_piperidine_derivatives" bool,
"obstructive_pulmonary_disease" bool,
"inflammatory_bowel_disease" bool,
"renal_disease" bool,
"hepa... | SELECT * FROM table_train_131 WHERE allergy_to_piperidine_derivatives = 1 OR allergy_to_cholinesterase_inhibitors = 1 |
### Instruction:
CREATE TABLE table_6167 (
"Year" real,
"Total Convictions" real,
"Homicide (Art. 111,112,113,116 StGB)" real,
"Serious Bodily Injury (Art. 122 StGB)" real,
"Minor Bodily Injury (Art. 123 StGB)" real,
"Sexual Contact with Children (Art. 187 StGB)" real,
"Rape (Art. 190 StGB)"... | SELECT COUNT("Serious Bodily Injury (Art. 122 StGB)") FROM table_6167 WHERE "Homicide (Art. 111,112,113,116 StGB)" < '84' |
### Instruction:
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciti... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'data cleaning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND venue.venueid = paper.venueid AND venue.venuename = 'vldb' |
### Instruction:
CREATE TABLE candidate_assessments (
candidate_id number,
qualification text,
assessment_date time,
asessment_outcome_code text
)
CREATE TABLE addresses (
address_id number,
line_1 text,
line_2 text,
city text,
zip_postcode text,
state_province_county text,
... | SELECT first_name FROM people ORDER BY first_name |
### Instruction:
CREATE TABLE shipments (
shipment_id number,
order_id number,
invoice_number number,
shipment_tracking_number text,
shipment_date time,
other_shipment_details text
)
CREATE TABLE customers (
customer_id number,
customer_name text,
customer_details text
)
CREATE TAB... | SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_id FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped" |
### Instruction:
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE dataset (
datasetid int,
... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'shwetak patel' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code DESC |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
... | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments GROUP BY Date_Payment_Made ORDER BY Date_Payment_Made |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTE... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE publication_keyword (
kid int,
pid i... | SELECT reference_num FROM publication WHERE title = 'Making database systems usable' |
### Instruction:
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varc... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Magda Balazinska' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Trans... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count > 100 OR amount_of_transaction > 1000 ORDER BY date_of_transaction DESC |
### Instruction:
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,
booking_start_date time,
booking_end_date time
)
CREATE TABLE apartments (
apt... | SELECT AVG(room_count) FROM apartment_bookings AS T1 JOIN apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional" |
### Instruction:
CREATE TABLE document_locations (
document_id number,
location_code text,
date_in_location_from time,
date_in_locaton_to time
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored... | SELECT role_name, role_description FROM roles WHERE role_code = "MG" |
### Instruction:
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
... | SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code ORDER BY COUNT(*) |
### Instruction:
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
B... | SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code ORDER BY Budget_Type_Code |
### Instruction:
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description V... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description ORDER BY Document_Type_Description |
### Instruction:
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE field ... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Luke Zettlemoyer' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE table_23624 (
"\u0410 \u0430 [a]" text,
"\u0411 \u0431 [b]" text,
"\u0412 \u0432 [v]" text,
"\u0413 \u0433 [\u0261]" text,
"\u0413\u044c \u0433\u044c [\u0261\u02b2]" text,
"\u0413\u04d9 \u0433\u04d9 [\u0261\u02b7]" text,
"\u0494 \u0495 [\u0281/\u0263]" text,
... | SELECT "\u0494\u044c \u0495\u044c [\u0281\u02b2/\u0263\u02b2]" FROM table_23624 WHERE "\u0413\u044c \u0433\u044c [\u0261\u02b2]" = 'Ҷ ҷ [t͡ʃʼ]' |
### Instruction:
CREATE TABLE customer_contact_channels (
customer_id number,
channel_code text,
active_from_date time,
active_to_date time,
contact_number text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
order_status text,
order_date time,
order_detail... | SELECT MAX(t2.active_to_date) FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser" |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTE... | SELECT card_type_code, SUM(card_number) FROM Customers_Cards GROUP BY card_type_code ORDER BY SUM(card_number) DESC |
### Instruction:
CREATE TABLE hall_of_fame (
player_id text,
yearid number,
votedby text,
ballots text,
needed text,
votes text,
inducted text,
category text,
needed_note text
)
CREATE TABLE player_award (
player_id text,
award_id text,
year number,
league_id text,
... | SELECT league_id FROM player_award WHERE year = "2006" GROUP BY league_id ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
B... | SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amou... | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY AVG(Amount_Payment) DESC |
### Instruction:
CREATE TABLE countries (
country_id text,
country_name text,
region_id number
)
CREATE TABLE jobs (
job_id text,
job_title text,
min_salary number,
max_salary number
)
CREATE TABLE departments (
department_id number,
department_name text,
manager_id number,
... | SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05' |
### Instruction:
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Inves... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count > 100 OR amount_of_transaction > 1000 ORDER BY date_of_transaction |
### Instruction:
CREATE TABLE Investors (
investor_id INTEGER,
Investor_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(... | 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) |
### Instruction:
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amou... | SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Date_Payment_Made |
### Instruction:
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CRE... | SELECT year FROM publication WHERE title = 'Making database systems usable' |
### Instruction:
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE venue (
venueid int,
venuename varch... | SELECT DISTINCT paperkeyphrase.keyphraseid FROM author, paper, paperkeyphrase, writes WHERE author.authorname = 'Christof Dallermassl' AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2000 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Payments (
Payment_... | SELECT Payment_Method_Code, SUM(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY SUM(Amount_Payment) DESC |
### Instruction:
CREATE TABLE customers (
customer_id number,
payment_method text,
customer_name text,
date_became_customer time,
other_customer_details text
)
CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE addresses (
address_id number,
address_cont... | SELECT address_content FROM addresses WHERE city = "East Julianaside" AND state_province_county = "Texas" UNION SELECT address_content FROM addresses WHERE city = "Gleasonmouth" AND state_province_county = "Arizona" |
### Instruction:
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varch... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'steve tanimoto' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varch... | SELECT DISTINCT COUNT(DISTINCT paper.paperid), paper.year FROM author, paper, writes WHERE author.authorname LIKE 'Luke S Zettlemoyer' AND writes.authorid = author.authorid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY paper.year ORDER BY COUNT(DISTINCT paper.paperid) DESC |
### Instruction:
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Det... | SELECT Statement_Details, SUM(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details |
### Instruction:
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE... | SELECT role_code FROM employees GROUP BY role_code HAVING COUNT(*) >= 3 |
### Instruction:
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE field (
fieldid... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'TAIL' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND venue.venueid = paper.venueid AND venue.venuename = 'NIPS' |
### Instruction:
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_name VARCHAR(40)
)
CREATE TABLE Claims (
Claim_ID INTEGER,
FNOL_ID INTEGER,
Effective_Date DATE
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_name VARCHAR(40)
)
CREATE TABLE Settlements (
Settlement_ID INT... | SELECT Date_Closed, COUNT(Date_Closed) FROM Customers AS t1 JOIN Customers_Policies AS t2 ON t1.Customer_ID = t2.Customer_ID WHERE t1.Customer_name LIKE "%Diana%" |
### Instruction:
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Trans... | SELECT T1.Investor_details, T1.investor_id FROM Investors AS T1 JOIN Transactions AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255... | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY AVG(Amount_Payment) |
### Instruction:
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,... | SELECT DISTINCT cite.citedpaperid, COUNT(1) AS DERIVED_FIELDalias0 FROM author, cite, writes WHERE author.authorname = 'Michael I. Jordan' AND writes.authorid = author.authorid AND writes.paperid = cite.citingpaperid GROUP BY cite.citedpaperid ORDER BY DERIVED_FIELDalias0 DESC |
### Instruction:
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE employees (
employee_id number,
role_code text,
employee_name text,
gender_mfu text,
date_of_birth time,
other_details text
)
CREATE TA... | SELECT role_description FROM roles WHERE role_name = "Proof Reader" |
### Instruction:
CREATE TABLE minor_in (
stuid number,
dno number
)
CREATE TABLE department (
dno number,
division text,
dname text,
room text,
building text,
dphone number
)
CREATE TABLE enrolled_in (
stuid number,
cid text,
grade text
)
CREATE TABLE faculty (
facid n... | SELECT DISTINCT T3.fname FROM enrolled_in AS T1 JOIN gradeconversion AS T2 JOIN student AS T3 ON T1.grade = T2.lettergrade AND T1.stuid = T3.stuid WHERE T2.gradepoint >= 3.8 |
### Instruction:
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdatas... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'augmented reality' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND venue.venueid = paper.venueid AND venue.venuename = 'chi' |
### Instruction:
CREATE TABLE students (
student_id number,
date_of_registration time,
date_of_latest_logon time,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text
)
CREATE TABLE courses (
course_id number,
author_id number,
subject_id nu... | SELECT T1.course_name, T1.course_description FROM courses AS T1 JOIN subjects AS T2 ON T1.subject_id = T2.subject_id WHERE T2.subject_name = "Computer Science" |
### Instruction:
CREATE TABLE player_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
notes text
)
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_fi... | SELECT player_id FROM player_award_vote WHERE year = "1971" ORDER BY points_won DESC LIMIT 1 |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
... | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY AVG(Amount_Payment) DESC |
### Instruction:
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int... | SELECT DISTINCT COUNT(cite.citingpaperid), keyphrase.keyphrasename FROM cite, keyphrase, paperkeyphrase WHERE paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paperkeyphrase.paperid = cite.citedpaperid GROUP BY keyphrase.keyphrasename ORDER BY COUNT(cite.citingpaperid) DESC |
### Instruction:
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code |
### Instruction:
CREATE TABLE courses (
course_id number,
author_id number,
subject_id number,
course_name text,
course_description text
)
CREATE TABLE course_authors_and_tutors (
author_id number,
author_tutor_atb text,
login_name text,
password text,
personal_name text,
mi... | SELECT T2.course_name FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id WHERE T1.personal_name = "Julio" |
### Instruction:
CREATE TABLE table_test_24 (
"id" int,
"history_of_bleeding_diathesis" bool,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"blood_draw" bool,
"renal_disease" bool,
"allergy_to_aspirin" bool,
"allergy_to_clopidogrel" bool,
"cardi... | SELECT * FROM table_test_24 WHERE gastrointestinal_disease = 1 OR bleeding = 1 OR platelet_count < 100000 OR hemoglobin_a1c_hba1c < 10 |
### Instruction:
CREATE TABLE subjects (
subject_id number,
subject_name text
)
CREATE TABLE students (
student_id number,
date_of_registration time,
date_of_latest_logon time,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text
)
CREATE TABLE... | SELECT T1.course_name FROM courses AS T1 JOIN student_course_enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1 |
### Instruction:
CREATE TABLE employees (
employee_id number,
role_code text,
employee_name text,
gender_mfu text,
date_of_birth time,
other_details text
)
CREATE TABLE ref_locations (
location_code text,
location_name text,
location_description text
)
CREATE TABLE all_documents (
... | SELECT document_type_code, document_type_name FROM ref_document_types |
### Instruction:
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Payments (
Payment_... | SELECT Payment_Method_Code, AVG(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code DESC |
### Instruction:
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Det... | SELECT Statement_Details, COUNT(Statement_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255... | SELECT Payment_Method_Code, SUM(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code |
### Instruction:
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE conferen... | SELECT homepage FROM organization WHERE name = 'University of Michigan' |
### Instruction:
CREATE TABLE users (
user_id number,
role_code text,
user_name text,
user_login text,
password text
)
CREATE TABLE functional_areas (
functional_area_code text,
parent_functional_area_code text,
functional_area_description text
)
CREATE TABLE document_sections (
se... | SELECT role_description FROM roles WHERE role_code = (SELECT role_code FROM users WHERE user_login = 1 GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1) |
### Instruction:
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transa... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*) |
### Instruction:
CREATE TABLE table_test_2 (
"id" int,
"loss_of_consciousness" bool,
"gender" string,
"bleeding" int,
"systolic_blood_pressure_sbp" int,
"stroke" bool,
"renal_disease" bool,
"hemorrhagic_diathesis" bool,
"transient_ischemic_attack" bool,
"creatinine_clearance_cl" ... | SELECT * FROM table_test_2 WHERE renal_disease = 1 OR ((gender = 'male' AND prior_creatinine > 2.5) OR (gender = 'female' AND prior_creatinine > 2)) |
### Instruction:
CREATE TABLE guests (
guest_id number,
gender_code text,
guest_first_name text,
guest_last_name text,
date_of_birth time
)
CREATE TABLE view_unit_status (
apt_id number,
apt_booking_id number,
status_date time,
available_yn others
)
CREATE TABLE apartment_bookings ... | SELECT T1.building_address FROM apartment_buildings AS T1 JOIN apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2 |
### Instruction:
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Docume... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code DESC |
### Instruction:
CREATE TABLE table_test_8 (
"id" int,
"anemia" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systolic_blood_pressure_sbp" int,
"intravenous_pressors" bool,
"fever" bool,
"hemoglobin_a1c_hba1c" float,
"heart_disease" bool,
"vasopressors" bool,
"renal_disease" bool... | SELECT * FROM table_test_8 WHERE fever = 1 OR temperature > 37.5 OR infection_with_fever = 1 |
### Instruction:
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
... | SELECT homepage FROM conference WHERE name = 'VLDB' |
### Instruction:
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_first text
)
CREATE TABLE player (
player_id text,
birth_year text,
birth_month text,
birth_day text,
birth_country t... | SELECT player_id FROM salary WHERE year = "2015" ORDER BY salary DESC LIMIT 1 |
### Instruction:
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CR... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY Document_Type_Code DESC |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255... | SELECT Payment_Method_Code, COUNT(Payment_Method_Code) FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(Payment_Method_Code) |
### Instruction:
CREATE TABLE employees (
employee_id number,
role_code text,
employee_name text,
gender_mfu text,
date_of_birth time,
other_details text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TA... | SELECT employee_id FROM employees WHERE employee_name = "Ebba" |
### Instruction:
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_P... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Settlements ORDER BY COUNT(Date_Claim_Made) |
### Instruction:
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_address_from time,
address_type text,
date_address_to time
)
CREATE TABLE order_items (
order_id number,
product_id number,
order_quantity text
)
CREATE TABLE addresses (
address_id numbe... | SELECT t1.customer_name, t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email' |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTE... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255... | SELECT Payment_Method_Code, SUM(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code |
### Instruction:
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE pub... | SELECT title FROM publication ORDER BY citation_num DESC LIMIT 1 |
### Instruction:
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
... | SELECT DISTINCT COUNT(cite.citingpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY cite.citingpaperid HAVING COUNT(DISTINCT cite.citedpaperid) > 2 |
### Instruction:
CREATE TABLE table_test_10 (
"id" int,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"immunosuppressive_disease" bool,
"systolic_arterial_pressure_sap" int,
"lymphomas" bool,
"left_ventricular_dysfunction" bool,
"tissue_hypoperfusion" ... | SELECT * FROM table_test_10 WHERE immunosuppressive_disease = 1 OR cancer = 1 OR lymphomas = 1 OR positive_hiv = 1 OR hepatitis = 1 |
### Instruction:
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE dataset (
dataseti... | SELECT DISTINCT paper.paperid FROM author, paper, venue, writes WHERE author.authorname = 'wei lu' AND paper.year = 2011 AND venue.venueid = paper.venueid AND venue.venuename = 'EMNLP' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid |
### Instruction:
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE author (... | SELECT DISTINCT cite.citingpaperid FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY cite.citingpaperid HAVING COUNT(DISTINCT cite.citedpaperid) < 5 |
### Instruction:
CREATE TABLE customer_payments (
customer_id number,
datetime_payment time,
payment_method_code text,
amount_payment number
)
CREATE TABLE lessons (
lesson_id number,
customer_id number,
lesson_status_code text,
staff_id number,
vehicle_id number,
lesson_date ti... | SELECT COUNT(*) FROM vehicles |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first... | SELECT card_type_code, SUM(card_number) FROM Customers_Cards GROUP BY card_type_code ORDER BY SUM(card_number) |
### Instruction:
CREATE TABLE table_dev_31 (
"id" int,
"gender" string,
"pre_dm" bool,
"hemoglobin_a1c_hba1c" float,
"renal_disease" bool,
"diabetic" string,
"fasting_blood_glucose_fbg" float,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"fast... | SELECT * FROM table_dev_31 WHERE body_mass_index_bmi >= 25 AND (hemoglobin_a1c_hba1c >= 5.7 AND hemoglobin_a1c_hba1c <= 6.4) AND body_mass_index_bmi >= 30 |
### Instruction:
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Settlements (
Settlement_ID ... | SELECT Date_Payment_Made, SUM(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' |
### Instruction:
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Acc... | SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE countries (
country_id text,
country_name text,
region_id number
)
CREATE TABLE job_history (
employee_id number,
start_date time,
end_date time,
job_id text,
department_id number
)
CREATE TABLE jobs (
job_id text,
job_title text,
min_salary nu... | SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 |
### Instruction:
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE dataset (
datasetid int,
datasetname va... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'monte carlo simulation' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year > 2011 |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code |
### Instruction:
CREATE TABLE functional_areas (
functional_area_code text,
parent_functional_area_code text,
functional_area_description text
)
CREATE TABLE users (
user_id number,
role_code text,
user_name text,
user_login text,
password text
)
CREATE TABLE document_structures (
... | SELECT document_name, access_count FROM documents ORDER BY access_count DESC LIMIT 1 |
### Instruction:
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first... | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code |
### Instruction:
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Pay... | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' |
### Instruction:
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
author... | SELECT DISTINCT COUNT(paper.paperid) FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'question answering' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 |
### Instruction:
CREATE TABLE product (
product_id number,
product_name text,
product_details text
)
CREATE TABLE problem_log (
problem_log_id number,
assigned_to_staff_id number,
problem_id number,
problem_category_code text,
problem_status_code text,
log_entry_date time,
log_e... | SELECT COUNT(*), T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numcit... | SELECT DISTINCT dataset.datasetid FROM dataset, keyphrase, paperdataset, paperkeyphrase WHERE keyphrase.keyphrasename = 'video segmentation' AND paperdataset.datasetid = dataset.datasetid AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paperkeyphrase.paperid = paperdataset.paperid |
### Instruction:
CREATE TABLE table_test_8 (
"id" int,
"anemia" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systolic_blood_pressure_sbp" int,
"intravenous_pressors" bool,
"fever" bool,
"hemoglobin_a1c_hba1c" float,
"heart_disease" bool,
"vasopressors" bool,
"renal_disease" bool... | SELECT * FROM table_test_8 WHERE hypotension = 1 OR systolic_blood_pressure_sbp < 90 |
### Instruction:
CREATE TABLE contacts (
contact_id number,
customer_id number,
gender text,
first_name text,
last_name text,
contact_phone text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
order_date time,
order_status_code text
)
CREATE TABLE addresse... | SELECT product_type_code, product_name FROM products WHERE product_price > 1000 OR product_price < 500 |
### Instruction:
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions ... | SELECT card_id, customer_id FROM Customers_Cards GROUP BY card_type_code |
### Instruction:
CREATE TABLE player (
player_id text,
birth_year text,
birth_month text,
birth_day text,
birth_country text,
birth_state text,
birth_city text,
death_year text,
death_month text,
death_day text,
death_country text,
death_state text,
death_city text,
... | SELECT league_id FROM salary GROUP BY league_id ORDER BY AVG(salary) DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.