- Mar 1, 2000
- 30,890
- 5,001
- 126
I have a query that returns 200 unique numbers from a table.
I need to add a column so that the past 10 years is represented for each of those unique numbers (so I will have 2000 rows total: 10x200)
Does that make sense?
I feel like this is really obvious and I've just over thought the problem at this point and can't wrap my brain back around it.
Thanks in advance.
Code:
Number
--------
4
23
29
62
65
74
89
151
299
...
312
I need to add a column so that the past 10 years is represented for each of those unique numbers (so I will have 2000 rows total: 10x200)
Code:
Year Number
2013 4
2012 4
2011 4
2010 4
2009 4
2008 4
2007 4
2006 4
2005 4
2004 4
2013 23
2012 23
2011 23
2010 23
2009 23
2008 23
2007 23
2006 23
2005 23
2004 23
...
2013 299
2012 299
2011 299
2010 299
2009 299
2008 299
2007 299
2006 299
2005 299
2004 299
Does that make sense?
I feel like this is really obvious and I've just over thought the problem at this point and can't wrap my brain back around it.
Thanks in advance.