Compare fields and keep record with bigger ID?

How do you write a shell script to compare records with the same fields then keep the biggeer id number fields (field separate by a pipe)


1150|	San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
1263|San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
2001|	Tampa|4|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000
2002|Tampa|8|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000

and the results should be

1263|San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
2001|	Tampa|4|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000
2002|Tampa|8|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000

Thanks,

What fields the same?
Looks like you are trying to compare on the second (city name) field, with the first combination on San Jose. But, what about Tampa?

1150|	San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
1263|San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000

These 2 records have the same all fields
San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000
but only record ID is different so i would like to keep record with bigger id
--> 1263|San Jose|8|15|7|2013-02-19 00:00:00.000|2013-02-20 00:00:00.000

2001|	Tampa|4|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000
2002|Tampa|8|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000

as long any field different even it the same Tampa but we will keep all.

2001|	Tampa|4|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000
2002|Tampa|8|15|6|2013-02-20 00:00:00.000|2013-02-21 00:00:00.000

Thanks

Okay I made it work now with this code

awk -F"|" '$1>=highest[$2,$3,$4,$5,$6,$7]{maxrec[$2,$3,$4,$5,$6,$7]=$0;highest[$2,$3,$4,$5,$6,$7]=$1} END{for(i in maxrec)print maxrec}' filename.txt | sort -t\| -k1


Thanks

 
sort -nr | line