Hello,
Take the following table for example:
-----------------------------------
----ID-----------|-----YEAR-------
| 0 ------------------ 2008
| 1 ------------------ 2008
| 2 ------------------ 2008
| 3 ------------------ 2009
| 4 ------------------ 2009
| 5 ------------------ 2009
| 6 ------------------ 2009
-----------------------------------
What I need to do is select one full row per year. That is with both ID and YEAR, and just any old row (ID doesn't matter).
select distinct year from table;
works, but does not include the ID. And:
select distinct year, id from table;
Has duplicates of year...
Any ideas?