SELECT ref as dossier
        , date_depot as "date dépôt"
        , SUM(pa3a4) as "a3/a4"
        , SUM(pa0) as a0
        , SUM(total_pages) as "total pages"
   FROM &DB_PREFIXEnum_dossier 
  WHERE num_bordereau=&idx
  GROUP BY ref, date_depot
  ORDER BY 1,2 