We can use WITH keyword to make our query more simplified.
Let’s take a simple example:
We have some data in our table as below
Let’s take a simple example:
We have some data in our table as below
Now output should come in this way:
Means first entry from each group.
My whole T-SQL will look like this.This is the very generous use of WITH keyword.
That’s It.
Enjoy Learning.
No comments:
Post a Comment