我的查询sql 如下:
select a.users_id,a.product_id,a.`insert_time`,a.`in_money` ,@rownum:= 1 +@rownum as rownum from investors a
where (a.users_id,a.product_id) in (select users_id,product_id from investors group by users_id,product_id having count(*)>1 )
and a.`product_id` IN ( SELECT id FROM product where `product_type` IN ('0','2','3'))
ORDER BY a.`users_id`, a.`product_id`,a.`insert_time`
得出的结果集合:如图片所示
我想获取标记中的数据,这sql应该怎么写?