Just a day ago, while working with some inventory related projects, I faced one interesting situation. I had to find TOP 1 and BOTTOM 1 record together. I right away that I should just do UNION but then I realize that UNION will not work as it will only accept one ORDER BY clause. If… Continue Reading...
Source: SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL | Journey to SQL Authority with Pinal Dave
No comments:
Post a Comment