(
  pg_stat_user_tables_last_autoanalyze > 0
) and (
  time
  (
  ) - pg_stat_user_tables_last_autoanalyze
) > 24 * 60 * 60 * 10
