Good day to all! You need to write a query through GROUP BY, which will output the same result as this query via GROUP BY ROLLUP. Push, please, on a thought. Request to rewrite

  • In different SQL dialects, ROLLUP works somewhat differently. What specific dialect is used and which subtotals does this ROLLUP add in your dialect? In general, it would not hurt to give the text of the query with text, as well as examples of tables with data, the same text that could be copied, create a database and try to experiment - Mike
  • But in general, I would probably multiply the sample to something like select 1 as X union all select 2 , which case would provide different grouping for records of type 1 and type 2 and maybe something would filter out in having - Mike

0