SELECT
    Cards.Name,
    Cards.Energy,
    Cards.Health,
    Cards.Risk,
    Cards.Flavour,
    Cards.Image,
    Types.Name,
    group_concat(replace(Effects.Command,'#',Card_Effects.Amount), '\\'),
    Decks.Name,
    Deck_Cards.Amount
FROM Cards
    JOIN Types ON Types.id = Cards.Type
    CROSS JOIN Card_Effects ON Card_Effects.Card = Cards.id
    JOIN Effects ON Effects.id = Card_Effects.Effect
    CROSS JOIN Deck_Cards ON Deck_Cards.Card = Cards.id
    JOIN Decks ON Deck_Cards.Deck = Decks.id
GROUP BY
    Cards.id,
    Decks.id
ORDER BY Cards.Name;
