How to group by with rollup?
You can add a GROUP modifier right to the end of the string:

$queryPrice-&gt;groupBy('b.startBooking WITH ROLLUP');


With the rest of your query Drupal produces:

SELECT  b.*
FROM 
{booking} b
GROUP BY b.startBooking WITH ROLLUP