Skip to content

How to use OFFSET – FETCH

  • by

Hello! After a few weeks of inactivity due to a new job, moving to a new city and all that kind of stuff, I’m finally back but not in pog form like Alf! I came back to share another bit of knowledge that I may have. In this post, I’m… Read More »How to use OFFSET – FETCH

A trick with MERGE

  • by

I’m not sure how many of you have used the MERGE statement, it comes from SQL:2003 standard but for SQL Server it was first released with version 2008, so it’s been around for a while now. This guy right here is very useful when you need to either insert new… Read More »A trick with MERGE

The APPLY Operator

  • by

Hi, welcome back. After the series of posts about window functions, it’s time to talk about something else which is very interesting and there’s not a lot of people using it. I’m talking about the APPLY operator. The APPLY operator is a very powerful and useful operator that we can… Read More »The APPLY Operator

Window Functions Part 4

  • by

Hello again! For those of you that have not followed my previous posts, here you can find the part 1, part 2 and part 3. To continue with the series, today we’re going to talk about Window Aggregates, for those wondering what these are, they are basically your standard Aggregate… Read More »Window Functions Part 4

Window Functions Part 3

  • by

After two or three weeks trying to resuscitate my laptop I finally made it, so here I go again. Let’s continue exploring the different Window Function available on SQL Server. If you haven’t yet, I encourage you to take a look at Part 1 and Part 2 of the series.… Read More »Window Functions Part 3

Window Functions Part 2

  • by

In my last post I started explaining what Window Functions in SQL Server are and how to use ROW_NUMBER(). To continue with the series, today I’m bringing you another post on Window Functions, now I’ll show you how to use the functions LAG() and LEAD(). Suppose you manage a business… Read More »Window Functions Part 2

Window Functions Part 1

One of the interview questions I frequently make has to do with creating a query that will return the nth row from the result set, there has been several times the prospect does not answer because they don’t think which way they can do it, but sometimes they answer something… Read More »Window Functions Part 1

Here we go!

  • by

It’s been a while since I wanted to write a blog, but it never happened. Some times I just realize I am too lazy to take on a subject and start writing about my experience with that topic, and to be honest, I’ve never had given me the time to… Read More »Here we go!