I want to create a line between points 104 and 74. This works :
select 1 as axe, make_line(p1.geometry, p2.geometry) as geometry
from MR200_amers_plan p1, MR200_amers_plan p2
where p1.matricule = 104 and p2.matricule = 74
Now I can't get the same result with the aggregate function. I added a column ligne holding the line number, and tried:
select p.ligne, make_line(p.geometry) as geometry from
(select ligne, geometry from MR200_amers_plan where matricule
in ('104', '74') order by gid DESC) as p group by p.ligne
I can't figure out the reason even according to http://postgis.net/docs/manual-2.1/ST_MakeLine.html or http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.3.0.html#p5