NATURAL_LANG
stringlengths
12
244
SQL
stringlengths
18
336
SCHEMA
stringlengths
27
355
input_ids
list
attention_mask
list
labels
list
Find names and ids of all documents with document type code BK.
SELECT document_name, document_id FROM Documents WHERE document_type_code = "BK"
CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR, document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 4350, 584, 4280, 28027, 6, 1708, 834, 23, 26, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 3056...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 4350, 6, 1708, 834, 23, 26, 21680, 11167, 7, 549, 17444, 427, 1708, 834, 6137, 834, 4978, 3274, 96, 279, 439, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
How many documents are with document type code BK for each product id?
SELECT COUNT(*), project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id
CREATE TABLE Documents (project_id VARCHAR, document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 2691, 33, 28, 1708, 686, 1081, 272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 516, 834, 23, 26, 21680, 11167, 7, 549, 17444, 427, 1708, 834, 6137, 834, 4978, 3274, 96, 279, 439, 121, 350, 4630, 6880, 272, 476, 516, 834, 23, 26, 1, -100, -100, -100, -100, -100, -...
Show the document name and the document date for all documents on project with details 'Graph Database project'.
SELECT document_name, document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project'
CREATE TABLE Documents (project_id VARCHAR); CREATE TABLE projects (project_id VARCHAR, project_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 23574, 834, 23, 26, 584, 4280, 28027, 6, 516, 834, 221, 5756, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 1708, 834, 4350, 6, 1708, 834, 5522, 21680, 11167, 7, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, 834, 23, 26, 549, 17444, 427, 332, 4416, 23574...
Show project ids and the number of documents in each project.
SELECT project_id, COUNT(*) FROM Documents GROUP BY project_id
CREATE TABLE Documents (project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 516, 3, 23, 26, 7, 11, 8, 381, 13, 2691, 16, 284, 516, 5, 1, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 516, 834, 23, 26, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 516, 834, 23, 26, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What is the id of the project with least number of documents?
SELECT project_id FROM Documents GROUP BY project_id ORDER BY COUNT(*) LIMIT 1
CREATE TABLE Documents (project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 3, 23, 26, 13, 8, 516, 28, 709, 381, 13, 2691, 58, 1, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 516, 834, 23, 26, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 516, 834, 23, 26, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Show the ids for projects with at least 2 documents.
SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2
CREATE TABLE Documents (project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 3, 23, 26, 7, 21, 1195, 28, 44, 709, 204, 2691, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 516, 834, 23, 26, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 516, 834, 23, 26, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 2423, 204, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
List document type codes and the number of documents in each code.
SELECT document_type_code, COUNT(*) FROM Documents GROUP BY document_type_code
CREATE TABLE Documents (document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 1708, 686, 5633, 11, 8, 381, 13, 2691, 16, 284, 1081, 5, 1, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 4978, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 1708, 834, 6137, 834, 4978, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What is the document type code with most number of documents?
SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Documents (document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1708, 686, 1081, 28, 167, 381, 13, 2691, 58, 1, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 4978, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 1708, 834, 6137, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -10...
Show the document type code with fewer than 3 documents.
SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3
CREATE TABLE Documents (document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 1708, 686, 1081, 28, 3, 10643, 145, 220, 2691, 5, 1, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 4978, 21680, 11167, 7, 350, 4630, 6880, 272, 476, 1708, 834, 6137, 834, 4978, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 3, 2, 220, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.
SELECT T1.statement_details, T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project'
CREATE TABLE Statements (statement_details VARCHAR, statement_id VARCHAR); CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 16836, 7, 41, 5540, 297, 834, 221, 5756, 7, 584, 4280, 28027, 6, 2493, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 5540, 297, 834, 221, 5756, 7, 6, 332, 4416, 28244, 834, 4350, 21680, 16836, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 6157, 332, 357, 9191, 332, 5411, 5540, 297, 834, 23, 26, 3274, 332, 4416, 28244, ...
Show all document type codes, document type names, document type descriptions.
SELECT document_type_code, document_type_name, document_type_description FROM Ref_document_types
CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR, document_type_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 28244, 834, 6137, 7, 41, 28244, 834, 6137, 834, 4978, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4350, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 221, 11830, 584, 4280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 4978, 6, 1708, 834, 6137, 834, 4350, 6, 1708, 834, 6137, 834, 221, 11830, 21680, 419, 89, 834, 28244, 834, 6137, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
What is the document type description for document type named Film?
SELECT document_type_description FROM Ref_document_types WHERE document_type_name = "Film"
CREATE TABLE Ref_document_types (document_type_description VARCHAR, document_type_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 28244, 834, 6137, 7, 41, 28244, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 6137, 834, 221, 11830, 21680, 419, 89, 834, 28244, 834, 6137, 7, 549, 17444, 427, 1708, 834, 6137, 834, 4350, 3274, 96, 371, 173, 51, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
What is the document type name and the document type description and creation date for all the documents?
SELECT T1.document_type_name, T1.document_type_description, T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code
CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_description VARCHAR, document_type_code VARCHAR); CREATE TABLE Documents (Document_date VARCHAR, document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 28244, 834, 6137, 7, 41, 28244, 834, 6137, 834, 4350, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 28244, 834, 6137, 834, 4350, 6, 332, 5411, 28244, 834, 6137, 834, 221, 11830, 6, 332, 4416, 4135, 1071, 297, 834, 5522, 21680, 419, 89, 834, 28244, 834, 6137, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, ...
Show the number of projects.
SELECT COUNT(*) FROM Projects
CREATE TABLE Projects (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 381, 13, 1195, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 2786, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
List ids and details for all projects.
SELECT project_id, project_details FROM Projects
CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 6, 516, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 3, 23, 26, 7, 11, 1030, 21, 66, 1195, 5, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 516, 834, 23, 26, 6, 516, 834, 221, 5756, 7, 21680, 2786, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
What is the project id and detail for the project with at least two documents?
SELECT T1.project_id, T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING COUNT(*) > 2
CREATE TABLE Projects (project_id VARCHAR, project_details VARCHAR); CREATE TABLE Documents (project_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 23, 26, 584, 4280, 28027, 6, 516, 834, 221, 5756, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 23, 26, 6, 332, 5411, 23574, 834, 221, 5756, 7, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, 834, 23...
What is the project detail for the project with document "King Book"?
SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = "King Book"
CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR); CREATE TABLE Documents (project_id VARCHAR, document_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23574, 834, 221, 5756, 7, 584, 4280, 28027, 6, 516, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 23574, 834, 23,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23574, 834, 221, 5756, 7, 21680, 2786, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 6157, 332, 357, 9191, 332, 5411, 23574, 834, 23, 26, 3274, 332, 4416, 23574, 834, 23, 26, 549, 17444, 427, 332, 4416, ...
How many budget types do we have?
SELECT COUNT(*) FROM Ref_budget_codes
CREATE TABLE Ref_budget_codes (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 11073, 2782, 834, 4978, 7, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 1487, 1308, 103, 62, 43, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 419, 89, 834, 11073, 2782, 834, 4978, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
List all budget type codes and descriptions.
SELECT budget_type_code, budget_type_description FROM Ref_budget_codes
CREATE TABLE Ref_budget_codes (budget_type_code VARCHAR, budget_type_description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 11073, 2782, 834, 4978, 7, 41, 11073, 2782, 834, 6137, 834, 4978, 584, 4280, 28027, 6, 1487, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1487, 834, 6137, 834, 4978, 6, 1487, 834, 6137, 834, 221, 11830, 21680, 419, 89, 834, 11073, 2782, 834, 4978, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What is the description for the budget type with code ORG?
SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = "ORG"
CREATE TABLE Ref_budget_codes (budget_type_description VARCHAR, budget_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 11073, 2782, 834, 4978, 7, 41, 11073, 2782, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 6, 1487, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 321...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1487, 834, 6137, 834, 221, 11830, 21680, 419, 89, 834, 11073, 2782, 834, 4978, 7, 549, 17444, 427, 1487, 834, 6137, 834, 4978, 3274, 96, 2990, 517, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many documents have expenses?
SELECT COUNT(*) FROM Documents_with_expenses
CREATE TABLE Documents_with_expenses (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 2691, 43, 5159, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What are the document ids for the budget type code 'SF'?
SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'
CREATE TABLE Documents_with_expenses (document_id VARCHAR, budget_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 6, 1487, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 549, 17444, 427, 1487, 834, 6137, 834, 4978, 3274, 3, 31, 7016, 31, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Show the budget type code and description and the corresponding document id.
SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code
CREATE TABLE Ref_budget_codes (budget_type_code VARCHAR, budget_type_description VARCHAR); CREATE TABLE Documents_with_expenses (document_id VARCHAR, budget_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 419, 89, 834, 11073, 2782, 834, 4978, 7, 41, 11073, 2782, 834, 6137, 834, 4978, 584, 4280, 28027, 6, 1487, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 11073, 2782, 834, 6137, 834, 4978, 6, 332, 4416, 11073, 2782, 834, 6137, 834, 221, 11830, 6, 332, 5411, 28244, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 6157, 332, 536, 3, 15355, 3...
Show ids for all documents with budget types described as 'Government'.
SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = "Government"
CREATE TABLE Documents_with_expenses (document_id VARCHAR, Budget_Type_code VARCHAR); CREATE TABLE Ref_Budget_Codes (Budget_Type_code VARCHAR, budget_type_Description VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 6, 12532, 834, 25160, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 28244, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 6157, 332, 536, 3, 15355, 3162, 419, 89, 834, 279, 13164, 17, 834, 22737, 7, 6157, 332, 357, 9191, 332, 5411, 279, 13164, 17, 834, ...
Show budget type codes and the number of documents in each budget type.
SELECT budget_type_code, COUNT(*) FROM Documents_with_expenses GROUP BY budget_type_code
CREATE TABLE Documents_with_expenses (budget_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 11073, 2782, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 1487, 686, 5633, 11, 8, 381, 13, 2691, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1487, 834, 6137, 834, 4978, 6, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 350, 4630, 6880, 272, 476, 1487, 834, 6137, 834, 4978, 1, -100, -100, -100, -100, -100, -100, -100, -100,...
What is the budget type code with most number of documents.
SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE Documents_with_expenses (budget_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 11073, 2782, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 1487, 686, 1081, 28, 167, 381, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 1487, 834, 6137, 834, 4978, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 350, 4630, 6880, 272, 476, 1487, 834, 6137, 834, 4978, 4674, 11300, 272, 476, 2847, 17161, 599, 1935, 61, 309, 25067, 8729, 12604, 209, ...
What are the ids of documents which don't have expense budgets?
SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses
CREATE TABLE Documents (document_id VARCHAR); CREATE TABLE Documents_with_expenses (document_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 262, 4, 30416, 3, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Show ids for all documents in type CV without expense budgets.
SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses
CREATE TABLE Documents_with_expenses (document_id VARCHAR, document_type_code VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_type_code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 6, 1708, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 33...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 549, 17444, 427, 1708, 834, 6137, 834, 4978, 3274, 96, 20410, 121, 262, 4, 30416, 3, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 1, -100,...
What are the ids of documents with letter 's' in the name with any expense budgets.
SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%'
CREATE TABLE Documents_with_expenses (document_id VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 23, 26, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 28244, 834, 23, 26, 21680, 11167, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 6157, 332, 357, 9191, 332, 5411, 28244, 834, 23, 26, 3274, 332, 4416, 28244, 834, 23, 26,...
How many documents do not have any expense?
SELECT COUNT(*) FROM Documents WHERE NOT document_id IN (SELECT document_id FROM Documents_with_expenses)
CREATE TABLE Documents (document_id VARCHAR); CREATE TABLE Documents_with_expenses (document_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 41, 28244, 834, 23, 26, 584, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 11167, 7, 549, 17444, 427, 4486, 1708, 834, 23, 26, 3388, 41, 23143, 14196, 1708, 834, 23, 26, 21680, 11167, 7, 834, 4065, 834, 994, 3801, 15, 7, 61, 1, -100, -100, -100, -100, -...
What are the dates for the documents with both 'GV' type and 'SF' type expenses?
SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'
CREATE TABLE Documents_with_Expenses (document_id VARCHAR, budget_type_code VARCHAR); CREATE TABLE Documents (document_date VARCHAR, document_id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 11167, 7, 834, 4065, 834, 12882, 5167, 7, 41, 28244, 834, 23, 26, 584, 4280, 28027, 6, 1487, 834, 6137, 834, 4978, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 28244, 834, 5522, 21680, 11167, 7, 6157, 332, 536, 3, 15355, 3162, 11167, 7, 834, 4065, 834, 12882, 5167, 7, 6157, 332, 357, 9191, 332, 5411, 28244, 834, 23, 26, 3274, 332, 4416, 28244, 834, 23, 26, 549, ...
What are the account details with the largest value or with value having char '5' in it?
SELECT MAX(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%"
CREATE TABLE Accounts (Account_details INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 6288, 7, 41, 31963, 834, 221, 5756, 7, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 905, 1030, 28, 8, 2015, 701, 42, 28, 701, 578, 3, 4059, 3, 31, 755, 31, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 31963, 834, 221, 5756, 7, 61, 21680, 6288, 7, 4417, 9215, 3, 23143, 14196, 6288, 834, 221, 5756, 7, 21680, 6288, 7, 549, 17444, 427, 6288, 834, 221, 5756, 7, 8729, 9914, 96, 1454, 2712, 121, 1, -100,...
Find the total number of scientists.
SELECT COUNT(*) FROM scientists
CREATE TABLE scientists (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 792, 381, 13, 7004, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 7004, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the total hours of all projects.
SELECT SUM(hours) FROM projects
CREATE TABLE projects (hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 5842, 7, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 792, 716, 13, 66, 1195, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 180, 6122, 599, 5842, 7, 61, 21680, 1195, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many different scientists are assigned to any project?
SELECT COUNT(DISTINCT scientist) FROM assignedto
CREATE TABLE assignedto (scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 17819, 343, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 315, 7004, 33, 7604, 12, 136, 516, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 17901, 61, 21680, 7604, 235, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the number of distinct projects.
SELECT COUNT(DISTINCT name) FROM projects
CREATE TABLE projects (name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 381, 13, 6746, 1195, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 564, 61, 21680, 1195, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the average hours of all projects.
SELECT AVG(hours) FROM projects
CREATE TABLE projects (hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 5842, 7, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 1348, 716, 13, 66, 1195, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 5842, 7, 61, 21680, 1195, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the name of project that continues for the longest time.
SELECT name FROM projects ORDER BY hours DESC LIMIT 1
CREATE TABLE projects (name VARCHAR, hours VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 716, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 516, 24, 3256, 21, 8, 14783, 97, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 1195, 4674, 11300, 272, 476, 716, 309, 25067, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
List the name of all projects that are operated longer than the average working hours of all projects.
SELECT name FROM projects WHERE hours > (SELECT AVG(hours) FROM projects)
CREATE TABLE projects (name VARCHAR, hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 716, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 564, 13, 66, 1195, 24, 33, 7747, 1200, 145, 8, 1348, 464, 716, 13, 66, 1195, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 1195, 549, 17444, 427, 716, 2490, 41, 23143, 14196, 71, 17217, 599, 5842, 7, 61, 21680, 1195, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Find the name and hours of project that has the most number of scientists.
SELECT T1.name, T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE assignedto (project VARCHAR); CREATE TABLE projects (name VARCHAR, hours VARCHAR, code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 716, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 3, 23143, 14196, 332, 5411, 4350, 6, 332, 5411, 5842, 7, 21680, 1195, 6157, 332, 536, 3, 15355, 3162, 7604, 235, 6157, 332, 357, 9191, 332, 5411, 4978, 3274, 332, 4416, 23574, 350, 4630, 6880, 272, 476, 332, 4416, 23574, 4674, 11300, ...
Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to.
SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%'
CREATE TABLE scientists (SSN VARCHAR, name VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR); CREATE TABLE projects (name VARCHAR, code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 134, 8544, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 6, 17901, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332, 519, 9191, 332, 5411, 17819, 343, 3274, 332, 578...
Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.
SELECT SUM(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'
CREATE TABLE scientists (SSN VARCHAR, name VARCHAR); CREATE TABLE projects (hours INTEGER, code VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 134, 8544, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 5842, 7, 3, 21342, 17966, 6, 1081, 584, 4280, 28027,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 180, 6122, 599, 382, 4416, 5842, 7, 61, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332, 519, 9191, 332, 5411, 1...
Find the name of projects that require between 100 and 300 hours of work.
SELECT name FROM projects WHERE hours BETWEEN 100 AND 300
CREATE TABLE projects (name VARCHAR, hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 716, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 564, 13, 1195, 24, 1457, 344, 910, 11, 3147, 716, 13, 161, 5, 1, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 1195, 549, 17444, 427, 716, 272, 7969, 518, 23394, 910, 3430, 3147, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.
SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax'
CREATE TABLE projects (code VARCHAR, name VARCHAR); CREATE TABLE scientists (name VARCHAR, SSN VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 1195, 41, 4978, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 6, 180, 8544, 584, 4280, 28027, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5787, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332, 519, 9191, 332, 5411, 17819, 343, 3274, 332, 578...
List the names of all scientists sorted in alphabetical order.
SELECT name FROM scientists ORDER BY name
CREATE TABLE scientists (name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 66, 7004, 3, 14504, 16, 20688, 1950, 455, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 21680, 7004, 4674, 11300, 272, 476, 564, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Find the number of scientists involved for each project name.
SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name
CREATE TABLE assignedto (project VARCHAR); CREATE TABLE projects (name VARCHAR, code VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, 61, 3, 32102, 32106, 32107, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 5411, 4350, 21680, 1195, 6157, 332, 536, 3, 15355, 3162, 7604, 235, 6157, 332, 357, 9191, 332, 5411, 4978, 3274, 332, 4416, 23574, 350, 4630, 6880, 272, 476, 332, 5411, 4350, 1, -100,...
Find the number of scientists involved for the projects that require more than 300 hours.
SELECT COUNT(*), T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name
CREATE TABLE assignedto (project VARCHAR); CREATE TABLE projects (name VARCHAR, code VARCHAR, hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 4350, 584, 4280, 28027, 6, 1081, 584, 4280, 28027, 6, 716, 3, 21342, 17966, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 5411, 4350, 21680, 1195, 6157, 332, 536, 3, 15355, 3162, 7604, 235, 6157, 332, 357, 9191, 332, 5411, 4978, 3274, 332, 4416, 23574, 549, 17444, 427, 332, 5411, 5842, 7, 2490, 3147, 350...
Find the number of projects which each scientist is working on and scientist's name.
SELECT COUNT(*), T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name
CREATE TABLE scientists (name VARCHAR, ssn VARCHAR); CREATE TABLE assignedto (scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 6, 3, 7, 7, 29, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 17819, 343, 584, 4280, 28027, 61, 3, 32102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 332, 5411, 4350, 21680, 7004, 6157, 332, 536, 3, 15355, 3162, 7604, 235, 6157, 332, 357, 9191, 332, 5411, 7, 7, 29, 3274, 332, 4416, 17819, 343, 350, 4630, 6880, 272, 476, 332, 5411, 435...
Find the SSN and name of scientists who are assigned to the project with the longest hours.
SELECT T3.ssn, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects)
CREATE TABLE scientists (ssn VARCHAR, name VARCHAR, SSN VARCHAR); CREATE TABLE projects (code VARCHAR, hours INTEGER); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR); CREATE TABLE projects (hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 7, 7, 29, 584, 4280, 28027, 6, 564, 584, 4280, 28027, 6, 180, 8544, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 1195, 41, 4978, 584, 4280, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5787, 7, 7, 29, 6, 332, 5787, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332, 519, 9191, 332, 5411, ...
Find the name of scientists who are assigned to some project.
SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn
CREATE TABLE assignedto (scientist VARCHAR); CREATE TABLE scientists (name VARCHAR, ssn VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 17819, 343, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 6, 3, 7, 7, 29, 584, 4280, 28027, 61, 3, 32102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 332, 4416, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 7004, 6157, 332, 357, 9191, 332, 5411, 17819, 343, 3274, 332, 4416, 7, 7, 29, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Select the project names which are not assigned yet.
SELECT Name FROM Projects WHERE NOT Code IN (SELECT Project FROM AssignedTo)
CREATE TABLE Projects (Name VARCHAR, Code VARCHAR, Project VARCHAR); CREATE TABLE AssignedTo (Name VARCHAR, Code VARCHAR, Project VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23954, 584, 4280, 28027, 6, 3636, 584, 4280, 28027, 6, 2786, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 282, 15532, 3696, 41, 23954, 584, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 5570, 21680, 2786, 7, 549, 17444, 427, 4486, 3636, 3388, 41, 23143, 14196, 2786, 21680, 282, 15532, 3696, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Find the name of scientists who are not assigned to any project.
SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)
CREATE TABLE scientists (Name VARCHAR, ssn VARCHAR, scientist VARCHAR); CREATE TABLE AssignedTo (Name VARCHAR, ssn VARCHAR, scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 23954, 584, 4280, 28027, 6, 3, 7, 7, 29, 584, 4280, 28027, 6, 17901, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 282, 15532, 3696, 41, 23954, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 5570, 21680, 7004, 549, 17444, 427, 4486, 3, 7, 7, 29, 3388, 41, 23143, 14196, 17901, 21680, 282, 15532, 3696, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Find the number of scientists who are not assigned to any project.
SELECT COUNT(*) FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)
CREATE TABLE AssignedTo (ssn VARCHAR, scientist VARCHAR); CREATE TABLE scientists (ssn VARCHAR, scientist VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 282, 15532, 3696, 41, 7, 7, 29, 584, 4280, 28027, 6, 17901, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7004, 41, 7, 7, 29, 584, 4280, 28027, 6, 17901,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 7004, 549, 17444, 427, 4486, 3, 7, 7, 29, 3388, 41, 23143, 14196, 17901, 21680, 282, 15532, 3696, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Find the names of scientists who are not working on the project with the highest hours.
SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MAX(hours) FROM projects)
CREATE TABLE scientists (name VARCHAR, SSN VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR); CREATE TABLE projects (code VARCHAR, hours INTEGER); CREATE TABLE scientists (name VARCHAR, hours INTEGER); CREATE TABLE projects (name VARCHAR, hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 6, 180, 8544, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 6, 17901, 584, 4280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 564, 21680, 7004, 262, 4, 30416, 3, 23143, 14196, 332, 5787, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332...
List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.
SELECT T1.Name, T3.Name, T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name, T1.Name
CREATE TABLE AssignedTo (Scientist VARCHAR, Project VARCHAR); CREATE TABLE Projects (Name VARCHAR, Hours VARCHAR, Code VARCHAR); CREATE TABLE Scientists (Name VARCHAR, SSN VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 282, 15532, 3696, 41, 134, 75, 4741, 343, 584, 4280, 28027, 6, 2786, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 2786, 7, 41, 23954, 584, 4280, 28027, 6,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 23954, 6, 332, 5787, 23954, 6, 332, 5787, 4489, 3589, 21680, 21166, 7, 6157, 332, 536, 3, 15355, 3162, 282, 15532, 3696, 6157, 332, 357, 9191, 332, 5411, 134, 8544, 3274, 332, 4416, 134, 75, 4741, 343, 3,...
Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.
SELECT T2.name, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MIN(hours) FROM projects)
CREATE TABLE scientists (name VARCHAR, SSN VARCHAR); CREATE TABLE assignedto (project VARCHAR, scientist VARCHAR); CREATE TABLE projects (name VARCHAR, code VARCHAR, hours INTEGER); CREATE TABLE projects (hours INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 7004, 41, 4350, 584, 4280, 28027, 6, 180, 8544, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 7604, 235, 41, 23574, 584, 4280, 28027, 6, 17901, 584, 4280, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 4350, 6, 332, 5787, 4350, 21680, 7604, 235, 6157, 332, 536, 3, 15355, 3162, 1195, 6157, 332, 357, 9191, 332, 5411, 23574, 3274, 332, 4416, 4978, 3, 15355, 3162, 7004, 6157, 332, 519, 9191, 332, 5411, 17819,...
What is the name of the highest rated wine?
SELECT Name FROM WINE ORDER BY Score LIMIT 1
CREATE TABLE WINE (Name VARCHAR, Score VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 17763, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 19, 8, 564, 13, 8, 2030, 3, 4094, 2013, 58, 1, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 549, 9730, 4674, 11300, 272, 476, 17763, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Which winery is the wine that has the highest score from?
SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1
CREATE TABLE WINE (Winery VARCHAR, SCORE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 18455, 4203, 584, 4280, 28027, 6, 6508, 20888, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 4073, 2013, 651, 19, 8, 2013, 24, 65, 8, 2030, 2604, 45, 58, 1, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9426, 651, 21680, 549, 9730, 4674, 11300, 272, 476, 6508, 20888, 8729, 12604, 209, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the names of all wines produced in 2008.
SELECT Name FROM WINE WHERE YEAR = "2008"
CREATE TABLE WINE (Name VARCHAR, YEAR VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 30431, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 3056, 13, 66, 10992, 2546, 16, 10986, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 549, 9730, 549, 17444, 427, 30431, 3274, 96, 16128, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
List the grapes and appelations of all wines.
SELECT Grape, Appelation FROM WINE
CREATE TABLE WINE (Grape VARCHAR, Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 6, 3, 27794, 257, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 11457, 7, 11, 8319, 1628, 13, 66, 10992, 5, 1, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 29083, 6, 3, 27794, 257, 21680, 549, 9730, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
List the names and scores of all wines.
SELECT Name, Score FROM WINE
CREATE TABLE WINE (Name VARCHAR, Score VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 17763, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 11, 7586, 13, 66, 10992, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 6, 17763, 21680, 549, 9730, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
List the area and county of all appelations.
SELECT Area, County FROM APPELLATIONS
CREATE TABLE APPELLATIONS (Area VARCHAR, County VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 188, 864, 584, 4280, 28027, 6, 1334, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 616, 11, 5435, 13, 66, 8319, 1628, 5, 1, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5690, 6, 1334, 21680, 3, 13747, 12735, 8015, 134, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
What are the prices of wines produced before the year of 2010?
SELECT Price FROM WINE WHERE YEAR < 2010
CREATE TABLE WINE (Price VARCHAR, YEAR INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 345, 4920, 584, 4280, 28027, 6, 30431, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 1596, 13, 10992, 2546, 274, 8, 215, 13, 2735, 58, 1, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5312, 21680, 549, 9730, 549, 17444, 427, 30431, 3, 2, 2735, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
List the names of all distinct wines that have scores higher than 90.
SELECT Name FROM WINE WHERE score > 90
CREATE TABLE WINE (Name VARCHAR, score INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 2604, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 66, 6746, 10992, 24, 43, 7586, 1146, 145, 2777, 5, 1, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 549, 9730, 549, 17444, 427, 2604, 2490, 2777, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
List the names of all distinct wines that are made of red color grape.
SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red"
CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Name VARCHAR, Grape VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 23194, 5668, 134, 41, 4744, 855, 584, 4280, 28027, 6, 6088, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 29083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 4416, 23954, 21680, 23194, 5668, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 4744, 855, 3274, 332, 4416, 4744, 855, 549, 17444, 427, 332, 5411, 3881, 32...
Find the names of all distinct wines that have appellations in North Coast area.
SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast"
CREATE TABLE APPELLATIONs (Appelation VARCHAR, Area VARCHAR); CREATE TABLE WINE (Name VARCHAR, Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 7, 41, 27794, 257, 584, 4280, 28027, 6, 5690, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 4416, 23954, 21680, 3, 13747, 12735, 8015, 7, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 549, 17444, 427, 332, 5411...
How many wines are produced at Robert Biale winery?
SELECT COUNT(*) FROM WINE WHERE Winery = "Robert Biale"
CREATE TABLE WINE (Winery VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 18455, 4203, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 10992, 33, 2546, 44, 2715, 2106, 9, 109, 2013, 651, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 549, 9730, 549, 17444, 427, 9426, 651, 3274, 96, 24372, 49, 17, 2106, 9, 109, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
How many appelations are in Napa Country?
SELECT COUNT(*) FROM APPELLATIONS WHERE County = "Napa"
CREATE TABLE APPELLATIONS (County VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 10628, 63, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 8319, 1628, 33, 16, 445, 9750, 6993, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 3, 13747, 12735, 8015, 134, 549, 17444, 427, 1334, 3274, 96, 567, 9750, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Give me the average prices of wines that are produced by appelations in Sonoma County.
SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma"
CREATE TABLE WINE (Price INTEGER, Appelation VARCHAR); CREATE TABLE APPELLATIONS (Appelation VARCHAR, County VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 345, 4920, 3, 21342, 17966, 6, 3, 27794, 257, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 27794, 257, 584,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 382, 4416, 345, 4920, 61, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 549, 17444, 427, 332, ...
What are the names and scores of wines that are made of white color grapes?
SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White"
CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Name VARCHAR, Score VARCHAR, Grape VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 23194, 5668, 134, 41, 4744, 855, 584, 4280, 28027, 6, 6088, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 17763, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 23954, 6, 332, 4416, 134, 9022, 21680, 23194, 5668, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 4744, 855, 3274, 332, 4416, 4744, 855, 549, 17444, 427, 332, 5411, 3881, ...
Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.
SELECT MAX(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005
CREATE TABLE APPELLATIONS (Appelation VARCHAR, Area VARCHAR); CREATE TABLE WINE (Price INTEGER, Appelation VARCHAR, year VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 27794, 257, 584, 4280, 28027, 6, 5690, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 345, 4920, 3, 21342, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 4800, 4, 599, 382, 4416, 345, 4920, 61, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 549, 17444, 427, 332, 5...
Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90
CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Grape VARCHAR, score VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 23194, 5668, 134, 41, 4744, 855, 584, 4280, 28027, 6, 6088, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 6, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 332, 5411, 4744, 855, 21680, 23194, 5668, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 4744, 855, 3274, 332, 4416, 4744, 855, 549, 17444, 427, 332, 5411, 3881...
What are the wines that have prices higher than 50 and made of Red color grapes?
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50
CREATE TABLE WINE (Name VARCHAR, Grape VARCHAR, price VARCHAR); CREATE TABLE Grapes (Grape VARCHAR, Color VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 29083, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 29083, 7, 41, 4744, 855, 584, 428...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 23954, 21680, 29083, 7, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 4744, 855, 3274, 332, 4416, 4744, 855, 549, 17444, 427, 332, 5411, 3881, 322, 3274, 96, 1649, 26, 121, 3...
What are the wines that have prices lower than 50 and have appelations in Monterey county?
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50
CREATE TABLE APPELLATIONS (Appelation VARCHAR, County VARCHAR); CREATE TABLE WINE (Name VARCHAR, Appelation VARCHAR, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 27794, 257, 584, 4280, 28027, 6, 1334, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 23954, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 549, 17444, 427, 332, 5411, 10628, 63, 3274, 96...
What are the numbers of wines for different grapes?
SELECT COUNT(*), Grape FROM WINE GROUP BY Grape
CREATE TABLE WINE (Grape VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2302, 13, 10992, 21, 315, 11457, 7, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 201, 29083, 21680, 549, 9730, 350, 4630, 6880, 272, 476, 29083, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
What are the average prices of wines for different years?
SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR
CREATE TABLE WINE (YEAR VARCHAR, Price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 476, 19356, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 1348, 1596, 13, 10992, 21, 315, 203, 58, 1, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 345, 4920, 201, 30431, 21680, 549, 9730, 350, 4630, 6880, 272, 476, 30431, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.
SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = "John Anthony")
CREATE TABLE wine (Name VARCHAR, Price INTEGER, Winery VARCHAR); CREATE TABLE WINE (Name VARCHAR, Price INTEGER, Winery VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2013, 41, 23954, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 6, 9426, 651, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 5570, 21680, 549, 9730, 549, 17444, 427, 5312, 2490, 41, 23143, 14196, 3, 17684, 599, 345, 4920, 61, 21680, 2013, 549, 17444, 427, 9426, 651, 3274, 96, 18300, 11016, 8512, 1, -100, -100, -100, -...
List the names of all distinct wines in alphabetical order.
SELECT DISTINCT Name FROM WINE ORDER BY Name
CREATE TABLE WINE (Name VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 66, 6746, 10992, 16, 20688, 1950, 455, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 5570, 21680, 549, 9730, 4674, 11300, 272, 476, 5570, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
List the names of all distinct wines ordered by price.
SELECT DISTINCT Name FROM WINE ORDER BY price
CREATE TABLE WINE (Name VARCHAR, price VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 594, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 3056, 13, 66, 6746, 10992, 5563, 57, 594, 5, 1, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 5570, 21680, 549, 9730, 4674, 11300, 272, 476, 594, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
What is the area of the appelation that produces the highest number of wines before the year of 2010?
SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE WINE (Appelation VARCHAR, year VARCHAR); CREATE TABLE APPELLATIONS (Area VARCHAR, Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 27794, 257, 584, 4280, 28027, 6, 215, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 188, 864, 584, 4280, 280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 188, 864, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 350, 4630, 6880, 272, 476, 332, 4416, 27794,...
What is the color of the grape whose wine products has the highest average price?
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1
CREATE TABLE GRAPES (Color VARCHAR, Grape VARCHAR); CREATE TABLE WINE (Grape VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 23194, 5668, 134, 41, 3881, 322, 584, 4280, 28027, 6, 29083, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 61, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 3881, 322, 21680, 23194, 5668, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 4744, 855, 3274, 332, 4416, 4744, 855, 350, 4630, 6880, 272, 476, 332, 4416, 4744, 855, 4674, ...
Find the distinct names of wines produced before the year of 2000 or after the year of 2010.
SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010
CREATE TABLE WINE (Name VARCHAR, YEAR VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 30431, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 6746, 3056, 13, 10992, 2546, 274, 8, 215, 13, 2766, 42, 227, 8, 215, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 5570, 21680, 549, 9730, 549, 17444, 427, 30431, 3, 2, 2766, 4674, 30431, 2490, 2735, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Find the distinct winery of wines having price between 50 and 100.
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
CREATE TABLE WINE (Winery VARCHAR, Price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 18455, 4203, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 6746, 2013, 651, 13, 10992, 578, 594, 344, 943, 11, 910, 5, 1, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 9426, 651, 21680, 549, 9730, 549, 17444, 427, 5312, 272, 7969, 518, 23394, 943, 3430, 910, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?
SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel"
CREATE TABLE WINE (Price INTEGER, Cases INTEGER, YEAR VARCHAR, Grape VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 345, 4920, 3, 21342, 17966, 6, 6320, 7, 3, 21342, 17966, 6, 30431, 584, 4280, 28027, 6, 29083, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 1348, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 3, 23143, 14196, 71, 17217, 599, 345, 4920, 201, 71, 17217, 599, 254, 9, 2260, 61, 21680, 549, 9730, 549, 17444, 427, 30431, 3274, 2464, 3430, 29083, 3274, 96, 956, 77, 89, 9, 8893, 121, 1, -100, -100, -100, -100, -100, -100, -100, ...
What are the maximum price and score of wines produced by St. Helena appelation?
SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = "St. Helena"
CREATE TABLE WINE (Price INTEGER, Score INTEGER, Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 345, 4920, 3, 21342, 17966, 6, 17763, 3, 21342, 17966, 6, 3, 27794, 257, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2411, 594, 11, 2604, 13, 1099...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 345, 4920, 201, 4800, 4, 599, 134, 9022, 61, 21680, 549, 9730, 549, 17444, 427, 3, 27794, 257, 3274, 96, 134, 17, 5, 12249, 9, 121, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
What are the maximum price and score of wines in each year?
SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR
CREATE TABLE WINE (YEAR VARCHAR, Price INTEGER, Score INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 476, 19356, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 6, 17763, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 2411, 594, 11, 2604, 13, 10992, 16, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 345, 4920, 201, 4800, 4, 599, 134, 9022, 201, 30431, 21680, 549, 9730, 350, 4630, 6880, 272, 476, 30431, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What are the average price and score of wines grouped by appelation?
SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation
CREATE TABLE WINE (Appelation VARCHAR, Price INTEGER, Score INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 27794, 257, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 6, 17763, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 1348, 594, 11, 2604, 13, 10992, 3, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 345, 4920, 201, 71, 17217, 599, 134, 9022, 201, 3, 27794, 257, 21680, 549, 9730, 350, 4630, 6880, 272, 476, 3, 27794, 257, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the wineries that have at least four wines.
SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4
CREATE TABLE WINE (Winery VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 18455, 4203, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 2588, 8, 2013, 2593, 24, 43, 44, 709, 662, 10992, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 9426, 651, 21680, 549, 9730, 350, 4630, 6880, 272, 476, 9426, 651, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 2423, 314, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Find the country of all appelations who have at most three wines.
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3
CREATE TABLE APPELLATIONS (County VARCHAR, Appelation VARCHAR); CREATE TABLE WINE (Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 10628, 63, 584, 4280, 28027, 6, 3, 27794, 257, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 27794, 257, 584...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10628, 63, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 350, 4630, 6880, 272, 476, 332, 4416, 27794...
What are the names of wines whose production year are before the year of all wines by Brander winery?
SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = "Brander")
CREATE TABLE WINE (Name VARCHAR, YEAR INTEGER, Winery VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 30431, 3, 21342, 17966, 6, 9426, 651, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 10992, 3, 2544, 999, 215, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 549, 9730, 549, 17444, 427, 30431, 3, 2, 41, 23143, 14196, 3, 17684, 599, 476, 19356, 61, 21680, 549, 9730, 549, 17444, 427, 9426, 651, 3274, 96, 279, 52, 11849, 8512, 1, -100, -100, -100, -100, -100, -...
What are the names of wines that are more expensive then all wines made in the year 2006?
SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)
CREATE TABLE WINE (Name VARCHAR, Price INTEGER, YEAR VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 23954, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 6, 30431, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 8, 3056, 13, 10992, 24, 33, 72, 2881, 258, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 5570, 21680, 549, 9730, 549, 17444, 427, 5312, 2490, 41, 23143, 14196, 4800, 4, 599, 345, 4920, 61, 21680, 549, 9730, 549, 17444, 427, 30431, 3274, 3581, 61, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Find the top 3 wineries with the greatest number of wines made of white color grapes.
SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY COUNT(*) DESC LIMIT 3
CREATE TABLE GRAPES (GRAPE VARCHAR, Color VARCHAR); CREATE TABLE WINE (Winery VARCHAR, GRAPE VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 23194, 5668, 134, 41, 8727, 188, 5668, 584, 4280, 28027, 6, 6088, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 18455, 4203, 584, 4280, 28027,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 4416, 18455, 4203, 21680, 23194, 5668, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 8727, 188, 5668, 3274, 332, 4416, 8727, 188, 5668, 549, 17444, 427, 332, 5411, 3881, 322, 32...
List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.
SELECT Grape, Winery, YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR
CREATE TABLE WINE (Grape VARCHAR, Winery VARCHAR, YEAR VARCHAR, Price INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 6, 9426, 651, 584, 4280, 28027, 6, 30431, 584, 4280, 28027, 6, 5312, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 11457, 6, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 3, 23143, 14196, 29083, 6, 9426, 651, 6, 30431, 21680, 549, 9730, 549, 17444, 427, 5312, 2490, 910, 4674, 11300, 272, 476, 30431, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.
SELECT Grape, Appelation, Name FROM WINE WHERE Score > 93 ORDER BY Name
CREATE TABLE WINE (Grape VARCHAR, Appelation VARCHAR, Name VARCHAR, Score INTEGER)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 4744, 855, 584, 4280, 28027, 6, 3, 27794, 257, 584, 4280, 28027, 6, 5570, 584, 4280, 28027, 6, 17763, 3, 21342, 17966, 61, 3, 32105, 32106, 32107, 32106, 6792, 8, 11457,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 3, 23143, 14196, 29083, 6, 3, 27794, 257, 6, 5570, 21680, 549, 9730, 549, 17444, 427, 17763, 2490, 3, 4271, 4674, 11300, 272, 476, 5570, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Find the appelations that produce wines after the year of 2008 but not in Central Coast area.
SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast"
CREATE TABLE WINE (Appelation VARCHAR, YEAR INTEGER, Area VARCHAR); CREATE TABLE APPELLATIONS (Appelation VARCHAR, YEAR INTEGER, Area VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 27794, 257, 584, 4280, 28027, 6, 30431, 3, 21342, 17966, 6, 5690, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 3, 27794, 257, 21680, 549, 9730, 549, 17444, 427, 30431, 2490, 2628, 262, 4, 30416, 3, 23143, 14196, 3, 27794, 257, 21680, 3, 13747, 12735, 8015, 134, 549, 17444, 427, 5690, 3274, 96, 30497, 5458, 121, 1, -100, -100, ...
Find the average price of wines that are not produced from Sonoma county.
SELECT AVG(price) FROM wine WHERE NOT Appelation IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma')
CREATE TABLE wine (price INTEGER, Appelation VARCHAR); CREATE TABLE APPELLATIONS (Appelation VARCHAR, County VARCHAR); CREATE TABLE WINE (Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2013, 41, 102, 4920, 3, 21342, 17966, 6, 3, 27794, 257, 584, 4280, 28027, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 27794, 257, 584, 4280...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 71, 17217, 599, 102, 4920, 61, 21680, 2013, 549, 17444, 427, 4486, 3, 27794, 257, 3388, 41, 23143, 14196, 332, 5411, 27794, 257, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332,...
Find the county where produces the most number of wines with score higher than 90.
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE WINE (Appelation VARCHAR, Score INTEGER); CREATE TABLE APPELLATIONS (County VARCHAR, Appelation VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 549, 9730, 41, 27794, 257, 584, 4280, 28027, 6, 17763, 3, 21342, 17966, 61, 3, 32105, 32106, 32102, 205, 4386, 6048, 332, 17098, 3, 13747, 12735, 8015, 134, 41, 10628, 63, 584, 4280, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 3, 23143, 14196, 332, 5411, 10628, 63, 21680, 3, 13747, 12735, 8015, 134, 6157, 332, 536, 3, 15355, 3162, 549, 9730, 6157, 332, 357, 9191, 332, 5411, 27794, 257, 3274, 332, 4416, 27794, 257, 549, 17444, 427, 332, 4416, 134, 9022, 2490...
How many train stations are there?
SELECT COUNT(*) FROM station
CREATE TABLE station (Id VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2478, 41, 196, 26, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 571, 186, 2412, 6991, 33, 132, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 2847, 17161, 599, 1935, 61, 21680, 2478, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Show the name, location, and number of platforms for all stations.
SELECT name, LOCATION, number_of_platforms FROM station
CREATE TABLE station (name VARCHAR, LOCATION VARCHAR, number_of_platforms VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2478, 41, 4350, 584, 4280, 28027, 6, 301, 5618, 8015, 584, 4280, 28027, 6, 381, 834, 858, 834, 29100, 7, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 3111, 8, 564, 6, 1128, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 564, 6, 301, 5618, 8015, 6, 381, 834, 858, 834, 29100, 7, 21680, 2478, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
What are all locations of train stations?
SELECT DISTINCT LOCATION FROM station
CREATE TABLE station (LOCATION VARCHAR)
[ 32100, 32106, 32105, 205, 4386, 6048, 332, 17098, 2478, 41, 5017, 254, 8015, 584, 4280, 28027, 61, 3, 32105, 32106, 32107, 32106, 363, 33, 66, 3248, 13, 2412, 6991, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 301, 5618, 8015, 21680, 2478, 1, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...