大于符号用于比较日期,使用这个或任何其他可用的解决方案是否正确?
#standardSQL
with table1 as(
select "ProductA" as products, date '2017-1-20' as end_date union all
select "ProductB" as products, date '2017-6-20' as end_date union all
select "ProductC" as products, date '2018-1-20' as end_date union all
select "ProductD" as products, date '2018-6-20' as end_date
)
select products,end_date,if(current_date()>end_date,'outdated','current') status from table1