title: how do I write a SQL CASE/condition to flag if all of one field is a certain value?
body: <p>Basically I have a table that has an account ID, of which there can be one or many child IDs attached. See below</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Account</th>
  <th>ID</th>
  <th>Open or Close</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>123456</td>
  <td>a678</td>
  <td>Close</td>
  </tr>
  <tr>
  <td>123456</td>
  <td>b192</td>
  <td>Close</td>
  </tr>
  <tr>
  <td>123456</td>
  <td>j291</td>
  <td>Close</td>
  </tr>
  <tr>
  <td>543210</td>
  <td>l103</td>
  <td>Open</td>
  </tr>
  <tr>
  <td>543210</td>
  <td>m129</td>
  <td>Close</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to write a query that will basically act as a Y/N flag that tells me if all of the IDs for the account are &quot;closed.&quot; So using the above data, id want the result to be something like</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Account</th>
  <th>All Closed?</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>123456</td>
  <td>Yes</td>
  </tr>
  <tr>
  <td>543210</td>
  <td>No</td>
  </tr>
  </tbody>
  </table>
  </div>