Tests for counters with expiration time (sql)