根据snowflake中的where条件选择表列表



请根据where条件查找表列表。我能够获得表列表在雪花使用下面的查询:

select table_name 
from information_schema.tables 
where table_type = 'BASE TABLE' 
and table_name like UPPER('DIM_STUDENT_NAME%');

所有这些表都有一个时间戳列,我的要求是找到时间戳列少于30天的表列表。如果有人能帮助我,我将不胜感激。

尝试添加条件:

select table_name 
from information_schema.tables 
where table_type = 'BASE TABLE' 
and table_name like UPPER('DIM_STUDENT_NAME%') and 
datediff(day, TableField,current_date() ) <= 30 

最新更新