sql >> Base de Datos >  >> RDS >> Mysql

MySQL ORDEN POR x-y/x ASC

prueba esto:

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