Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL ORDINA PER x-y/x ASC

prova questo:

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

o

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