Archive for March 5th, 2009
Row sampling
Sometimes we need to get a sample row from a table satisfying a certain condition. Like, get a first row for each month.
MS SQL and Oracle supply analytical function ROW_NUMBER() for this purpose.
Let's create a simple table to illustrate our needs and see how do we query it.
Read the rest of this entry »
Subscribe in a reader