Mysql
 sql >> Base de données >  >> RDS >> Mysql

MySQL ORDER BY x-y/x ASC

essayez ceci :

$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";