$dow = @mysql_query("SELECT rating_item_id, rating_type - AVG(rating_vote) as vidurkis from ".DB_RATINGS." WHERE rating_type='F' order by rating_item_id, order by vidurkis DESC LIMIT 0,10");
while ($q = @mysql_fetch_array($dow))
{
$kintamasis = $q['vidurkis'];
echo "$kintamasis <br>";
}