wiki:oid/WorkLog/09-02-05

Version 9 (modified by jazz, 16 years ago) (diff)

--

2009-02-05

  • 原本想說要把 location1 跟 location2 裡的資料切成 lat1, lng1, lat2, lng2,做好之後才發現原來國榮已經做了 maincase_new 的整理,因此接下來就先分析一下資料。
    SELECT data_type.serial AS type_id, data_type.name AS
    TYPE , maincase_new.owner_org, maincase_new.name, maincase_new.description, maincase_new.loc1_lon, maincase_new.loc1_lat, maincase_new.website, maincase_new.start_time
    FROM data_type, maincase_new, maincase_detail
    WHERE maincase_detail.maincase_id = maincase_new.serial
    AND maincase_detail.type_id = data_type.serial
    ORDER BY type_id, owner_org, loc1_lon, loc1_lat;
    
  • 資料拓墣
    SELECT DISTINCT data_type.serial AS type_id, data_type.parent_id, data_type.name AS
    TYPE , maincase_new.owner_org
    FROM data_type, maincase_new, maincase_detail
    WHERE maincase_detail.maincase_id = maincase_new.serial
    AND maincase_detail.type_id = data_type.serial
    ORDER BY type_id, owner_org
    
    GraphViz image
  • 現有資料經緯度範圍
    SELECT max( loc1_lon ) , max( loc1_lat ) , max( loc2_lon ) , max( loc2_lat ) , min( loc1_lon ) , min( loc1_lat ) , min( loc2_lon ) , min( loc2_lat )
    FROM maincase_new
    
max(loc1_lon) max(loc1_lat) max(loc2_lon) max(loc2_lat) min(loc1_lon) min(loc1_lat) min(loc2_lon) min(loc2_lat)
123.60018 35.41830 123.60018 35.41830 0.00000 -0.34000 0.00000 -0.34000