Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

MySQL ORDER POR x-y/x ASC


tente isso:
$SQLquery = "SELECT * FROM albums WHERE price2 > 1 ORDER BY (price-price2)/price ASC";

ou
$SQLquery = "SELECT * FROM albums WHERE price2 > 1 ORDER BY ((price-price2)/price) ASC";