card_games Database Schema

Database Description

Database for card games.

Schema Structure
Schema information not available for this database.
Example Queries

SQL Query:
SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'
Evidence:

Simplified Chinese translation refers to language = 'Chinese Simplified'; name of the set "Mirrodin" refers to name = 'Mirrodin'

Difficulty: moderate

SQL Query:
SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'
Evidence:

unknown power refers to power = '*' or power is null

Difficulty: simple

SQL Query:
SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL
Evidence:

incredibly poweful foils refers to cardKingdomFoilId is not null AND cardKingdomId is not null

Difficulty: simple

SQL Query:
SELECT id FROM cards WHERE frameEffects = 'extendedart' GROUP BY id
Evidence:

frame effect as extendedart refers to frameEffects = 'extendedart'

Difficulty: simple

SQL Query:
SELECT T1.name, T1.artist, T1.isPromo FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.isPromo = 1 AND T1.artist = (SELECT artist FROM cards WHERE isPromo = 1 GROUP BY artist HAVING COUNT(DISTINCT uuid) = (SELECT MAX(count_uuid) FROM ( SELECT COUNT(DISTINCT uuid) AS count_uuid FROM cards WHERE isPromo = 1 GROUP BY artist ))) LIMIT 1
Evidence:

with the most ruling information refers to Max(count(rulings.uuid)); the card is the promotional printing refers to isPromo = 1;

Difficulty: moderate
Back to Database Explorer