SQL语句实例:
select count(id) as num from public.user where cast((CURRENT_TIMESTAMP-login_timed) day as integer )<=1;
或
select count(id) as num from public.user where cast((CURRENT_TIMESTAMP-login_timed) hour as integer )<=24;
大家可以根据表结构稍作调整后使用
vertica时间计算SQL语句实例:统计一天内登录的用户,布布扣,bubuko.com
时间: 2024-10-25 10:41:39