title: How to get query for parent id order by id in mysql
body: <pre>
  <b>(1) Table Name Groups</b>
  | ID | parent_id| Name                                |
  |  1 |      NULL|      Assets                         |
  |  2 |      NULL|      Liabilities and Owners Equity  |
  |  3 |      NULL|      Incomes                        |
  |  4 |      NULL|      Expenses                       |
  |  5 |      1   |      Fixed Assets                   |
  |  6 |      1   |      Current Assets                 |
  |  7 |      1   |      Current Assets                 |
  |  8 |      2   |      Capital Account                |
  |  9 |      2   |      Current Liabilities            |
  |  10|      2   |      Loans (Liabilities)            |
  |  11|      3   |      Direct Incomes                 |
  |  12|      4   |      Direct Expenses                |
  |  13|      3   |      Indirect Incomes               |
  |  14|      4   |      Indirect Expenses              |
  |  15|      3   |      Sales                          |
  |  16|      4   |      Purchases                      |
  |  17|      6   |      Cash at Bank                   |
  |  18|      17  |      KWL Banks                      |
  
  <b>(2) Table Name ledger</b>
  
  |  ID|      GroupID |      Name         |
  |  1|       18      |      1708-6 ABL   |
  
  
  I need query result like below
  --------------------------------------------------
  <b>Assets</b>
      Current Assets
              Cash at Bank
                    KWL Banks
                          1708-6 ABL
        Fixed Assets
        Investments
  --------------------------------------------------
  <b>Liabilities and Owners Equity</b>
        Capital Account
        Current Liabilities
        Loans (Liabilities)
  --------------------------------------------------
  <b>Incomes</b>
        Direct Incomes
        Indirect Incomes
        Sales
  --------------------------------------------------
  <b>Expenses</b>
        Direct Expenses
        Indirect Expenses
        Purchases</pre>