select FROM_UNIXTIME(x.gunsayisi * 86400) from (select FLOOR(tarih/86400) as gunsayisi from asd GROUP BY tarih) x;