422,764 Members | 1,289 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,764 IT Pros & Developers. It's quick & easy.

How do I do the spatial join?

P: 1
Hello!
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 fastkart.by 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, 47 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.