def sort_records(records):
    return sorted(records, key=lambda record: (record[1], -record[2]))
