Changes between Version 43 and Version 44 of CookBook join Temperature_CCM
- Timestamp:
- Jun 16, 2010 4:06:13 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified CookBook join Temperature_CCM
v43 v44 20 20 21 21 CREATE TABLE temperature.tmp_ccm as( 22 SELECT distinct on(gid) gid, gridid, sub.winter, sub.summer, min(distance) as distance, the_geom FROM (23 SELECT gridid,t.winter, t.summer, gid, CAST(distance(c.the_geom,t.the_geom) as decimal(15,1)) as distance, t.the_geom FROM temperature.tmp AS t22 SELECT distinct on(gid) gid, gridid, sub.winter, sub.summer, sub.winter1977, min(distance) as distance, the_geom FROM ( 23 SELECT gridid,t.winter, t.summer, t.winter1977, gid, CAST(distance(c.the_geom,t.the_geom) as decimal(15,1)) as distance, t.the_geom FROM temperature.tmp AS t 24 24 INNER JOIN ccm21.riversegments c ON ST_DWithin(c.the_geom,t.the_geom,70000) 25 25 ) AS sub 26 GROUP BY gid, distance, gridid, winter, summer, the_geom26 GROUP BY gid, distance, gridid, winter, summer,winter1977, the_geom 27 27 ); 28 28