$sorgu = mysql_query("SELECT avg(tfiyat) as ortalama, count(*) as say FROM `tablo` where tarih>='$tbas' and tarih<='$tson' ");