一。清除表
TRUNCATE table ex_statistics
二。The best way to reset a sequence to start back with number 1 is to execute the following
ALTER SEQUENCE <tablename>_<id>_seq RESTART WITH 1
So, for example for the users table it would be:
ALTER SEQUENCE users_id_seq RESTART WITH 1