I am trying to get a sequential number column returned with my sql query. I need this to be inside the SELECT statement because I want to nest this query in another, and then use the column generated before for some further calculations.

I have looked everywhere and I can't find any examples of this.

Something to the effect of the following:

```
SELECT *, ROW_NUMBER() as row_number from my_awesome_table;
```

This should generate something like this:

```
row_number some_column some_other_column
---------- ----------- -----------------
    1        bla bla      bla bla bla 
    2        bla bla      bla bla bla 
    3        bla bla      bla bla bla 
    4        bla bla      bla bla bla 

```

Note that some\_column and some\_other\_column are real existing columns in my\_awesome\_table, whereas row\_number is generated on-the-fly for this query only.

Thanks!
swine