Reputation: 25
How can I divide Kills to Deaths and see everyone that has a division more than 10?
SELECT * FROM players
WHERE DIV(Kills/Deaths) > 10
I tried this, but no hope..
Upvotes: 0
Views: 105
Reputation: 18550
Just remove the div function.
Col1/col2 will do the division no function needed
Upvotes: 0
Reputation: 1656
Use simply:
SELECT * FROM `players` WHERE Kills/Deaths > 10
For integer division you can use DIV
as an inline operator like this:
SELECT * FROM `players` WHERE Kills DIV Deaths > 10
Upvotes: 1