create view template_view (id, name, description, is_staged) as select t.id,t.name, t.description, false as is_staged from template t left join template_staging ts on t.name = ts.name and ts.name is null
Does that work? I've only seen that type of logic written as-