title: How to select all rows for a key if ANY row contains a specified value for that key
body: <p>I have a MySQL (transaction) table which includes these 2 columns </p>
  
  <p>Col1 = account
  Col2 = trans_type</p>
  
  <p>There can be many rows for a given account. </p>
  
  <p>I want a select which returns ALL of the rows for any account (grouped by account) if ANY of the rows for that account has a transaction_type = "A".</p>
  
  <p>So, the data could look like this </p>
  
  <pre>
  acct      trans_type        sku
  
  102           B              6001 
  
  102           C              6220
  
  103           A              6006
  
  103           C              6003
  
  103           D              6007
  
  104           A              6006
  
  104           B              6007
  </pre>
  
  <p>In this example, accts 103 and 104 have a row with a trans type of "A". Therefore, the query should return all of the rows for acct 103 and all of the rows for acct 104.</p>
  
  <p>Is this possible with a single select?</p>
  
  <p>I think I need a nested select statement, but I have never done that and can't figure it out.</p>
  
  <p>Thanks.</p>