This is what I have:
TABLE: INFO
Name Val1 Val2 Val3
Jim 1 2 3
Jim 4 7 9
Jim 3 7 2
Kate 1 2 8
Sally 3 5 4
Ann 3 2 1
I want to select the FIRST record for each name, & get all the fields of the record, sort by name. My guess would be :
Select Distinctrow Name, Val1, Val2, Val3 from INFO order by name. BUT that gets me all 6 records (Jim's name 3 x)
I want to get :
Ann 3 2 1
Jim 1 2 3
Kate 1 2 8
Sally 3 5 4
What do I need to do please?
TABLE: INFO
Name Val1 Val2 Val3
Jim 1 2 3
Jim 4 7 9
Jim 3 7 2
Kate 1 2 8
Sally 3 5 4
Ann 3 2 1
I want to select the FIRST record for each name, & get all the fields of the record, sort by name. My guess would be :
Select Distinctrow Name, Val1, Val2, Val3 from INFO order by name. BUT that gets me all 6 records (Jim's name 3 x)
I want to get :
Ann 3 2 1
Jim 1 2 3
Kate 1 2 8
Sally 3 5 4
What do I need to do please?