Shift.sql 1.2 KB

12345678910111213141516171819202122
  1. SELECT
  2. cast(DateTime::MakeTzTimestamp(DateTime::ShiftYears(tm, 10)) as String),
  3. cast(DateTime::MakeTzTimestamp(DateTime::ShiftYears(tm, 10)) as String),
  4. cast(DateTime::MakeTzTimestamp(DateTime::ShiftQuarters(tm, 16)) as String),
  5. cast(DateTime::MakeTzTimestamp(DateTime::ShiftQuarters(tm, -16)) as String),
  6. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 0)) as String),
  7. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 1)) as String),
  8. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 3)) as String),
  9. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 11)) as String),
  10. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 12)) as String),
  11. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, 123)) as String),
  12. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, -1)) as String),
  13. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, -3)) as String),
  14. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, -11)) as String),
  15. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, -12)) as String),
  16. cast(DateTime::MakeTzTimestamp(DateTime::ShiftMonths(tm, -123)) as String)
  17. from (
  18. select
  19. cast(ftztimestamp as TzTimestamp) as tm
  20. from Input
  21. );