Created
August 19, 2016 14:08
-
-
Save AbelVM/05b21cb82e805a57f0b014fcd49f7f35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
input_query as( | |
SELECT | |
* | |
FROM airports | |
order by cartodb_id asc | |
limit 1000 | |
), | |
moran as( | |
SELECT | |
* | |
FROM cdb_crankshaft.CDB_AreasOfInterestLocal( | |
'SELECT * FROM airports order by cartodb_id asc limit 1000', | |
'elevation_ft', | |
'knn', | |
5, | |
99, | |
'the_geom', | |
'cartodb_id') | |
) | |
SELECT input_query.*, moran.* | |
FROM | |
input_query, | |
moran | |
WHERE moran.rowid = input_query.cartodb_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment