![SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/i/b/unionall.gif)
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave
![sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow](https://i.stack.imgur.com/XUu0K.png)
sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow
![sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow](https://i.stack.imgur.com/q5iO6.png)
sql - Use ROLLUP with ORDER BY clause moves the Grand Total row from the bottom to the top - Stack Overflow
![SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/wp-content/uploads/2008/03/unionall1.gif)
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave
![SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - Part 2 - CTE - SQL Authority with Pinal Dave SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - Part 2 - CTE - SQL Authority with Pinal Dave](https://i0.wp.com/blog.sqlauthority.com/wp-content/uploads/2008/03/unionall1.gif?resize=350%2C200&ssl=1)
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - Part 2 - CTE - SQL Authority with Pinal Dave
![Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers... Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...](https://sqltimes.files.wordpress.com/2017/06/botom_5_needed.png)
Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...
![Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers... Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...](https://sqltimes.files.wordpress.com/2017/06/botom_5_result.png)
Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...
![How to add subtotal row after the bottom row using a grouping set in SQL Server 2014 - Stack Overflow How to add subtotal row after the bottom row using a grouping set in SQL Server 2014 - Stack Overflow](https://i.stack.imgur.com/9q6MA.png)
How to add subtotal row after the bottom row using a grouping set in SQL Server 2014 - Stack Overflow
![SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave](https://i0.wp.com/blog.sqlauthority.com/i/b/ViewLimit1.jpg?resize=350%2C200&ssl=1)
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - SQL Authority with Pinal Dave
![Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers... Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...](https://sqltimes.files.wordpress.com/2017/06/botom_10.png)
Sql Server : How to SELECT BOTTOM to records (vs TOP 10 records) maintaining the same order in records | Playing with database servers...
![How Does TOP WITH TIES Work in SQL Server? - Interview Question of the Week #159 - SQL Authority with Pinal Dave How Does TOP WITH TIES Work in SQL Server? - Interview Question of the Week #159 - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/i/d/topwithties1.png)
How Does TOP WITH TIES Work in SQL Server? - Interview Question of the Week #159 - SQL Authority with Pinal Dave
![Display 'top N + other' measures using data cube transforms | How-To | Cleanse, Consolidate & Modify Data | Documentation | Learning Display 'top N + other' measures using data cube transforms | How-To | Cleanse, Consolidate & Modify Data | Documentation | Learning](https://www.dundas.com/support/images/dbi/support-articles/metric-sets/others-top-bottom.png)