16 lines
302 B
Go
16 lines
302 B
Go
|
|
SELECT
|
||
|
|
t1.*
|
||
|
|
FROM player_item t1
|
||
|
|
JOIN (
|
||
|
|
SELECT
|
||
|
|
player_id,
|
||
|
|
item_id
|
||
|
|
FROM player_item
|
||
|
|
WHERE is_vip = 0
|
||
|
|
GROUP BY player_id, item_id
|
||
|
|
HAVING COUNT(*) > 1
|
||
|
|
) t2
|
||
|
|
ON t1.player_id = t2.player_id
|
||
|
|
AND t1.item_id = t2.item_id
|
||
|
|
WHERE t1.is_vip = 0
|
||
|
|
ORDER BY t1.player_id, t1.item_id, t1."createTime";
|