The below shown is my query I need to order by with these three columns . This is for complex search listing. If I used one of them ,it works perfectly . But handling more than one ,it does not order properly.
EDIT
Actually I needed ,premium records must be at first positions along with more favorites , and also elite customers have more priority . These all works conditionally
1) More favorites will come at first
2) But premium will be considered
3) If basic will have 5 favorites ,it wont push to top ,basic having small priority
4) As well elite have some good priority
SELECT
`Driver`.`id` ,
`Driver`.`login_id` ,
`Login`.`profile_type`,
.................
ORDER BY `fav_count`,
FIELD( `Login`.`profile_type` , "premium", "basic" ) ,
`Driver`.`is_elite` ASC
Sample result I expected
is_elite| profile_type | fav_count
________|_____________________|____________
1 | premium | 4
1 | premium | 3
1 | premium | 2
1 | premium | 1
0 | basic | 5
0 | basic | 0
Please advise me . Thanks