取每个partyid的前三条数据:
SELECT * FROM partyphotos b
WHERE b.PartyId IN (SELECT PartyId FROM partyphotos)
GROUP BY
CONCAT(b.PartyId, b.Id % 3)
取每个partyid的前三条数据:
SELECT * FROM partyphotos b
WHERE b.PartyId IN (SELECT PartyId FROM partyphotos)
GROUP BY
CONCAT(b.PartyId, b.Id % 3)