Reputation: 25
If I create 4 grouping sets in my query, e.g.
GROUP BY
GROUPING SETS ((a), (b), (c), (d))
Why does it create 4 records with all NULL values ?
I understand if I use a blank grouping set like () this calculated the totals if I am right and in this case all individual values for dimensions should be NULL but the metric values should be calculated.
But in my case, I need values grouped by individual dimensions only and it does calculate correctly and I am able to fetch using select * from xyz where a is not NULL for data grouped by a
But I am not able to understand why does it create records will all NULL values. The number of records looks like is the same as number of grouping sets. So does it create one row per grouping set?
Can someone please explain the logic?
I was expecting to see grouped by one of each the dimensions I used in my grouping sets. I was not expecting to see a record with all NULL values created per grouping set
Upvotes: 0
Views: 184