Files
bl/help/查询多余精灵.sql
昔念 3947fbce4b
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
1
2026-02-07 00:18:14 +08:00

11 lines
296 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

SELECT
player_id,
COUNT(*) AS pet_count
FROM
"player_pet"
WHERE
(data->>'ID')::INT IN (273, 274) -- 适配JSONB的data字段取id并转整型
GROUP BY
player_id
HAVING
COUNT(*) >= 2; -- 筛选出拥有273/274宠物的玩家可根据需求调整为>=2同时拥有两者