title: SQL Query to find linked accounts under one ID
body: <p>I have a table name Customer where a customer has a unique identifier ID. Each ID can have more than once account of customer linked to it. I have to find how many accounts are linked under one ID and all the accounts linked under it.
  Input:</p>
  <pre><code>| customer| account_no | ID  | 
  |     RAM |        123 | ABC |
  |     RAM |        456 | ABC | 
  |     RAM |        789 | ABC | 
  |     ADAM|        101 | DEF | 
  |    ADAM |        102 | DEF | 
  |    ALEX |        232 | GHI | 
  |    ALEX |        534 | GHI | 
  </code></pre>
  <p>Output:
  I want to find IDs which have more than one account linked under it and the account numbers linked to it.
  E.g.</p>
  <pre><code>|    ID   |Count_of_accounts| Accounts | 
  |    ABC  |        3        | 123      | 
  |         |                 | 456      |
  |         |                 | 789      |
  |    DEF  |        2        | 101      | 
  |         |                 | 102      |
  </code></pre>