Changes between Version 34 and Version 35 of CookBook join Temperature_CCM


Ignore:
Timestamp:
May 21, 2010 10:58:56 AM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBook join Temperature_CCM

    v34 v35  
    2323GROUP BY gridid, distance, gid, winter, summer,the_geom 
    2424);  
     25-- to extract only the min distance you need a join 
    2526 
     27select * from( 
     28select min(distance),gid,pk from temperature.tmp_ccm 
     29group by distance, gid,pk) as sub1 
     30join temperature.tmp_ccm t on sub1.pk=t.pk; 
     31 
     32-- if no column in geometry column add it using 
    2633INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, "type") 
    2734SELECT '', 'temperature', 'tmp_ccm', 'the_geom', ST_CoordDim(the_geom), ST_SRID(the_geom), GeometryType(the_geom)