SQL Challenge

One free burrito if you can find a way to rewrite this query without sub-selects or the use of the DISTINCT keyword.


SELECT DISTINCT
    t.id
FROM
    tag as t
JOIN
    item_prototype_tag as ipt ON ipt.tag_id = t.id
JOIN
    shop_item as si ON si.item_prototype_id = ipt.prototype_id
JOIN
    palette_item as pi ON pi.shop_item_id = si.id
WHERE
    pi.player_id = ?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>