Dataset Viewer
db_id
stringclasses 8
values | question
stringlengths 17
126
| SQL
stringlengths 29
423
| db_schema_TC
stringclasses 26
values | db_schema_T
stringclasses 26
values | db_schema
stringclasses 8
values |
---|---|---|---|---|---|
WhatCDHipHop
|
what year was each specific entry released?
|
SELECT groupName, groupYear FROM torrents
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
what are the entries by each specific artist/group?
|
SELECT groupName, artist FROM torrents
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
which tags exist?
|
SELECT DISTINCT tag FROM tags
|
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
what release types are captured in this data set?
|
SELECT DISTINCT releaseType FROM torrents
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Find me top 5 most popular releases after 2000?
|
SELECT groupName FROM torrents WHERE groupYear > 2000 ORDER BY totalSnatched DESC LIMIT 5
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which albums have been downloaded more than 100 times?
|
SELECT DISTINCT groupName FROM torrents WHERE totalSnatched > 100 AND releaseType = "album"
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Name the most popular release on houston.
|
SELECT T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T1.tag = "houston" ORDER BY totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Name the most popular and least popular releases of lasean camry?
|
SELECT groupName FROM torrents WHERE artist = "lasean camry" AND totalSnatched = (SELECT max(totalSnatched) FROM torrents WHERE artist = "lasean camry") UNION SELECT groupName FROM torrents WHERE artist = "lasean camry" AND totalSnatched = (SELECT min(totalSnatched) FROM torrents WHERE artist = "lasean camry")
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Find me top 10 albums ranked by their popularity.
|
SELECT groupName FROM torrents WHERE releaseType = "album" ORDER BY totalSnatched DESC LIMIT 10
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Find me the most popular topics since 2010.
|
SELECT T1.tag FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id WHERE T2.groupYear >= 2010 GROUP BY T1.tag ORDER BY T2.totalSnatched DESC LIMIT 10
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which year had the minimum number of releases?
|
SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which release is being downloaded the most?
|
SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Who or which group is most popular in 2015?
|
SELECT artist FROM torrents WHERE groupYear = 2015 GROUP BY artist ORDER BY totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which tag is used for which release title?
|
SELECT T1.tag, T2.groupName FROM torrents as T2 JOIN tags as T1 ON T1.id = T2.id
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which year has the most released song?
|
SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which artist/group is most productive?
|
SELECT artist FROM torrents GROUP BY artist ORDER BY count(groupName) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which artist/group has the highest average download of songs?
|
SELECT artist FROM torrents GROUP BY artist ORDER BY avg(totalSnatched) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which year has the most CDs released?
|
SELECT groupYear FROM torrents GROUP BY groupYear ORDER BY count(groupName) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which CD has been downloaded the most times?
|
SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which kind of release type is the most popular?
|
SELECT releaseType FROM torrents GROUP BY releaseType ORDER BY sum(totalSnatched) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Whose CDs sells best?
|
SELECT artist FROM torrents GROUP BY artist ORDER BY sum(totalSnatched) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
What are the downloaded numbers and their release types?
|
SELECT sum(totalSnatched), releaseType FROM torrents GROUP BY releaseType
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
What are the downloaded numbers of 2000s and before 2000?
|
SELECT sum(totalSnatched) FROM torrents WHERE groupYear BETWEEN 2000 AND 2010 UNION SELECT sum(totalSnatched) FROM torrents WHERE groupYear < 2000
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
How many same release titles are there in the table?
|
SELECT count(*) FROM ( SELECT groupName FROM torrents GROUP BY groupName HAVING count(*) > 1 )
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
Which artist release the most CDs?
|
SELECT artist FROM torrents GROUP BY artist ORDER BY count(groupName) DESC LIMIT 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
How many downloads of ep and album respectively?
|
SELECT sum(totalSnatched) FROM torrents WHERE releaseType = "ep" UNION SELECT sum(totalSnatched) FROM torrents WHERE releaseType = "album"
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
What are the artist/groups that released only one CD?
|
SELECT artist FROM torrents GROUP BY artist HAVING count(*) = 1
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
WhatCDHipHop
|
What are the actors who have had releases after 2010?
|
SELECT artist FROM torrents WHERE groupYear > 2010 GROUP BY artist
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
|
CREATE TABLE "torrents" (
"groupName" TEXT,
"totalSnatched" INTEGER,
"artist" TEXT,
"groupYear" INTEGER,
"releaseType" TEXT,
"groupId" INTEGER,
"id" INTEGER
)
CREATE TABLE "tags" (
"index" INTEGER,
"id" INTEGER,
"tag" TEXT
)
CREATE INDEX "ix_tags_index"ON "tags" ("index")
|
TheHistoryofBaseball
|
Which is the most popular voting method for Hall of Fame in 2000?
|
SELECT votedby FROM hall_of_fame WHERE yearid = "2000" GROUP BY votedby ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
How many players weigh over 200 pounds?
|
SELECT count(*) FROM player WHERE weight > 200
|
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Who is the winner of Rookie of the Year in 2010?
|
SELECT player_id FROM player_award WHERE year = 2010 AND award_id = "Rookie of the Year"
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Who is the highest paid player since 2010?
|
SELECT player_id FROM salary WHERE year >= 2010 ORDER BY salary DESC LIMIT 1
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What are the salaries of players who have ever enter hall of fame?
|
SELECT T2.salary FROM salary as T2 JOIN hall_of_fame as T1 ON T1.player_id = T2.player_id WHERE T1.inducted = "Y"
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What are the minimum votes needed to enter hall of fame for each year since 1871?
|
SELECT min(votes), yearid FROM hall_of_fame WHERE inducted = "Y" AND yearid >= 1871 GROUP BY yearid
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What are the salaries in National League?
|
SELECT salary FROM salary WHERE league_id = "NL"
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What are the salaries in American League?
|
SELECT salary FROM salary WHERE league_id = "AL"
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which birth place has the most player awards?
|
SELECT birth_country FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id GROUP BY T1.birth_country ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What are the birth places of players won on hall of fame since 1871?
|
SELECT T1.birth_country FROM hall_of_fame as T2 JOIN player as T1 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" AND T2.yearid >= 1871
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which award has the highest player's salary?
|
SELECT award_id FROM player_award as T1 JOIN salary as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id ORDER BY avg(T2.salary) DESC LIMIT 1
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What were the years when any special elections happened in hall of fame?
|
SELECT DISTINCT yearid FROM hall_of_fame WHERE needed_note != ""
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Top 10 countries with the most hall of fame players
|
SELECT T1.birth_country FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" GROUP BY T1.birth_country ORDER BY count(*) DESC LIMIT 10
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
For every award, who is the youngest winner?
|
SELECT T1.player_id, T1.award_id , min(T1.year - T2.birth_year) FROM player_award as T1 JOIN player as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
For every award, who is the oldest winner?
|
SELECT T1.player_id, T1.award_id , max(T1.year - T2.birth_year) FROM player_award as T1 JOIN player as T2 ON T1.player_id = T2.player_id GROUP BY T1.award_id
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Top 10 teams with the most hall of fame players
|
SELECT T2.team_id FROM hall_of_fame as T1 JOIN salary as T2 ON T1.player_id = T2.player_id AND T1.yearid = T2.year WHERE T1.inducted = "Y" GROUP BY T2.team_id ORDER BY count(*) DESC LIMIT 10
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Average lifespan of hall of fame players
|
SELECT avg(T1.death_year - T1.birth_year) FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y"
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
For award winners, what's average weight for each position
|
SELECT avg(T1.weight) FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id GROUP BY notes
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
For award winners, which position that has the most hall of fame players?
|
SELECT T2.notes FROM hall_of_fame as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id WHERE T1.inducted = "Y" GROUP BY notes ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which player get the highest score in 1971?
|
SELECT player_id FROM player_award_vote WHERE year = "1971" ORDER BY points_won DESC LIMIT 1
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which month that players were born has the highest likelihood to be elected as hall of fame?
|
SELECT T1.birth_month FROM player as T1 JOIN hall_of_fame as T2 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" GROUP BY T1.birth_month ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which league has the most player awarded in 2006?
|
SELECT league_id FROM player_award WHERE year = "2006" GROUP BY league_id ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What defense position the player ID willite01 is?
|
SELECT DISTINCT notes FROM player_award WHERE player_id = "willite01"
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
How many players were awarded more than ten times?
|
SELECT count(*) FROM (SELECT player_id FROM player_award GROUP BY player_id HAVING count(*) > 10)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Which city the most players were born?
|
SELECT birth_city FROM player GROUP BY birth_city ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
What is the average weight of players who were awarded third-base man in TSN all-star award?
|
SELECT avg(T1.weight) FROM player as T1 JOIN player_award as T2 ON T1.player_id = T2.player_id WHERE T2.award_id = "TSN All-Star" AND notes = "3B"
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
TheHistoryofBaseball
|
Who is the player had the highest salary in 2015?
|
SELECT player_id FROM salary WHERE year = "2015" ORDER BY salary DESC LIMIT 1
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
CREATE TABLE [hall_of_fame] (
[player_id] text,
[yearid] integer,
[votedby] text,
[ballots] text,
[needed] text,
[votes] text,
[inducted] text,
[category] text,
[needed_note] text
)
CREATE TABLE [player_award] (
[player_id] text,
[award_id] text,
[year] integer,
[league_id] text,
[tie] text,
[notes] text
)
CREATE TABLE [player_award_vote] (
[award_id] text,
[year] integer,
[league_id] text,
[player_id] text,
[points_won] real,
[points_max] integer,
[votes_first] text
)
CREATE TABLE [salary] (
[year] integer,
[team_id] text,
[league_id] text,
[player_id] text,
[salary] integer
)
CREATE TABLE "player" (
"player_id" text,
"birth_year" text,
"birth_month" text,
"birth_day" text,
"birth_country" text,
"birth_state" text,
"birth_city" text,
"death_year" text,
"death_month" text,
"death_day" text,
"death_country" text,
"death_state" text,
"death_city" text,
"name_first" text,
"name_last" text,
"name_given" text,
"weight" text
)
|
GreaterManchesterCrime
|
What time do most of the crimes happen?
|
SELECT CrimeTS FROM GreaterManchesterCrime GROUP BY CrimeTS ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
What are the most likely outcome of the police investigation if the crime happen on "street"?
|
SELECT Outcome FROM GreaterManchesterCrime WHERE Location LIKE "%Street%" GROUP BY Outcome ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Which type of crime happen the most in Salford?
|
SELECT Type FROM GreaterManchesterCrime WHERE LSOA LIKE "%Salford%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
How many crimes are under investigation?
|
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome = "Under investigation"
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
How many crimes has been conducted?
|
SELECT count(*) FROM GreaterManchesterCrime
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
What is the top 3 area of crime conducted?
|
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 3
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Which type of crime has the highest rate of "Investigation complete"?
|
SELECT Type FROM GreaterManchesterCrime WHERE Outcome LIKE "%Investigation complete%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
How many crimes were classified as "Drugs"?
|
SELECT count(*) FROM GreaterManchesterCrime WHERE Type LIKE "%Drug%"
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
How many crimes are still "Under investigation" to date?
|
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome LIke "%Under investigation%"
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Which location has the top amount of "Drugs" crime conducted?
|
SELECT Location FROM GreaterManchesterCrime WHERE Type LIke "%Drug%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
What’s the most common type of crime?
|
SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Where is the most dangerous area?
|
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Where is the safest area?
|
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Where is the place with the largest number of sexual offenses crime events?
|
SELECT Location FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" GROUP BY Location ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
If it is possible to increase the number of police officers, which place is with the first priority?
|
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Which type of crime has the most prosecution cases?
|
SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Awaiting court outcome" GROUP BY Type ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
Which type of crime has the most investigation complete cases?
|
SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Investigation complete; no suspect identified" GROUP BY Type ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
GreaterManchesterCrime
|
What is the result in case 6B:E2:54:C6:58:D2?
|
SELECT Outcome FROM GreaterManchesterCrime WHERE CrimeID = "6B:E2:54:C6:58:D2"
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
CREATE TABLE GreaterManchesterCrime(CrimeID TEXT PRIMARY KEY, CrimeTS TIMESTAMP, Location TEXT, LSOA TEXT,Type TEXT, Outcome TEXT)
|
StudentMathScore
|
Which school district receive the most of federal revenue through state in Wisconsin?
|
SELECT T1.school_district FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Wisconsin" ORDER BY T1.t_fed_rev DESC LIMIT 1
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What is the average Title 1 fund in Virginia?
|
SELECT avg(T1.c14) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Virginia"
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What are the top 10 states that have the highest average math score and federal revenue they got through different categories?
|
SELECT T2.state, sum(c14),sum(c25) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY T3.average_scale_score DESC LIMIT 10
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What are the schools with highest federal revenue in each federal revenue categories and what's their state average scores?
|
SELECT T1.school_district, max(T1.c14), T3.average_scale_score FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state UNION SELECT T1.school_district, max(T1.c25), T3.average_scale_score FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
State with highest average math score
|
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
School with highest ratio of total revenue and average scores
|
SELECT T1.school_district, max(T1.t_fed_rev / T3.average_scale_score) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 on T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
Which state spent the most revenue towards schools and whats the state average score
|
SELECT T2.state, T3.average_scale_score FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY sum(T1.t_fed_rev) DESC LIMIT 1
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
School with lowest ratio of total revenue and average scores
|
SELECT T1.school_district, min(T1.t_fed_rev / T3.average_scale_score) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 on T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
Which state spent the least revenue towards schools and whats the state average score
|
SELECT T2.state, T3.average_scale_score FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code JOIN NDECoreExcel_Math_Grade8 as T3 ON T2.state = T3.state GROUP BY T2.state ORDER BY sum(T1.t_fed_rev) LIMIT 1
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
Which state has the highest average score in math exam?
|
SELECT state FROM NDECoreExcel_Math_Grade8 ORDER BY average_scale_score DESC LIMIT 1
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What is the average match score of CA?
|
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "California"
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
How many unique school districts in Indiana?
|
SELECT count(DISTINCT school_district) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Indiana"
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What is the state code of VA?
|
SELECT state_code FROM FINREV_FED_KEY_17 WHERE state = "Virginia"
|
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
Which state get the highest revenue?
|
SELECT T2.state FROM FINREV_FED_KEY_17 as T2 JOIN FINREV_FED_17 as T1 ON T1.state_code = T2.state_code GROUP BY T2.state ORDER BY sum(t_fed_rev) DESC LIMIT 1
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
How much funding does Colorado schools receive from Title 1 and the Child Nutrition program respectively?
|
SELECT sum(T1.c14), sum(T1.c25) FROM FINREV_FED_17 as T1 JOIN FINREV_FED_KEY_17 as T2 ON T1.state_code = T2.state_code WHERE T2.state = "Colorado"
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
How much federal funding does Pecatonia Area School district get?
|
SELECT t_fed_rev FROM FINREV_FED_17 WHERE school_district LIKE "%Pecatonia Area%"
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What are the student scores on the NAEP math exam for 8th graders in North Carolina and South Carolina?
|
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "North Carolina" UNION SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "South Carolina"
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
What are the averge score of students in NC and in NY?
|
SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "North Carolina" UNION SELECT average_scale_score FROM NDECoreExcel_Math_Grade8 WHERE state = "New York"
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
StudentMathScore
|
How many schools get higher revenue via Child Nutrition A than revenue via child left school behind act?
|
SELECT count(*) FROM FINREV_FED_17 WHERE c25 > c14
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
|
CREATE TABLE [FINREV_FED_17] (
[state_code] integer,
[idcensus] integer,
[school_district] text,
[nces_id] text,
[yr_data] integer,
[t_fed_rev] integer,
[c14] integer,
[c25] integer
)
CREATE TABLE "NDECoreExcel_Math_Grade8" (
[year] integer,
[state] text,
[all_students] text,
[average_scale_score] integer
)
CREATE TABLE "FINREV_FED_KEY_17" (
"State_Code" INTEGER,
"State" text,
"#_Records" text
)
|
WorldSoccerDataBase
|
What is the away team against Omiya Ardija in 2018?
|
SELECT AwayTeam FROM football_data WHERE HomeTeam = "Omiya Ardija" AND Season LIKE "%2018%"
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
How many matches in Spain in 2010?
|
SELECT count(*) FROM football_data WHERE Season LIKE "%2010%" AND Country = "Spain"
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
Which matches has the highest draw opening so far?
|
SELECT MATCH FROM betfront ORDER BY DRAW_OPENING DESC LIMIT 1
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
Which year has most matches?
|
SELECT YEAR FROM betfront GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
How many matches did Pinnacle have betting records?
|
SELECT count(*) FROM football_data WHERE PSH != "" AND PSD != "" AND PSA != ""
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
How many matches did Bet365 gives higher home win odds than Pinnacle?
|
SELECT count(*) FROM football_data WHERE B365H > PSH
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
How many games that the total number of goals exceed 5?
|
SELECT count(*) FROM football_data WHERE FTHG + FTAG > 5
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
WorldSoccerDataBase
|
What is the highest home losing odds in Bet365 ever?
|
SELECT max(B365A) FROM football_data
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
CREATE TABLE "betfront" (
"YEAR" INTEGER,
"DATETIME" TIMESTAMP,
"COUNTRY" TEXT,
"COMPETION" TEXT,
"MATCH" TEXT,
"HOME_OPENING" REAL,
"DRAW_OPENING" REAL,
"AWAY_OPENING" REAL,
"HOME_CLOSING" REAL,
"DRAW_CLOSING" REAL,
"AWAY_CLOSING" REAL
)
CREATE TABLE "football_data" (
"Season" TEXT,
"Datetime" TIMESTAMP,
"Div" TEXT,
"Country" TEXT,
"League" TEXT,
"Referee" TEXT,
"HomeTeam" TEXT,
"AwayTeam" TEXT,
"FTHG" INTEGER,
"FTAG" INTEGER,
"FTR" TEXT,
"HTHG" INTEGER,
"HTAG" INTEGER,
"HTR" TEXT,
"PSH" REAL,
"PSD" REAL,
"PSA" REAL,
"B365H" REAL,
"B365D" REAL,
"B365A" REAL,
"LBH" REAL,
"LBD" REAL,
"LBA" REAL,
"BWH" REAL,
"BWD" REAL,
"BWA" REAL
)
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 4