Hi Cesare,
you simply have to rewrite your query in a slightly different form;
BTW I imagine that returning the relative distance (in metres) for
each row of the resultset should be a good idea:
SELECT distr.Comune, distr.Gestore, distr.Indirizzo,
distr.Bandiera, prz.descCarburante, prz.prezzo,
ST_Distance(distr.geom,
MakePoint(13.571386, 37.314926, 4326), 1) AS dist
FROM anagrafica_impianti_attivi as distr
JOIN prezzo_alle_8 as prz ON (prz.idImpianto = distr.IdImpianto)
WHERE dist <= 1000
ORDER BY prz.prezzo ASC, dist ASC;
note: even if your geometries are based on geographic coords
(long/lat), ST_Distance(a, b, 1) will return a distance
expressed in metres and precisely measured on the ellipsoid
by applying the most accurate geodetic formulae.
bye Sandro