By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,613 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,613 IT Pros & Developers. It's quick & easy.

How do I do the spatial join?

P: 1
I'm trying to select just some buldings within a polygon.
I want to get the polygon in fastkart.ak layer that have the kommunkod = 2085.

I want all data from that are within the polygon.
I'm quite new to sql and can't figuare out how to do this.

I've added a picture with database and my sql so far.

SELECT * as by
(SELECT kommunkod
FROM fastkart."ak" as ak
WHERE kommunkod = '2085')
FROM fastkart."by" by
WHERE ST_Intersects(by.geom,ak.geom)

Can anyone help me?
Attached Images
File Type: jpg Skärmklipp.jpg (35.0 KB, 90 views)
Mar 6 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.