我有一个包含三个字段 ip_address、contary_name、region_name 的表。
ip_address countary_name region_name
100.12.34.19 xyz jk
100.12.34.23 xyz jk
170.63.34.41 abc mn
170.63.34.42 abc mn
170.63.34.43 abc mn
所以我需要一些这样的查询:
select distinct substring('rex_exp') as common_ip,
substring('rex_exp') as ip_part,countary_name,region_name
from table;
输出是
common_ip ip_part countary_name region_name
100.12.34. 19,23 xyz jk
170.63.34. 41,42,43 abc mn