DROP VIEW IF EXISTS `ulog_city_join2`;
CREATE VIEW `ulog_city_join2` AS SELECT
	`ulog`.`oob_time_sec` AS `oob_time_sec`,
	`ulog`.`oob_prefix` AS `oob_prefix`,
	`ulog`.`ip_saddr` AS `ip_saddr`,
	`ulog`.`tcp_dport` AS `tcp_dport`,
	`city_join`.`latitude` AS `latitude`,
	`city_join`.`longitude` AS `longitude`,
	`city_join`.`country_name` AS `country_name`,
	`city_join`.`subdivision_1_name` AS `subdivision_1_name`,
	`city_join`.`city_name` AS `city_name`
FROM (`ulog` join `city_join` ON
		(
		mbrcontains(`city_join`.`network_poly`,geometryfromwkb(point(`ulog`.`ip_saddr`,0)))
		)
	 );