ERROR: column "id" specified more than once – when creating view – Postgresql
I wrote this code and it works: SELECT d1.*,d3.* FROM bdir_programmation.d_program AS d1 JOIN ( SELECT d_program.id,MAX(id_reg) AS maxv FROM bdir_programmation.d_program GROUP BY d_program.id) AS d2 ON d1.id=d2.id AND d1.id_reg=d2.maxv JOIN bdir_programmation.d_infra_progra d3 ON d1.id=d3.id; But when I want to…