title: Why isn't MySQL using any of these possible keys?
body: <p>I have the following query:</p>
  
  <pre><code>SELECT t.id
  FROM account_transaction t
  JOIN transaction_code tc ON t.transaction_code_id = tc.id
  JOIN account a ON t.account_number = a.account_number
  GROUP BY tc.id
  </code></pre>
  
  <p>When I do an <code>EXPLAIN</code> the first row shows, among other things, this:</p>
  
  <pre><code>table: t
  type: ALL
  possible_keys: account_id,transaction_code_id,account_transaction_transaction_code_id,account_transaction_account_number
  key: NULL
  rows: 465663
  </code></pre>
  
  <p>Why is key NULL?</p>