Does anyone have the experience of using groupby ... rollup features with the creation of a record... via SQL?

I having difficulty while trying to use this SQL within a DataEnvironment and Datareport...

Thanks,
Marc