开发者

How to format a MySQL query that involves divison

I have a MySQL table with a column upvote, and a column downvote, and I only wish to return results that have a specific ratio between the two and the total vote count, say between .4 and .6 I would consi开发者_运维百科der these results to be "controversial" so to speak.

Is it possible to format a MySQL query that involves the divison of two or more rows?


SELECT * FROM TABLE WHERE (cola / colb > 0.4) AND (cola / colb < 0.6);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜