I almost always alias my tables by default with something short (Usually 1 - 3 characters), but not my subselects for an in list. In this case I would do d1, d2, ps, and p for the different tables. I then do my best to use the same alias in all my queries. I am also big on formatting the SQL here is how I would write what you have for readability
SELECT *
FROM deal AS d1
WHERE d1.deal.id IN (
SELECT DISTINCT deal.id
FROM deal AS d2 INNER
JOIN partner_share AS ps
INNER
JOIN partner AS p
ON ps.partner_id = p.partner.id
WHERE p.team_id = 12345
AND (ps.type = 1 AND d2.external_id IS NOT NULL
OR ps.type = 2 AND d2.external_id IS NULL)
)