查找某用户点击每个产品的最新的5条记录
SELECT max(id) AS maxid,pid FROM `u_b_history` where uid='1' GROUP BY `pid` ORDER BY `maxid` DESC LIMIT 5