I'm still relatively new to creating queries and am attempting to create a query that will be able to return the first and last rows of the table that I want to pull from. I've so far been able to make individual top value and bottom value queries to pull the rows on their own using the following general syntax:
Top Value:
Code: Select all
Select Top 1 *fields I want to pull* From TableName
Order By *field I want to sort in ascending order*
Code: Select all
Select Top 1 *fields I want to pull* From TableName
Order By *field I want to sort in descending order* DESC