次のクエリを実行できます
select (current_date-interval '1' day) ,a,b from (select '1' as a, 2 as b) as t2;
しかし、「1」の代わりに変数を配置することはできません。次の方法を試しましたが成功しませんでした
select (current_date-interval b day) ,a,b from (select '1' as a, 2 as b) as t2;
select (current_date-interval a day) ,a,b from (select '1' as a, 2 as b) as t2;
私もキャストを試みましたが、まだ結果はありません。