How to pass a CTE in SQL to relational algebra, such as:
with publicacao_cte (nome,nr_publicacoes)
AS
(
select
candidato.nome,
Count(1) as nr_publicacoes
from
candidato,
cv,
ficha_inscricao,
publicacao_cv
where
candidato.bi = ficha_inscricao.bi and
candidato.bi = cv.bi and
cv.cod_cv = publicacao_cv.cod_cv
group by candidato.nome
)
I would also like to know how to do group by
and order by
in relational algebra.