Cross apply in postgres?

Asked

Viewed 34 times

1

I have the following situation

CROSS APPLY (select top 1 seq.id_prod,
                   seq.id_emp,
                   seq.localizacao,
                   seq.localizacao_modulo,
                   seq.localizacao_nivel,
                   seq.localizacao_rua,
                   seq.localizacao_vao,
                   qtde
            from eq_prod_qtde seq                       
            where seq.id_prod = p.id_prod
              and seq.id_emp = pc.id_emp) ES 
CROSS APPLY (select sum(qtde)
                   qtde
            from eq_prod_qtde seq                       
            where seq.id_prod = p.id_prod) ES1  

However I am having difficulty in making this same process for postgres.

  • Welcome to the site, first of all, it is worth remembering that here is not a forum. It is important to understand this to improve your participation on the site in future questions.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.