如何在Twig中消除重复值并格式化DQL的输出?

I am working on a reporting application in Symfony2, and my twig file shows the following output using DQL. I created an Entity, passed the values using render from action function to the twig. I used a for loop to display all the elements from an associative array (See picture 1). how do I group the result in this specific format? (See picture 2) such that all the duplicate zoneName and rank are eliminated and placed on the top only once.

Current Display of records in twig FROM DQL

Current Display of records in twig FROM DQL

The output which I want to achieve

The output which I want to achieve My query in Action function of controller is as follows

     $qb->select('distinct t.zoneName, t.rank, t.actSanctList, t.offDate')
            ) /*, $dql */

        ->addGroupBy('t.zoneName')     
        ->addGroupBy('t.rank')    
         ->addGroupBy('t.actSanctList')   
        ->addGroupBy('t.offDate')  

        ->orderBy('t.zoneName', 'ASC')

        $DL01 = $qb->getQuery()->getResult();

My twig file

                  {% for DL01_line in DL01_data %}

                        <tr>
                        <td>{{ DL01_line.zoneName }}</td>
                        <td>{{ DL01_line.rank }}</td>                                          
                        <td>{{ DL01_line.actSanctList }}</td>
                         <td>{{ DL01_line.offDate|date('Y-m-d') }}</td>
                                </tr>
                   {% endfor %}