db_id
stringclasses
66 values
question
stringlengths
24
325
evidence
stringlengths
1
673
gold_query
stringlengths
23
804
db_schema
stringclasses
66 values
retails
What are the top 2 order keys of the item with the highest amount of extended price?
the highest amount of extended price refers to MAX(l_extendedprice);
SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2
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 zip codes are under Barre, VT?
"Barre, VT" is the CBSA_name
SELECT COUNT(T2.zip_code) FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Barre, VT'
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 github address of the repository that contains files used by solution ID12?
github address refers to Url;
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 12
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 ratio of the total number of images with an object class of "man" and "person".
DIVIDE(COUNT(IMG_ID where OBJ_CLASS = 'man'), COUNT(IMG_ID where OBJ_CLASS = 'person'));
SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' 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
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 the automobile market segment?
automobile market segment refers to c_mktsegment = 'AUTOMOBILE';
SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE'
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
Give the number of solutions that the repository which has 3060 Stars contains.
solutions refers to Solution.Id; repository refers to Repository.Id;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 3060
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 number of images with an attribute class of "keyboard".
AVG(IMG_ID) where OBJ_CLASS = 'keyboard';
SELECT AVG(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 = 'keyboard'
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 items that were shipped via air were returned in 1994?
items refer to l_linenumber; shipped via air in 1994 refers to year(l_shipdate) = 1994 where l_shipmode = 'AIR'; returned refer to l_returnflag = 'R';
SELECT COUNT(l_linenumber) FROM lineitem WHERE l_returnflag = 'R' AND l_shipmode = 'AIR' AND STRFTIME('%Y', l_shipdate) = '1994'
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
Calculate the difference between the 2020 population and the 2010 population for the districts represented by Griffin Tim.
difference = Subtract (population_2020, population_2010)
SELECT T1.population_2020 - T1.population_2010 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 WHERE T3.first_name = 'Griffin' AND T3.last_name = 'Tim'
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
Among the solutions that contain files within the repository needing the longest processed time to download, how many of them doesn't need to be compiled if user wants to implement it?
longest processed time refers to max(Solution.ProcessedTime); needs to be compiled if user wants to implement it refers to WasCompiled = 0;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo ) AND T2.WasCompiled = 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
List all the attribute classes of the images that have a (5,5) coordinate.
attribute classes refer to ATT_CLASS; (5,5) coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 5;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.X = 5 AND T3.Y = 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...
retails
How many customers are in debt?
customers are in debt refer to c_custkey where c_acctbal < 0;
SELECT COUNT(c_custkey) FROM customer WHERE 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...
address
Among the cities with an area code 939, which city has the highest Asian population?
highest asian population refers to Max(asian_population)
SELECT T2.city FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 939 ORDER BY T2.asian_population 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
For the method has the summary of "Refetches the Entity from the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.", what is its solution path?
solution path refers to Path;
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Summary = 'Refetches the Entity FROM the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.'
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 have "picture" as their attribute class and "bear" as their object class?
"picture" as attribute class refers to ATT_CLASS = 'picture'; "bear" as object class refers to OBJ_CLASS = 'bear'; images refer to IMG_ID;
SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'picture' AND T4.OBJ_CLASS = 'bear'
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 were shipped in 1998?
orders refer to l_orderkey; shipped in 1998 refers to year(l_shipdate) = 1998;
SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'
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
Based on the population in 2020, calculate the percentage for the population of Asian in the zip code where the CBSA was Atmore, AL.
"Atmore, AL" is CBSA_name; percentage = Divide(asian_population, population_2020) * 100
SELECT CAST(T2.asian_population AS REAL) * 100 / T2.population_2010 FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Atmore, AL'
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
Which solution contains files within a more popular repository, the solution ID18 or solution ID19?
more watchers mean that this repository is more popular;
SELECT CASE WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) > SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID18' WHEN SUM(CASE WHEN T2.Id = 18 THEN T1.Watchers ELSE 0 END) < SUM(CASE WHEN T2.Id = 19 THEN T1.Watchers ELSE 0 END) THEN 'SolutionID19' END isMorePopular FROM Repo AS T1 INNE...
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 have "picture" as their attribute class?
images have "picture" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';
SELECT COUNT(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 = 'picture'
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 name of the customer with the highest amount of debt?
customer with the highest amount of debt refers to c_name where MIN(c_acctbal);
SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )
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 California, calculate the percentage of them in post office types.
DIVIDE(COUNT(zip_code where type = 'Post Office'), COUNT(zip_code)) as percentage where name = 'California';
SELECT CAST(COUNT(CASE WHEN T2.type = 'Post Office' THEN T2.zip_code ELSE NULL END) AS REAL) * 100 / COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'California'
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 percent more of the watchers for the repository of solution No.83855 than No.1502?
solution No. refers to Solution.Id; percentage = DIVIDE(MULTIPLY(SUBTRACT(SUM(Solution.Id = 83855), SUM(Solution.Id = 1502)), 100)), SUM(Soltution.Id = 1502);
SELECT CAST(SUM(CASE WHEN T2.Id = 83855 THEN T1.Watchers ELSE 0 END) - SUM(CASE WHEN T2.Id = 1502 THEN T1.Watchers ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 1502 THEN T1.Watchers 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
For those objects that have multiple relations, how many images have a prediction class of "reading"?
prediction class of "reading" refers to PRED_CLASS = 'reading'; if two objects (OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID) has multiple PRED_CLASS_ID, it means these two objects have multiple relations;
SELECT COUNT(T1.IMG_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'reading'
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
Give the percentage of Japanese suppliers whose account is in debt.
account is in debt if s_acctbal < 0; DIVIDE(COUNT(s_acctbal < 0 where n_name = 'JAPAN'), COUNT(s_name where n_name = 'JAPAN')) as percentage;
SELECT CAST(SUM(IIF(T2.n_name = 'JAPAN', 1, 0)) AS REAL) * 100 / COUNT(T1.s_name) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_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 give the url of the repository whose files are contained in solution ID 9?
null
SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 9
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 attribute classes of the image ID "15".
attribute classes of the image ID "15" refer to ATT_CLASS where IMG_ID = 15;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 15
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 percentage of the European countries among the given countries?
DIVIDE(COUNT(n_name where r_name = 'EUROPE'), COUNT(n_name)) as percentage;
SELECT CAST(SUM(IIF(T2.r_name = 'EUROPE', 1, 0)) AS REAL) * 100 / COUNT(T1.n_name) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey
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 codes and the congress representatives' names of the postal points which are affiliated with Readers Digest.
representative's full names refer to first_name, last_name; postal points affiliated with Readers Digest refer to zip_code where organization = 'Readers Digest';
SELECT T1.zip_code, 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 WHERE T1.organization = 'Readers Digest'
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
For the solution of the most 'sw' methods, what is its path?
solution refers to SolutionId; sw refers to Lang = 'sw'; solution with the most 'sw' methods refers to MAX(COUNT(Lang = 'sw'));
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'sw'
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
Provide the x-coordinate and y-coordinate of the image with an attribute class of ''horse" and an object class of "fur".
attribute class of "horse" refers to ATT_CLASS = 'horse'; object class of "fur" refers to OBJ_CLASS = 'fur';
SELECT T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'horse' AND T4.OBJ_CLASS = 'fur'
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 country has the most number of suppliers whose account is in debt?
country refers to n_name; the most number of suppliers whose account is in debt refers to MAX(SUM(s_acctbal < 0));
SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T2.n_name ) AS T ORDER BY T.num 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
State the county for Arecibo City.
"Arecibo" is the city
SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arecibo'
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 percent more of the Forks for the repository of solution No.53546 than No.1502?
solution No. refers to Solution.Id; percentage = DIVIDE(MULTIPLY(SUBTRACT(SUM(Solution.Id = 53546), SUM(Solution.Id = 1502)), 100)), SUM(Solution.Id = 1502);
SELECT CAST(SUM(CASE WHEN T2.Id = 53546 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 1502 THEN T1.Forks ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 1502 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
List all the ID of the images that have an attribute class of "horse".
ID of all images refer to IMG_ID; attribute class of "horse" refers to ATT_CLASS = 'horse';
SELECT 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 = 'horse'
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
Calculates the profit processed by Supplier No. 7414 on order No. 817154.
SUBTRACT(MULTIPLY(l_extendedprice, (SUBTRACT(1, l_discount)), MULTIPLY(ps_supplycost, l_quantity))) WHERE l_suppkey = 7414 AND l_orderkey = 817154;
SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey WHERE T1.l_suppkey = 7414 AND T1.l_orderkey = 817154
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
What is the language of the method used in the solution path "opendns_diagnosticapp\windows\OpenDnsDiagnostic.sln"?
language refers to Lang;
SELECT T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'opendns_diagnosticappwindowsOpenDnsDiagnostic.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
What are the width and height of the bounding box of the object with "keyboard" as their object class and (5, 647) as their coordinate?
The bounding box's W and H abbreviations stand for the object's width and height respectively; "keyboard" as object class refers to OBJ_CLASS = 'keyboard'; (5, 647) as coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 647;
SELECT 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 T2.OBJ_CLASS = 'keyboard' AND T1.X = 5 AND T1.Y = 647
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
Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.
name of the customer refers to c_name; o_clerk = 'Clerk#000000803'; order on 1997/12/10 refers to o_orderdate = '1997-12-10';
SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803'
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
Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois.
"Alabama" and "Illinois" are both state; Ratio = Divide (Count(state = 'Alabama'), Count(state = 'Illinois'))
SELECT CAST(COUNT(CASE WHEN state = 'Alabama' THEN cognress_rep_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN state = 'Illinois' THEN cognress_rep_id ELSE NULL END) FROM congress
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 solutions are in "https://github.com/derickbailey/presentations-and-training.git"?
solutions refers to Solution.Id; https://github.com/derickbailey/presentations-and-training.git refers to Url; Url; = 'https://github.com/derickbailey/presentations-and-training.git';
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/derickbailey/presentations-and-training.git'
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 have "keyboard" as their object class?
images refer to IMG_ID; "keyboard" as object class refers to OBJ_CLASS = 'keyboard';
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 = 'keyboard'
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
Customer No.129301 made an order on 1996/7/27, what was the delivery time for the first part of that order?
SUBTRACT(l_receiptdate, l_commitdate) WHERE o_orderdate = '1996-07-27' AND o_custkey = '129301';
SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = '129301' AND T1.o_orderdate = '1996-07-27'
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 all the locations of postal points with the area code "410".
latitude and longitude coordinates can be used to identify the location; postal points refer to zip_code;
SELECT T2.latitude, T2.longitude FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 410
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 percent more of the stars for the repository of solution No.51424 than No.167053?
solution No. refers to Solution.Id; percentage = DIVIDE(MULTIPLY(SUBTRACT(SUM(Solution.Id = 51424), SUM(Solution.Id = 167053)), 100)), SUM(Solution.Id = 167053);
SELECT CAST(SUM(CASE WHEN T2.Id = 51424 THEN T1.Stars ELSE 0 END) - SUM(CASE WHEN T2.Id = 167053 THEN T1.Stars ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 167053 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
List all the object classes of the images that have a (5,5) coordinate.
object classes refer to OBJ_CLASS; (5,5) coordinates refer to X and Y coordinates of the bounding box where X = 5 and Y = 5;
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 = 5 AND T1.Y = 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...
retails
Clerk#000000936 dealt with a "Not Specified" order on 1995/3/13, what was the charge for the part of the order shipped by truck?
MULTIPLY(MULTIPLY(l_extendedprice, SUBTRACT(1, l_discount)), SUM(1, l_tax)) WHERE o_clerk = 'Clerk#000000936', o_orderstatus = '4-NOT SPECIFIED', o_orderdate = '1995-03-13' AND l_shipmode = 'TRUCK';
SELECT T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax) AS num FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_clerk = 'Clerk#000000936' AND T2.l_shipmode = 'TRUCK' AND T1.o_orderstatus = '4-NOT SPECIFIED' AND T1.o_orderdate = '1995-03-13'
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 10 cities with a median age over 40. Include their zip codes and area codes.
median age over 40 refers to median_age > 40
SELECT T2.city, T2.zip_code, T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.median_age >= 40 LIMIT 10
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 methods with a solution with a "636449700980488000" processed time.
methods refers to Name; solution refers to SolutionId;
SELECT DISTINCT T2.Name FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.ProcessedTime = 636449700980488000
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 image ID with a predicted class of "parked on"?
predicted class of "parked on" refers to PRED_CLASS = 'parked on';
SELECT DISTINCT T1.IMG_ID FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'parked on'
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
For the order with the total price of 218195.43, which supplier handled the returned item? Give the supplier id.
returned item refers to l_returnflag = 'R'; supplier id refers to l_suppkey; order with the total price of 218195.43 refers to o_totalprice = 218195.43;
SELECT T2.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_totalprice = 218195.43 AND T2.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...
codebase_comments
Among the repositories with over 200 likes, how many of them have files contained by solutions with a processed time of under 636439500080712000?
over 200 likes refers to Stars > 200; ProcessedTime<636439500080712000;
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.ProcessedTime < 636439500080712000 AND T1.Stars > 200
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 have "vegetable" and "fruits" as their object classes?
images refer to IMG_ID; "vegetables" and "fruits" as object classes refer to OBJ_CLASS = 'vegetables' and OBJ_CLASS = 'fruits';
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 = 'vegetables' OR T2.OBJ_CLASS = 'fruits'
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
For the order with the total price of 231499.38, what was the discounted price for supplier No. 9397?
MULTIPLY(l_extendedprice, SUBTRACT(1, l_discount)) where o_totalprice = 231499.38 AND l_suppkey = 9397;
SELECT T1.l_extendedprice * (1 - T1.l_discount) AS DISCOUNTERPRICE FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE T1.l_suppkey = 9397 AND T2.o_totalprice = 231499.38
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
What are the bad aliases of the postal points from East Setauket?
East Setauket 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 = 'East Setauket'
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 path of solution from all the "it" lang code method.
path of the solution refers to Path; solution refers to Solution.Id;
SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'it'
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 the ID of all images with objects that have multiple relations.
ID of all images refer to IMG_ID; if two objects (OBJ1_SAMPLE_ID, OBJ2_SAMPLE_ID) has multiple PRED_CLASS_ID, it means these two objects have multiple relations;
SELECT IMG_ID FROM IMG_REL GROUP BY PRED_CLASS_ID HAVING COUNT(DISTINCT OBJ1_SAMPLE_ID) != 0 AND COUNT(DISTINCT OBJ2_SAMPLE_ID) != 0
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
Give the number of Moroccan customers whose account is in debt.
account is in debt if c_acctbal < 0; Moroccan customers refer to c_name WHERE n_name = 'MOROCCO';
SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'MOROCCO' AND T1.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 list the IDs of the solutions that contain files within the top 3 followed repositories.
more forks refers to more people follow this repository;
SELECT T2.Id FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId ORDER BY T1.Forks DESC LIMIT 3
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 have a total of 10 attribute classes?
images refer to IMG_ID; total of 10 attribute classes refers to COUNT(OBJ_CLASS_ID) = 10;
SELECT COUNT(IMG_ID) FROM IMG_OBJ 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...
retails
Give customer No.106936's region name.
"Customer#000000055" is the name of the customer which refers to c_name; region name refers to r_name;
SELECT T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_custkey = 106936
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 all the counties in Georgia.
Georgia is the name of the state, in which name = 'Georgia';
SELECT T2.county FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Georgia' 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
What is the total processed time of all solutions from the repository with the most forks?
total processed time = AVG(ProcessedTime where MAX(COUNT(Forks))); repository with the most forks refers to MAX(COUNT(Forks));
SELECT SUM(T2.ProcessedTime) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = ( SELECT MAX(Forks) 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 images have less than 15 object samples?
images refer to IMG_ID; less than 15 object samples refer to COUNT(OBJ_SAMPLE_ID) < 15;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_SAMPLE_ID < 15
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 nationality of "Customer#000000055"?
"Customer#000000055" is the name of the customer which refers to c_name; nationality is the state of belonging to a particular country, therefore nationality refers to n_name;
SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055'
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
What is the average time needed for the solutions containing files within the repository whose url is "https://github.com/jeffdik/tachy.git" to be processd?
average time = avg(ProcessedTime);
SELECT CAST(SUM(T2.ProcessedTime) AS REAL) / COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git'
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 have an x-coordinate of 5 and y-coordinate of 5?
X and Y refer to coordinates of the bounding box where X = 5 and Y = 5; images refer to IMG_ID;
SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE X = 5 AND Y = 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...
retails
Which region does "Supplier#000000129" belong to?
"Supplier#000000129" is the name of the supplier which refers to s_name; Which region refers to r_name;
SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129'
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
What is the code of the area with the largest Asian population?
the code of the area refers to area_code; area with the largest Asian population refers to MAX(asian_population);
SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.asian_population ORDER BY T2.asian_population 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 are the "en" methods with solutions from repository "1093"
en methods refers to lang = 'en'; solution refers to Solution.Id; repository refers to RepoId; RepoId = 1093;
SELECT DISTINCT T2.id FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 1093 AND T2.Lang = 'en'
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
Based on image 5, what is the percentage of images that belong windows object class?
DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'windows' and IMG_ID = 5), COUNT(OBJ_SAMPLE_ID where IMG_ID = 5)) as percentage;
SELECT CAST(COUNT(T1.OBJ_SAMPLE_ID) AS REAL) * 100 / COUNT(CASE WHEN T1.IMG_ID = 5 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 = 'windows'
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 country does supplier No.34 come from?
supplier No.34 refers to s_suppkey = 34; country refers to n_name;
SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 34
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
Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?
the comment for this method is not XML refers to CommentsXML = 0; the comments for this method is XML refers to CommentsXML = 1
SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE 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
Calculate the percentage of object samples that are related to street lights.
DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'street lights'), COUNT(OBJ_SAMPLE_ID)) as percentage;
SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'street lights' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_SAMPLE_ID) 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...
retails
How many countries are there in the No.2 region?
No.2 region refers to n_regionkey = 2;
SELECT COUNT(n_nationkey) FROM nation WHERE n_regionkey = 2
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
What is the name of the CBSA of the city with the highest average house value?
the highest average house value refers to avg_house_value;
SELECT DISTINCT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.avg_house_value = ( SELECT MAX(avg_house_value) FROM zip_data ) 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 path of solution of "spinachLexer.mT__55" method?
path of the solution refers to Path; solution refers to Solution.Id; method refers to Name; Name = 'spinachLexer.mT__55';
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'spinachLexer.mT__55'
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 coordinate of X and Y for the object with the attribute of 'sparse' in image 1.
coordinates of X and Y for the object refer to X and Y coordinates of the bounding box; attribute of 'sparse' in image 1 refers to IMG_ID = 1 where ATT_CLASS = 'sparse';
SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 1 AND T1.ATT_CLASS = 'sparse'
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 customers, what is the percentage of the customer's nation being Germany?
DIVIDE(COUNT(c_custkey when n_name = 'GERMANY'), COUNT(c_custkey)) as percentage;
SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey
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
What was the population of Wilcox County in 2010?
population of Wilcox County in 2010 refers to SUM(population_2010) where county = 'WILCOX';
SELECT SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'WILCOX'
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's the task of the method whose tokenized name is "html parser feed"?
tokenized name refers to NameTokenized; task of the method refers to the second part of name deliminated by "."; for example, the task of 'LinqToDelicious.HttpWebRequestFactory.Create' is 'HttpWebRequestFactory'
SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE 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
State the width and height of the object with the class of 'van' in image 1.
The bounding box's W and H abbreviations stand for the object's width and height respectively; class of 'van' in image 1 refers to OBJ_CLASS = 'van' where IMG_ID = 1;
SELECT T1.H, T1.W FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1 AND T2.OBJ_CLASS = 'van'
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 average price of the orders made by a customer in Germany?
DIVIDE(SUM(o_totalprice), COUNT(o_orderkey)) where n_name = 'GERMANY';
SELECT AVG(T3.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY'
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 ids of repositories for solutions with "ro" methods.
ids of repositories refers to RepoId; ro refers to lang = 'ro';
SELECT DISTINCT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'ro'
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 name of the object class that has in most images.
object class that has in most images refers to OBJ_CLASS where MAX(COUNT(OBJ_CLASS_ID));
SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_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
Among the orders made by customers in Germany, which one of them has the highest priority in delivery? Please give its order key.
orders refer to o_orderkey; Germany is the name of the nation which refers to n_name = 'GERMANY'; earlier orderdate have higher priority in delivery therefore MIN(o_orderdate);
SELECT T3.o_orderkey FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY' ORDER BY T3.o_orderdate 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
Provide the alias and elevation of the city with zip code 1028.
null
SELECT T1.alias, T2.elevation FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 1028
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 language of the method ''PixieTests.SqlConnectionLayerTests.TestSqlCreateGuidColumn"?
language refers to Lang;
SELECT Lang FROM Method WHERE Name = 'PixieTests.SqlConnectionLayerTests.TestSqlCreateGuidColumn'
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 are the attributes of the widest object in image 400?
attributes refer to ATT_CLASS; the widest relates to the width of the bounding box of the object which refers to MAX(W); image 400 refers to IMG_ID = 400;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T2.IMG_ID = 400 ORDER BY T3.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
What is the total price of all the orders made by customers in Germany?
orders refer to o_orderkey; total price refers to o_totalprice; Germany is the name of the nation which refers to n_name = 'GERMANY';
SELECT SUM(T3.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY'
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 codes and CBSA officers of the postal point in Oxford.
CBSA officers refer to CBSA_name; postal point refers to zip_code; Oxford is the city;
SELECT T2.zip_code, T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Oxford'
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 are the paths of solutions in repository "https://github.com/ecoffey/Bebop.git"
path of solutions refers to Path; https://github.com/ecoffey/Bebop.git refers to Url; Url = 'https://github.com/ecoffey/Bebop.git';
SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/ecoffey/Bebop.git'
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 have objects with the attributes of polka dot?
attributes of polka dot refer to ATT_CLASS = 'polka dot'; images refer to IMG_ID;
SELECT COUNT(T2.OBJ_SAMPLE_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 = 'polka dot'
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 are made by customers in Germany?
orders refer to o_orderkey; Germany is the name of the nation which refers to n_name = 'GERMANY';
SELECT COUNT(T2.c_custkey) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY'
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
How many methods with solutions with path 'maravillas_linq-to-delicious\tasty.sln'?
solution refers to SolutionId;
SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious\tasty.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
What is the prediction class between object class 'chain' and 'label' in image 2360078?
prediction class refers to PRED_CLASS; object class 'chain' refers to OBJ_CLASS = 'chain'; object class 'label' refers to OBJ_CLASS = 'label'; image 2360078 refers to IMG_ID = 2360078;
SELECT DISTINCT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T2.PRED_CLASS_ID = T1.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID AND T1.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.IMG_ID = 2360078 AND T1.OBJ1_SAMPLE_...
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 customers in Germany, how many of them have an account balance of over 1000?
Germany is the name of the nation which refers to n_name = 'GERMANY'; account balance of over 1000 refers to c_acctbal > 1000;
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 = 'GERMANY' AND T1.c_acctbal > 1000
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 codes and the alias of Greeneville.
Greeneville is the city;
SELECT T2.zip_code, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Greeneville'
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 the summary of the method "Castle.MonoRail.Framework.Test.StubViewComponentContext.RenderSection".
null
SELECT DISTINCT Summary FROM Method WHERE Name = 'Castle.MonoRail.Framework.Test.StubViewComponentContext.RenderSection'
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 attributes for object class 'tip' In image 1314.
attributes for object refer to ATT_CLASS; class 'tip' in image 1314 refers to OBJ_CLASS = 'tip' where IMG_ID = 1314;
SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T3.IMG_ID = 1314 AND T4.OBJ_CLASS = 'tip'
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 phone numbers of all the customers in the household segment and are in Brazil.
phone numbers refer to c_phone; Brazil is the name of the nation which refers to n_name = 'BRAZIL'; household segment refers to c_mktsegment = 'HOUSEHOLD';
SELECT T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD' AND 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...