Sky
2012-01-31 17:04:59 UTC
Hi,
i have this table ABC, that has fields:
iMonth iYear vTitle
1 2011 title1
6 2011 title2
6 2011 title3
12 2011 title4
1 2012 title5
1 2012 title6
2 2012 title7
I need select distinct on the month and year, where it is not the
latest month/year.
In the table above, the latest is Feb 2012
so, I need to populate the entry for the past:
output:
1 2011
6 2011
12 2011
1 2012
what will be the query ?
Many thanks.
Regds,
Sky
i have this table ABC, that has fields:
iMonth iYear vTitle
1 2011 title1
6 2011 title2
6 2011 title3
12 2011 title4
1 2012 title5
1 2012 title6
2 2012 title7
I need select distinct on the month and year, where it is not the
latest month/year.
In the table above, the latest is Feb 2012
so, I need to populate the entry for the past:
output:
1 2011
6 2011
12 2011
1 2012
what will be the query ?
Many thanks.
Regds,
Sky