Can this be done in one SELECT statement ?
Posted in 2003
Hi, I would like to write a SELECT statement that would return the top row for each group of ID. Ex. ID item_no. description 1 01 XXX 1 02 YYY 1 03 ZZZ 2 02 AAA 2 03 BBB 3 aa MMM 3 bb NNN The SELECT statement should return : ID item_no description 1 01 XXX 2 02 AAA 3 aa MMM Noted that item_no column is not an integer column. I would like to get the first top row that the "ORDER BY" clause returns for each ID. Is it possible to write a single SELECT to accomplish this ? Thanks N.