db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
image_and_language | List all the object classes in image 10. | object classes refer to OBJ_CLASS; image 10 refers to IMG_ID = 10; | SELECT DISTINCT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 10 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | How many customers are in Brazil? | Brazil is the name of the nation which refers to n_name = 'BRAZIL' | SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'BRAZIL' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Compare the numbers of postal points under Smith Adrian and Heck Joe. | COUNT(zip_code where first_name = 'Smith' and last_name = 'Adrian') > COUNT(zip_code where first_name = 'Heck' and last_name = 'Joe'); | SELECT CASE WHEN COUNT(CASE WHEN T1.first_name = 'Smith' AND T1.last_name = 'Adrian' THEN T2.zip_code ELSE NULL END) > COUNT(CASE WHEN T1.first_name = 'Heck' AND T1.last_name = 'Joe' THEN T2.zip_code ELSE NULL END) THEN 'Smith Adrian>Heck Joe' ELSE 'Smith Adrian<=Heck Joe' END AS COMPARE FROM congress AS T1 INNER JOIN ... | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the url for repository that has the longest processed time solution? | Url for repository refers to Url; longest processed toe trefers to MAX(ProcessedTime); | SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Solution ) | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | List all the IDs of images that have objects with the attributes of 'wired'. | IDs of images refer to IMG_ID; objects with the attributes of 'wired' refer to ATT_CLASS = 'wired'; | SELECT DISTINCT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'wired' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Among the orders made by customers in the household segment, how many of them are urgent? | orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; the order is urgent if o_orderpriority = '1-URGENT' ; | SELECT COUNT(T1.o_orderpriority) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' AND T1.o_orderpriority = '1-URGENT' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | How many states are in the central time zone? Write their full names. | central time zone refers to time_zone = 'Central' | SELECT SUM(CASE WHEN T1.time_zone = 'Central' THEN 1 ELSE 0 END) AS count FROM zip_data AS T1 INNER JOIN state AS T2 ON T2.abbreviation = T1.state WHERE T1.time_zone = 'Central' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the repository id of the method with tokenized name "crc parameters get hash code"? | repository id refers to RepoId; tokenized name refers to NameTokenized; NameTokenized = 'crc parameters get hash code'; | SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'crc parameters get hash code' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Calculate the average of object samples for the image. | DIVIDE(COUNT(OBJ_SAMPLE_ID), COUNT(IMG_ID)); | SELECT CAST(COUNT(OBJ_SAMPLE_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Please list the order keys of all the orders made by a customer whose account is in debt. | account is in debt if c_acctbal < 0; | SELECT T1.o_orderkey FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_acctbal < 0 | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
codebase_comments | Please provide the id of the respository that the most people like. | repository that the most people like refers to MAX(Stars); | SELECT Id FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo ) | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the ratio between the number of object samples in image 1 and the number of object samples in image 6? | DIVIDE(SUM(OBJ_SAMPLE_ID where IMG_ID = 1), SUM(OBJ_SAMPLE_ID where IMG_ID = 6)); | SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Please give the name of the customer who has made the single order with the highest total price. | name of the customer refers to c_name; single order with the highest total price refers to MAX(o_totalprice) LIMIT 1; | SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey ORDER BY T1.o_totalprice DESC LIMIT 1 | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Among the daylight savings areas in the Midwest region, how many postal points are there in Illinois? | postal points refer to zip_code; the daylight savings areas refer to daylight_savings = 'Yes'; Illinois is the name of the state, in which name = 'Illinois'; | SELECT COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Illinois' AND T2.daylight_savings = 'Yes' AND T2.region = 'Midwest' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | List all the solutions ids of the repository with "636430969128176000" processed time | solution ids refers to Solution.Id; | SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = 636430969128176000 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Which object has the highest attribute classes? | object has the highest attribute classes refers to OBJ_SAMPLE_ID where MAX(COUNT(OBJ_SAMPLE_ID)); | SELECT OBJ_SAMPLE_ID FROM IMG_OBJ_ATT GROUP BY OBJ_SAMPLE_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Please list the order comments of all the orders made by customers in the household segment. | orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; order comments refer to o_comment; | SELECT T1.o_comment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Give the name of the country and state of the city with elevation of 1039. | elevation of 1039 refers to elevation = 1039 | SELECT DISTINCT T1.name, T2.state FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.elevation = 1039 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the percentage of Forks to Stars of repository for solution "104086"? | solution refers to Solution.Id; Solution.Id = 104086; percentage = MULTIPLY(DIVIDE(Forkk, Stars), 100); | SELECT CAST(T1.Forks AS REAL) * 100 / T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 104086 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Find the object in image 5 where the object with the coordinate of (634, 468). | object in image 5 refers to OBJ_SAMPLE_ID where IMG_ID = 5; coordinates of (634, 468) refer to X and Y coordinates of the bounding box in which X = 634 and Y = 468; | SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 5 AND X = 634 AND Y = 468 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Among all the orders made by a customer in the household segment, what is the highest total price? | orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; the highest total price refers to MAX(o_totalprice); | SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Provide the countries and the zip codes in the Virgin Islands. | the Virgin Islands refer to state where name = 'Virgin Islands'; | SELECT T2.county, T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Virgin Islands' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many more followers in percentage are there for the repository used by solution ID 18 than solution ID19? | followers refers to Forks; percentage = divide(SUBTRACT(Forks(Solution.ID = 18), Forks(Solution.ID = 19)), Forks(Solution.ID = 19))*100% | SELECT CAST((SUM(CASE WHEN T2.Id = 18 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Which object in image 8 is the widest? State its object sample ID. | widest relates to the width of the bounding
box of the object which refers to MAX(W); object in image 8 refers to OBJ_SAMPLE_ID where IMG_ID = 8; | SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 8 ORDER BY W DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | How many orders in total have the customers in the household segment made? | orders in household segment refer to o_orderkey where c_mktsegment = 'HOUSEHOLD'; | SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | List the bad alias of the postal point located in Camuy. | postal points refer to zip_code; Camuy is the city; | SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Camuy' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the number of forks that the repository of the solution 35 have. | solution refers to Solution.Id; Solution.Id = 35; | SELECT T1.Forks FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 35 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Which images have more than 20 object samples? | images have more than 20 object samples refer to IMG_ID where COUNT(OBJ_SAMPLE_ID) > 20; | SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(IMG_ID) > 20 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | What is the phone number of Customer#000000001? | customer phone refers to c_phone; Customer#000000001 refers to c_name; | SELECT c_phone FROM customer WHERE c_name = 'Customer#000000001' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
codebase_comments | List all the solutions of repositories with the Forks higher than half of the watchers. | solutions refers to Solution.Id; forks higher than half of the watchers refers tto Forks>(Watchers/2);; | SELECT DISTINCT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks > T1.Watchers / 2 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Indicating the bounding box of "kitchen" in image id 250. | bounding box refers to X, Y, W, H from IMG_OBJ; "kitchen" in image id 250 refers to OBJ_CLASS = 'kitchen' where IMG_ID = 250; | SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 250 AND T2.OBJ_CLASS = 'kitchen' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | What is the comment of the order with the highest total price? | the highest total price refers to MAX(o_totalprice); comment of the order refers to o_comment; | SELECT o_comment FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders ) | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020. | representative's full names refer to first_name, last_name; area which has highest population in 2020 refers to MAX(population_2020); | SELECT T1.zip_code, T1.city, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id GROUP BY T2.district ORDER BY T1.population_2020 DESC LIMIT 1 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the number of stars that the repository of the solution 20 have. | solution refers to Solution.ID; Solution.Id = 20; | SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 20 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Name the object class of the image with lowest bounding box. | bounding box refers to X, Y, W, H from IMG_OBJ; lowest relates to the height of the bounding box which refers to MIN(H); | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID ORDER BY T1.H LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | Which order has a higher priority, order no. 4 or order no. 36? | earlier orderdate have higher priority in delivery; which order no. 4 or order no. 36 refers to o_orderkey in (4, 36) where MIN(o_orderdate); | SELECT l_orderkey FROM lineitem WHERE l_orderkey IN (4, 36) ORDER BY l_shipdate DESC LIMIT 1 | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Which district has the largest land area in Wisconsin? Write the full name of the congress representative and include the postal codes. | "Wisconsin" is the state; largest land area refers to Max(land_area); full name refers to first_name, last_name; postal code refers to zip_code | SELECT T2.zip_code, T1.first_name, T1.last_name FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'Wisconsin' ORDER BY T1.land_area DESC LIMIT 1 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the solution's path of method "HtmlSharp.HtmlParser.Feed"? | solution's path refers to Path; method refers to Name; Name = 'HtmlSharp.HtmlParser.Feed'; | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'HtmlSharp.HtmlParser.Feed' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Name number of samples of "bed" object are there in the image No.1098? | samples of "bed" object refer to OBJ_SAMPLE_ID where OBJ_CLASS = 'bed'; image No.1098 refers to IMG_ID = 1098; | SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'bed' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1098 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | When was the latest date the items of order no.1 were shipped? | order no.1 refers to l_orderkey = 1; the latest date shipped refers to MAX(l_shipdate); | SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1 | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Among the postal points in the District of Columbia, how many of them have an area with above 20000 black population? | District of Columbia refers to county = 'DISTRICT OF COLUMBIA'; postal points refer to zip_code; area with above 20000 black population refers to black_population > 20000; | SELECT COUNT(T1.zip_code) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'DISTRICT OF COLUMBIA' AND T2.black_population > 20000 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please list the names of methods with the solution path "wallerdev_htmlsharp\HtmlSharp.sln". | name of the methods refers to Name; solution path refers to Path; Path = 'wallerdev_htmlsharp\HtmlSharp.sln'; | SELECT T2.Name FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'wallerdev_htmlsharpHtmlSharp.sln' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many samples of animal objects are there in image no.660? | samples of animal objects refer to OBJ_SAMPLE_ID where OBJ_CLASS = 'animal'; image no.660 refers to IMG_ID = 660; | SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'animal' AND T1.IMG_ID = 660 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retails | How many kinds of items are returned in order no.5? | returned refer to l_returnflag = 'R'; order no.5 refers to l_orderkey = 5; kinds of items refer to l_linenumber; | SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R' | CREATE TABLE partsupp
(
ps_supplycost REAL not null, --
foreign key (ps_suppkey) references supplier (s_suppkey) on update cascade on delete cascade,
ps_comment TEXT null, --
ps_availqty INTEGER null, --
ps_suppkey INTEGER not null, --
ps_partkey INTEGER not null, --
primary key (ps_partkey, ps_suppkey... |
address | Among the cities belonging to the country named Arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020. | DIVIDE(SUBTRACT(SUM(population_2020)), SUM(population_2010)), SUM(population_2010) as percentage where county = 'ARROYO'; | SELECT CAST((SUM(T2.population_2020) - SUM(T2.population_2010)) AS REAL) * 100 / SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arroyo' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the id of the solution whose repository has the most watchers. | id of the solution refers to Solution.Id; repository has the most watchers refers to MAX(Watchers); | SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Watchers = ( SELECT MAX(Watchers) FROM Repo ) | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Calculate the percentage of "airplane" object class in the table. | DIVIDE(SUM(OBJ_SAMPLE_ID where OBJ_CLASS = 'airplane'), COUNT(OBJ_CLASS)) as percentage; | SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'airplane' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OBJ_CLASS) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | List out the phone number of the shipping company of order id 10296. | shipping company refers to Shippers; phone number refers to Phone | SELECT T2.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Among the postal points in Texas, provide the zip codes and cities of postal points which have total beneficiaries of above 10000. | Texas is the name of the state, in which name = 'Texas'; total beneficiaries of above 10000 refer to total_beneficiaries > 10000; | SELECT T2.zip_code, T2.city FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Texas' AND T2.total_beneficiaries > 10000 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the percentage of the methods' solutions that need to be compiled among the methods whose comments is XML format? | comment is XML format refers to CommentIsXml = 1; solution needs to be compiled refesr to WasCompiled = 0; percentage = MULTIPLY(DIVIDE(SUM(WasCompiled = 0), COUNT(Solution.Id)), 100); | SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.CommentIsXml = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | State the object class of the image with tallest bounding box. | bounding box refers to X, Y, W, H from IMG_OBJ; tallest relates to the height of the bounding box which refers to MAX(H); object class refers to OBJ_CLASS; | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID ORDER BY T1.H DESC LIMIT 1 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many orders have been shipped through United Package? | shipped through refers to ShipVia; United Package refers to CompanyName = 'United Package' | SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
codebase_comments | What is the processed time to download the repository whose files are contained in the solution with the path "jeffdik_tachy\src\Tachy.sln". | null | SELECT DISTINCT T2.ProcessedTime FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Path = 'jeffdik_tachysrcTachy.sln' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many images include the "wood" objects? | images refer to IMG_ID; "wood" objects refer to OBJ_CLASS = 'wood'; | SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'wood' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | State the shipping company of order id 10260. | shipping company refers to CompanyName | SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | What is the CBSA name and type in York, ME? | "York" is the city; 'ME' is the state; type refers to CBSA_type | SELECT T1.CBSA_name, T1.CBSA_type FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'York' AND T2.state = 'ME' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the url of solution 1? | solution refers to Solution.Id; Solution.Id = 1; | SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the percentage of "surface" object samples in image No.2654? | DIVIDE(SUM(OBJ_CLASS_ID where OBJ_CLASS = 'surface'), COUNT(OBJ_CLASS_ID)) as percentage where IMG_ID = 2654; | SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'surface' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 2654 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Give the full name of employee who handled the order id 10280. | full name refers to FirstName, LastName | SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Give at least five alias of cities with a postal point of post office. | postal point of post office refers to type = 'Post Office'; | SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.type = 'Post Office' LIMIT 5 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many methods does solution 1 have? And please tell me if solution 1 needs to be compiled. | method refers to Name; solution refers to Solution.Id; Solution.Id = 1; solution needs to be compiled refers to WasCompiled = 0; | SELECT COUNT(T2.SolutionId) , CASE WHEN T1.WasCompiled = 0 THEN 'Needs' ELSE 'NoNeeds' END needToCompile FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SolutionId = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the bounding box of "spoon" in image id 1344? | the bounding box refers to X, Y, W, H from IMG_OBJ; image id 1344 refers to IMG_ID = 1344; "spoon" refers to OBJ_CLASS = 'spoon'; | SELECT T1.X, T1.Y, T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1344 AND T2.OBJ_CLASS = 'spoon' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many orders was handled by employees who reported to employee id 5? | reported to employee id 5 refers to ReportsTo = 5 | SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.ReportsTo = 5 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | What is the difference in the number of cities with P.O. box only and cities with Post Office among the cities with area code 787? | SUBTRACT(COUNT(type = 'P.O. Box Only'), COUNT(type = 'Post Office')) where area_code = 787; | SELECT COUNT(CASE WHEN T2.type = 'P.O. Box Only' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.type = 'Post Office' THEN 1 ELSE NULL END) AS DIFFERENCE FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the path of solution of method whose tokenized name is html parser feed. | path of solution refers to Path; method refers to Name; tokenized name refers to NameTokenized; Name = ''html parser feed'; | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'html parser feed' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Which object classes belong to the onion category? | onion category refers to OBJ_CLASS = 'onion'; | SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS = 'onion' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | When was the employee who handled order id 10281 hired? | When was hired refers to HireDate | SELECT T1.HireDate FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10281 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Provide the city where zip code 19019 is located and the alias of that city. | null | SELECT T2.city, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 19019 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What is the percentage of respositories that receive more than 2,000 stars? | stars>2000; percentage = DIVIDE(MULTIPLY(COUNT(Stars>2000), 100), COUNT(Id)); | SELECT CAST(SUM(CASE WHEN Stars > 2000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Stars) FROM Repo | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many samples of clouds are there in the image no.2315533? | samples of clouds refer to IMG_ID where OBJ_CLASS = 'cloud'; image no.2315533 refers to IMG_ID = 2315533; | SELECT SUM(CASE WHEN T1.IMG_ID = 2315533 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'clouds' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Calculate the percentage salary of employees who handled orders shipped in 1996. | shipped in 1996 refers to ShippedDate = 1996; percentage salary = divide(sum(Salary when ShippedDate = 1996), sum(Salary)) as percentage | SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' THEN T1.Salary ELSE 0 END) AS REAL) * 100 / SUM(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Provide the average elevation of the cities with alias Amherst. | AVG(elevation) where alias = 'Amherst'; | SELECT AVG(T2.elevation) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Amherst' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | What the percentage of the english methods among the methods whose comments is XML format? | english methods refers to lang = 'en'; comment is XML format refers to CommentIsXml = 1; | SELECT CAST(SUM(CASE WHEN Lang = 'en' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Name) FROM Method WHERE CommentIsXml = 1 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Count the image numbers that contain the "paint" object. | image numbers that contain the "paint" object refer to IMG_ID where OBJ_CLASS = 'paint'; | SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'paint' | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Among the employees who handled orders to Brazil, who has the highest salary and calculate the average salary of them. | orders to Brazil refers to ShipCountry = 'Brazil'; highest salary refers to max(salary); average salary = AVG(Salary) | SELECT T1.FirstName, T1.LastName, AVG(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry = 'Brazil' GROUP BY T1.FirstName, T1.LastName ORDER BY SUM(T1.Salary) DESC LIMIT 1 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
codebase_comments | What is the repository number for the solution of method "SCore.Poisson.ngtIndex"? | repository number refers to RepoId; method refers to Name; Name = ‘SCore.Poisson.ngtIndex’ | SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'SCore.Poisson.ngtIndex' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | List out the number of object samples in image no.41 which are in the class of "kitchen"? | object samples in the class of "kitchen" refer to OBJ_CLASS_ID where OBJ_CLASS = 'kitchen'; image no.41 refers to IMG_ID = 41 ; | SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'kitchen' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 41 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the region where the customer who placed the order id 10276 located? | null | SELECT T1.Region FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10276 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | What is the country and state of the city named Dalton? | Dalton is the city; | SELECT T2.county FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.city = 'Dalton' GROUP BY T2.county | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | In "maxild_playground\Playground.sln", what is the time of sampling for the method "GitHubRepo.Cli.GitHubClientWrapper.GetReleases"? | the time of sampling refers to SampledAt; 'maxild_playground\Playground.sln' is the path of a solution | SELECT T2.SampledAt FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maxild_playgroundPlayground.sln' AND T2.Name = 'GitHubRepo.Cli.GitHubClientWrapper.GetReleases' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many object samples in image no.908 are in the class of tip? | object samples in the class of "tip" refer to OBJ_CLASS_ID where OBJ_CLASS = 'tip'; image no.5 refers to IMG_ID = 5; | SELECT SUM(CASE WHEN T2.OBJ_CLASS = 'tip' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 908 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Give the phone number of the customer who placed the order id 10264. | null | SELECT T1.Phone FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10264 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
codebase_comments | Among the english methods,please list the tokenized names of methods whose solutions need to be compiled. | english methods refers to lang = 'en'; tokenized name refers to NameTokenized; methods refers to Name; solution needs to be compiled refers to WasCompiled = 0; | SELECT NameTokenized FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE Lang = 'en' AND WasCompiled = 0 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Indicate the bounding box of the image 8. | bounding box refers to X, Y, W, H from IMG_OBJ; image 8 refers to IMG_ID = 8; | SELECT X, Y, W, H FROM IMG_OBJ WHERE IMG_ID = 8 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the title of the employee who handled order id 10270? | null | SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Name both the alias and the bad alias of zip code 38015. | null | SELECT T1.alias, T2.bad_alias FROM alias AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 38015 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the id of the respository that received the most forks among the respositories that receive 21 stars. | repository that received the most forks refers to MAX(Forks); | SELECT Id FROM Repo WHERE Stars = 21 AND Forks = ( SELECT MAX(Forks) FROM Repo WHERE Stars = 21 ) | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | What is the caption for the prediction class id 12? | caption for the prediction class id 12 refers to PRED_CLASS where PRED_CLASS_ID = 12; | SELECT PRED_CLASS FROM PRED_CLASSES WHERE PRED_CLASS_ID = 12 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | What is the country location of the employee who handled order id 10257? | null | SELECT T1.Country FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | What are the alias of the cities with 0 population in 2010? | with 0 population in 2010 refers to population_2010 = 0; | SELECT DISTINCT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 = 0 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the path of solution of method whose full comment is Feeds data into the parser. | path of solution refers to Path; method refers to name; full comment = 'Feeds data into the parser'; | SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.FullComment = 'Feeds data into the parser' | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | Name the object class of the image with a bounding (422, 63, 77, 363). | image with a bounding (422, 63, 77, 363) refers to OBJ_CLASS_ID where X = 422 and Y = 63 and W = 77 and H = 363; | SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 422 AND T1.Y = 63 AND T1.W = 77 AND T1.H = 363 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | How many orders that the employees who are located in Tacoma handled? | located in Tacoma refers to City = 'Tacoma' | SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'Tacoma' | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | What is the name of the state with the most counties? | the most counties refer to MAX(COUNT(county)); | SELECT T1.name FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state GROUP BY T2.state ORDER BY COUNT(T2.county) DESC LIMIT 1 | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | Please provide the solution id of the respository among the respository that receive 238 forks. | solution id of the repository refers to solution.Id; | SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 238 | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | State the explanation about object class 10. | explanation about object class 10 refers to OBJ_CLASS where OBJ_CLASS_ID = 10; | SELECT OBJ_CLASS FROM OBJ_CLASSES WHERE OBJ_CLASS_ID = 10 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
retail_world | Mention the first name of employee who took care the order id 10250. | null | SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10250 | CREATE TABLE Products
(
CategoryID INTEGER, -- Example Values: `1`, `2`, `7`, `6`, `8` | Value Statics: Total count 77 - Distinct count 8 - Null count 0
Unit TEXT, --
ReorderLevel INT, --
ProductName TEXT, --
Price REAL DEFAULT 0, --
FOREIGN KEY (SupplierID) REFERENCES Suppliers (SupplierID),
Supplier... |
address | Among the cities with area code 608, how many cities implement daylight savings? | implement daylight savings refers to daylight_savings = 'Yes'; | SELECT COUNT(T2.city) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 608 AND T2.daylight_savings = 'Yes' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
codebase_comments | How many more stars in percentage are there for the repository of solution "1" than solution "2"? | solution refers to Solution.Id; Solution.Id = 1 OR 2; percentage = DIVIDE(MULTIPLY(SUBTRACT(SUM(Solution.Id = 1), SUM(Solution.Id = 2)), 100)), SUM(Solution.Id = 2); | SELECT CAST(SUM(CASE WHEN T2.Id = 1 THEN T1.Stars ELSE 0 END) - SUM(CASE WHEN T2.Id = 2 THEN T1.Stars ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 2 THEN T1.Stars ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId | CREATE TABLE Method
(
ApiCalls TEXT, --
NameTokenized TEXT, --
Name TEXT, --
SolutionId INTEGER, --
CommentIsXml INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0
SampledAt INTEGER, --
Id INTEGER not null primary key autoincrement,
Lang TEXT,... |
image_and_language | How many attribute classes are there for image id 5? | attribute classes refer to ATT_CLASS_ID; image id 5 refers to IMG_ID = 5; | SELECT COUNT(ATT_CLASS_ID) FROM IMG_OBJ_ATT WHERE IMG_ID = 5 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.