获取总条数
SELECT count(*) as num from action_log;
倒序取10条数据
select id from table order by id desc limit 10;