This is a typical drill-down report. Users can click the plus sign to go from summary levels to detail levels. On the other hand this is a typical drill-through report, where hyperlinks are provided for each row so users can drill through from summary to detail. I’ve created both types of reports...
In the last few posts, we discussed different grouping/aggregation methods using ROLLUP, CUBE and COMPUTE BY. We saw the difference between ROLLUP and CUBE. SQL Server 2008 added some enhancements to ROLLUP and CUBE. In addition, SQL Server 2008 added a new grouping related function GROUPING_ID() and...
In the previous posts, we have seen two examples that add additional rows with summarized values to the result of a query. The first post demonstrated a basic example without going deep into the aggregation functions. However, the second example demonstrated a little more complex example using WITH ROLLUP...
In the previous post we saw a simple example that adds a total line to the end of the query. In this post, let us see a little more advanced example of a query that adds sub totals and grand totals to the result of a query using WITH ROLLUP. For example, assume that you need to write a query that retrieves...