![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
![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
![How to Get Top N Records Per Group? - Ranking Function - Interview Question of the Week #156 - SQL Authority with Pinal Dave How to Get Top N Records Per Group? - Ranking Function - Interview Question of the Week #156 - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/i/d/top2records1.png)
How to Get Top N Records Per Group? - Ranking Function - Interview Question of the Week #156 - SQL Authority with Pinal Dave
![How to Get Top N Records Per Group? - Ranking Function - Interview Question of the Week #156 - SQL Authority with Pinal Dave How to Get Top N Records Per Group? - Ranking Function - Interview Question of the Week #156 - SQL Authority with Pinal Dave](https://blog.sqlauthority.com/wp-content/uploads/2018/01/top2records.png)