query
RESULTSET
query
  LEVELID LEVELNAME TERRITORYID TERRITORYNAME ZIPCODEMAPPING
1 436 Local Markets 4590 Upstate NY STANDARD
CACHED false
EXECUTIONTIME 36
SQL select ter.territoryId, ter.name territoryName, lvl.levelId, lvl.name levelName, lvl.zipCodeMapping from tbl_TER_Territories ter inner join tbl_TER_TerritoryLevels lvl on lvl.levelId = ter.levelId and lvl.ownerId = ter.ownerId and lvl.fsl_tablecode = ter.fsl_tablecode and lvl.BrokerLevel = 1 and lvl.zipCodeMapping = 'STANDARD' inner join tbl_TER_ZipCodeLink zcl on zcl.territoryId = ter.territoryId inner join tbl_UT_ZipCodes_3d z3 on z3.zip3d_id = zcl.zip3d_id where ter.ownerId = 14 and ter.fsl_tablecode = 'BRO' and z3.zipcode_3d = '142'