select * from (
select to_char(visitDate,'dd') dt,count(*) ll,
rank() over(partition by to_char(visitDate,'dd')
order by count(*)) rk
from visitstat where userid!='null'
group by to_char(visitDate,'dd')
) t where rk=1;
select to_char(visitDate,'dd') dt,count(*) ll,
rank() over(partition by to_char(visitDate,'dd')
order by count(*)) rk
from visitstat where userid!='null'
group by to_char(visitDate,'dd')
) t where rk=1;
try:
select * from (
select to_char(visitDate,'dd') dt,count(*) ll,
rank() over(order by count(*)) rk
from visitstat where userid!='null'
group by to_char(visitDate,'dd')
) t where rk=1;