I need some help for a query, and I really have no idea how to write such a select.
table looks like:
| id | username | votes | vip |
(simplified of course)
Here is what i need
- select all fields from table `users`
- while selecting check if the column `vip` is 1 or 0
- if `vip`= 0, then multiply column `votes` by 1.1 (vip users get 110% votes)
- ORDER BY `votes` DESC
can i do this with a select query? how?
thanks in advance!