By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
DECLARE @json nvarchar(max)=
'{"data":[{"id":34541863,"name":"\"A\" Cell Breeding Device","type":"Spell Card","desc":"During each of your Standby Phases, put 1 A-Counter on 1 face-up monster your opponent controls.","race":"Continuous","archetype":"Alien","card_sets":[{"set_name":"Force of the Breaker","set_code":"FOTB-EN043","set_rarity":"Common","set_rarity_code":"(C)","set_price":"1.58"}],"card_images":[{"id":34541863,"image_url":"https://storage.googleapis.com/ygoprodeck.com/pics/34541863.jpg","image_url_small":"https://storage.googleapis.com/ygoprodeck.com/pics_small/34541863.jpg"}],"card_prices":[{"cardmarket_price":"0.12","tcgplayer_price":"0.18","ebay_price":"4.99","amazon_price":"24.45","coolstuffinc_price":"0.25"}]},{"id":64163367,"name":"\"A\" Cell Incubator","type":"Spell Card","desc":"Each time an A-Counter(s) is removed from play by a card effect, place 1 A-Counter on this card. When this card is destroyed, distribute the A-Counters on this card among face-up monsters.","race":"Continuous","archetype":"Alien","card_sets":[{"set_name":"Gladiator''s Assault","set_code":"GLAS-EN062","set_rarity":"Common","set_rarity_code":"(C)","set_price":"1.61"}],"card_images":[{"id":64163367,"image_url":"https://storage.googleapis.com/ygoprodeck.com/pics/64163367.jpg","image_url_small":"https://storage.googleapis.com/ygoprodeck.com/pics_small/64163367.jpg"}],"card_prices":[{"cardmarket_price":"0.12","tcgplayer_price":"0.20","ebay_price":"1.15","amazon_price":"0.50","coolstuffinc_price":"0.25"}]},{"id":91231901,"name":"\"A\" Cell Recombination Device","type":"Spell Card","desc":"Target 1 face-up monster on the field; send 1 \"Alien\" monster from your Deck to the Graveyard, and if you do, place A-Counters on that monster equal to the Level of the sent monster. During your Main Phase, except the turn this card was sent to the Graveyard: You can banish this card from your Graveyard; add 1 \"Alien\" monster from your Deck to your hand.","race":"Quick-Play","archetype":"Alien","card_sets":[{"set_name":"Invasion: Vengeance","set_code":"INOV-EN063","set_rarity":"Common","set_rarity_code":"(C)","set_price":"1.07"}],"card_images":[{"id":91231901,"image_url":"https://storage.googleapis
SELECT
c.*
INTO #cards
FROM OPENJSON(@json, '$.data')
WITH (
[id] int
, [name] nvarchar(1000)
, [type] nvarchar(1000)
, [desc] nvarchar(1000)
, [race] nvarchar(1000)
, [archetype] nvarchar(1000)
, [atk] nvarchar(1000)
, [def] nvarchar(1000)
, [ban_tcg] nvarchar(1000)
, [ban_ocg] nvarchar(1000)
, [ban_goat] nvarchar(1000)
, [level] nvarchar(1000)
, [attribute] nvarchar(1000)
, [linkval] nvarchar(1000)
) c;
SELECT
c.id card_id,
s.*
INTO #sets
FROM OPENJSON(@json, '$.data')
WITH (
[id] int,
card_sets nvarchar(max) AS JSON
) c
CROSS APPLY OPENJSON(c.card_sets)
WITH (
set_name nvarchar(100),
id | name | type | desc | race | archetype | atk | def | ban_tcg | ban_ocg | ban_goat | level | attribute | linkval |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34541863 | "A" Cell Breeding Device | Spell Card | During each of your Standby Phases, put 1 A-Counter on 1 face-up monster your opponent controls. | Continuous | Alien | null | null | null | null | null | null | null | null |
64163367 | "A" Cell Incubator | Spell Card | Each time an A-Counter(s) is removed from play by a card effect, place 1 A-Counter on this card. When this card is destroyed, distribute the A-Counters on this card among face-up monsters. | Continuous | Alien | null | null | null | null | null | null | null | null |
91231901 | "A" Cell Recombination Device | Spell Card | Target 1 face-up monster on the field; send 1 "Alien" monster from your Deck to the Graveyard, and if you do, place A-Counters on that monster equal to the Level of the sent monster. During your Main Phase, except the turn this card was sent to the Graveyard: You can banish this card from your Graveyard; add 1 "Alien" monster from your Deck to your hand. | Quick-Play | Alien | null | null | null | null | null | null | null | null |
73262676 | "A" Cell Scatter Burst | Spell Card | Select 1 face-up "Alien" monster you control. Destroy it and distribute new A-Counters equal to its Level among your opponent's face-up monsters. | Quick-Play | Alien | null | null | null | null | null | null | null | null |
37478723 | "Infernoble Arms - Durendal" | Spell Card | While this card is equipped to a monster: You can add 1 Level 5 or lower FIRE Warrior monster from your Deck to your hand, then destroy this card. If this card is sent to the GY because the equipped monster is sent to the GY: You can target 1 Level 5 or lower FIRE Warrior monster in your GY; Special Summon it, also you cannot Special Summon monsters for the rest of the turn, except Warrior monsters. You can only use 1 ""Infernoble Arms - Durendal"" effect per turn, and only once that turn. | Equip | Noble Knight | null | null | null | null | null | null | null | null |
64867422 | "Infernoble Arms - Hauteclere" | Spell Card | While this card is equipped to a monster: You can target 1 face-up monster you control; this turn, you cannot declare attacks, except with that monster, also it gains the ability this turn to make a second attack during each Battle Phase, then destroy this card. If this card is sent to the GY because the equipped monster is sent to the GY: You can target 1 face-up monster on the field; destroy it. You can only use 1 ""Infernoble Arms - Hauteclere"" effect per turn, and only once that turn. | Equip | Noble Knight | null | null | null | null | null | null | null | null |
90861137 | "Infernoble Arms - Joyeuse" | Spell Card | While this card is equipped to a monster: You can target 1 FIRE Warrior monster in your GY; add it to your hand, then destroy this card. If this card is sent to the GY because the equipped monster is sent to the GY: You can Special Summon 1 FIRE Warrior monster from your hand. You can only use 1 ""Infernoble Arms - Joyeuse"" effect per turn, and only once that turn. | Equip | Noble Knight | null | null | null | null | null | null | null | null |
44256816 | 1st Movement Solo | Spell Card | If you control no monsters: Special Summon 1 Level 4 or lower "Melodious" monster from your hand or Deck. You can only activate 1 "1st Movement Solo" per turn. You cannot Special Summon monsters during the turn you activate this card, except "Melodious" monsters. | Normal | Melodious | null | null | null | null | null | null | null | null |
86988864 | 3-Hump Lacooda | Effect Monster | If there are 3 face-up "3-Hump Lacooda" cards on your side of the field, Tribute 2 of them to draw 3 cards. | Beast | null | 500 | 1500 | null | null | null | 3 | EARTH | null |
11714098 | 30,000-Year White Turtle | Normal Monster | A huge turtle that has existed for more than 30,000 years. | Aqua | null | 1250 | 2100 | null | null | null | 5 | WATER | null |
83994646 | 4-Starred Ladybug of Doom | Flip Effect Monster | FLIP: Destroy all Level 4 monsters your opponent controls. | Insect | null | 800 | 1200 | null | null | null | 3 | WIND | null |
67048711 | 7 | Spell Card | When there are 3 face-up "7" cards on your side of the field, draw 3 cards from your Deck. Then destroy all "7" cards. When this card is sent directly from the field to your Graveyard, increase your Life Points by 700 points. | Continuous | null | null | null | null | null | null | null | null | null |
23771716 | 7 Colored Fish | Normal Monster | A rare rainbow fish that has never been caught by mortal man. | Fish | null | 1800 | 800 | null | null | null | 4 | WATER | null |
86198326 | 7 Completed | Spell Card | Activate this card by choosing ATK or DEF; equip only to a Machine monster. It gains 700 ATK or DEF, depending on the choice. | Equip | null | null | null | null | null | null | null | null | null |
14261867 | 8-Claws Scorpion | Effect Monster | Once per turn, you can flip this card into face-down Defense Position. When this card attacks an opponent's face-down Defense Position monster, this card's ATK becomes 2400 during damage calculation only. | Insect | null | 300 | 200 | null | null | null | 2 | DARK | null |
24140059 | A Cat of Ill Omen | Flip Effect Monster | FLIP: Choose 1 Trap from your Deck and place it on top of your Deck, or, if "Necrovalley" is on the field, you can add that Trap to your hand instead. | Beast | null | 500 | 300 | null | null | null | 2 | DARK | null |
6850209 | A Deal with Dark Ruler | Spell Card | (This card is always treated as an "Archfiend" card.) If a Level 8 or higher monster under your control was sent to the Graveyard this turn: Special Summon 1 "Berserk Dragon" from your hand or Deck. |
Quick-Play | Archfiend | null | null | null | null | null | null | null | null |
card_id | set_name | set_code | set_rarity | set_rarity_code |
---|---|---|---|---|
34541863 | Force of the Breaker | FOTB-EN043 | Common | (C) |
64163367 | Gladiator's Assault | GLAS-EN062 | Common | (C) |
91231901 | Invasion: Vengeance | INOV-EN063 | Common | (C) |
73262676 | Strike of Neos | STON-EN041 | Common | (C) |
37478723 | 2021 Tin of Ancient Battles | MP21-EN136 | Super Rare | (SR) |
37478723 | Rise of the Duelist | ROTD-EN053 | Ultra Rare | (UR) |
64867422 | 2021 Tin of Ancient Battles | MP21-EN137 | Super Rare | (SR) |
64867422 | Rise of the Duelist | ROTD-EN054 | Common | (C) |
90861137 | 2021 Tin of Ancient Battles | MP21-EN138 | Super Rare | (SR) |
90861137 | Rise of the Duelist | ROTD-EN055 | Super Rare | (SR) |
44256816 | 2015 Mega-Tin Mega Pack | MP15-EN169 | Super Rare | (SR) |
44256816 | The New Challengers | NECH-EN059 | Super Rare | (SR) |
44256816 | The New Challengers: Super Edition | NECH-ENS10 | Super Rare | (SR) |
86988864 | Ancient Sanctuary | AST-070 | Common | (C) |
86988864 | Dark Revelation Volume 2 | DR2-EN183 | Common | (C) |
83994646 | Dark Beginning 1 | DB1-EN198 | Common | (C) |
83994646 | Pharaoh's Servant | PSV-088 | Common | (C) |
83994646 | Pharaoh's Servant | PSV-E088 | Common | (C) |
83994646 | Pharaoh's Servant | PSV-EN088 | Common | (C) |
83994646 | Retro Pack 2 | RP02-EN022 | Common | (C) |
83994646 | Starter Deck: Yugi Reloaded | YSYR-EN010 | Common | (C) |
67048711 | Ancient Sanctuary | AST-091 | Short Print | (SP) |
67048711 | Dark Revelation Volume 2 | DR2-EN204 | Common | (C) |
23771716 | Gold Series | GLD1-EN001 | Common | (C) |
23771716 | Metal Raiders | MRD-098 | Common | (C) |
23771716 | Metal Raiders | MRD-E098 | Common | (C) |
23771716 | Metal Raiders | MRD-EN098 | Common | (C) |
23771716 | Starter Deck: Joey | SDJ-008 | Common | (C) |
23771716 | Structure Deck: Fury from the Deep | SD4-EN002 | Common | (C) |
86198326 | Battle Pack 3: Monster League | BP03-EN135 | Common | (C) |
86198326 | Battle Pack 3: Monster League | BP03-EN135 | Shatterfoil Rare | (SHR) |
86198326 | Duel Terminal 2 | DT02-EN038 | Duel Terminal Normal Parallel Rare | (DNPR) |
86198326 | Pharaoh's Servant | PSV-004 | Common | (C) |
86198326 | Pharaoh's Servant | PSV-E004 | Common | (C) |
86198326 | Pharaoh's Servant | PSV-EN004 | Common | (C) |
86198326 | Speed Duel: Scars of Battle | SBSC-EN029 | Common | (C) |
14261867 | Gold Series | GLD1-EN007 | Common | (C) |
14261867 | Pharaonic Guardian | PGD-024 | Common | (C) |
24140059 | Dark Revelation Volume 1 | DR1-EN018 | Common | (C) |
24140059 | Pharaonic Guardian | PGD-070 | Common | (C) |
24140059 | Speed Duel Starter Decks: Destiny Masters | SS01-ENB11 | Common | (C) |
6850209 | Dark Crisis | DCR-030 | Common | (C) |
6850209 | Dark Crisis | DCR-EN030 | Common | (C) |
6850209 | Dark Revelation Volume 1 | DR1-EN192 | Common | (C) |
6850209 | Legendary Collection 4: Joey's World Mega Pack | LCJW-EN241 | Rare | (R) |