Untitled
public text v1 · immutable(
SELECT armor.bodypart,count(armor.bodypart) AS qtd
FROM trade_item2
LEFT JOIN armor ON armor.item_id=trade_item2.Id
WHERE armor.name!=''
GROUP BY armor.bodypart
)
UNION
(
SELECT weapon.bodypart,count(weapon.bodypart) AS qtd
FROM trade_item2
LEFT JOIN weapon ON weapon.item_id=trade_item2.Id
WHERE weapon.name!=''
GROUP BY weapon.bodypart
)