alanchinese
Well-known member
- Joined
- Jan 12, 2005
- Messages
- 58
suppose i have a simplied table (MyTable):
MyPrimaryKey MyYear
key1 2006
key2 2007
key1 2002
key2 2005
key1 2009
key1 2010
-----------------------------------------
i want to select from this table, with MyYear to be the minimum year grouping by the MyPrimaryKey.
so the result set should be:
MyPrimaryKey MyYear
key1 2002
key2 2005
key1 2002
key2 2005
key1 2002
key1 2002
-----------------------------------------
i am sure its going to be easy. i just had no luck and its hurry.
thanks for your help.
MyPrimaryKey MyYear
key1 2006
key2 2007
key1 2002
key2 2005
key1 2009
key1 2010
-----------------------------------------
i want to select from this table, with MyYear to be the minimum year grouping by the MyPrimaryKey.
so the result set should be:
MyPrimaryKey MyYear
key1 2002
key2 2005
key1 2002
key2 2005
key1 2002
key1 2002
-----------------------------------------
i am sure its going to be easy. i just had no luck and its hurry.
thanks for your help.