existing table user
data structure
id name sex age
1 B 2 20
2 A 2 25
3 B 1 20
4 A 1 30
select * from user where name ="A"or sex ="1" can find data
2 A 2 25
3 B 1 20
4 A 1 30
from the point of view of the above data, the data with an id of 4 have the highest degree of matching. How to sort the data with the highest degree of matching (multi-fields).