如何按日期显示计数

how to show count datewise

    I want to show count date wise query executed fine but count is showing 1 if date is same 

我卡在什么地方不明白 日期格式为:2020-06-01 09:20:35.000 这是我的查询

    select count(lead_id_lms) as lead_id_count,date_entered from g_hdfclms where 
     cast(date_entered as date) between '2020-06-01' and '2020-06-24'
     group by date_entered

据推测,您只需要 日期 而不是 时间:

select cast(date_entered as date) as date_only, count(lead_id_lms) as lead_id_count
from g_hdfclms
where cast(date_entered as date) between '2020-06-01' and '2020-06-24'
group by cast(date_entered as date);