How do I design this Draft Table and select from it?
With ts (u,t) as (
SELECT d.user_id, t.title t
FROM drafts d
 JOIN titles t ON t.id = d.tp_id AND d.t = 1),
ps (u,pc,pv) as (
SELECT d.user_id u, p.content pc, p.version pv
FROM drafts d
Left JOIN posts p ON p.id = d.tp_id AND d.t = 2)
select ts.t, ps.pc, ps.pv from ts
Left outer join ps on ts.u = ps.u /*
Union 
select ts.t, ps.pc, ps.pv from ps
Left outer join ts on ts.u = ps.u */
Where ts.u = 1
and ps.u = 1
Order by ts.t, ps.pc, ps.pv


See [ https://www.db-fiddle.com/f/weourGGnXWj2b6xu7mNfAp/2 ]