public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: [email protected]
To: [email protected]
Subject: Re: select from one table with help of another table
Date: Tue, 16 Jun 2020 14:03:33 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Tue, 2020-06-16 at 08:37 +0000, [email protected] wrote:
> I’m trying to get the fid (integer) of objects in table line where the geometry (postgis) is inside another geometry from another table (polygon),
> But I would not like to get the objects with the highest fid inside the polygons of table buffered.
> I’ve tried this:
>
> SELECT fid FROM
> "line" USING “polugon” AS b WHERE
> ST_Contains(b.geom, "line".geom) AND "line".fid NOT IN (SELECT MAX("line".fid)
> );
>
> It complains about “USING” in line 2.
> Anyone who knows how I should do it instead?
What if a "line" is contained in more than one "polugon", and
in one of these it has the highest "fid", but not in the others?
Should that be included in the results?
Yours,
Laurenz Albe
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: select from one table with help of another table
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox