Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Latest commit

 

History

History
31 lines (27 loc) · 970 Bytes

TEACHER.md

File metadata and controls

31 lines (27 loc) · 970 Bytes

Instructions

Getting a clean list of POIs given an operator.

SELECT
  PoiName, ZoneCode, PoiDescription, PoiTypeId, UsageTypeId, PropertyTypeId, 
  PrimaryBrandId, PrimaryBrandKeyId, pm.OperatorMasterId, PoiStatusId, gm.Latitude, gm.Longitude
  FROM PoiMaster pm
  LEFT JOIN GisLinkage gl ON gl.PoiMasterId = pm.Id
  LEFT JOIN GisMaster gm on gm.Id = gl.GisMasterId
  WHERE pm.OperatorMasterId = 196
  AND pm.PoiDescription != ''
  AND gm.Latitude is not null
  LIMIT 20

Getting an ugly list of POIs given an operator

SELECT
  PoiName, ZoneCode, PoiDescription, PoiTypeId, UsageTypeId, PropertyTypeId, 
  PrimaryBrandId, PrimaryBrandKeyId, pm.OperatorMasterId, PoiStatusId, gm.Latitude, gm.Longitude
  FROM PoiMaster pm
  LEFT JOIN GisLinkage gl ON gl.PoiMasterId = pm.Id
  LEFT JOIN GisMaster gm on gm.Id = gl.GisMasterId
  WHERE pm.OperatorMasterId = 3338001
  -- AND pm.PoiDescription != ''
  -- AND gm.Latitude is not null
  LIMIT 215