title: SQL - Query if the same card exists among multiple decks
body: <p>Given the schema below, how can I query if and how many of the same character card is in multiple decks, without changing the underlying data?</p>
  
  <pre><code>CREATE TABLE 'deck' (
    'deckId' BIGINT(20) NOT NULL AUTO_INCREMENT,
    'title' TEXT(255) NOT NULL,
    PRIMARY KEY ('deckId')
  );
  
  CREATE TABLE 'character' (
    'characterId' BIGINT(20) NOT NULL AUTO_INCREMENT,
    'name' VARCHAR(255) NOT NULL,
    PRIMARY KEY ('userId')
  );
  
  CREATE TABLE 'card' (
    'cardId' BIGINT(20) NOT NULL AUTO_INCREMENT,
    'color' VARCHAR(255) NOT NULL,
    'characterId' BIGINT(20) NOT NULL,
    'deckId' BIGINT(20) NOT NULL,
    PRIMARY KEY ('cardId'),
    CONSTRAINT 'FK_card_character'
    FOREIGN KEY ('characterId')
    REFERENCES 'character' ('characterId'),
    CONSTRAINT 'FK_card_deck'
    FOREIGN KEY ('deckId')
    REFERENCES 'deck' ('deckId')
  );
  </code></pre>