【发布时间】:2016-07-18 20:38:50
【问题描述】:
我有一个包含这些列的文件(制表符分隔)
hit_stamp x_id column_to_encode type count
2016-02-19 11:00:39 3479 1727468938147435143 display 1
2016-02-19 11:00:43 3479 8993948836180821483 display 1
2016-02-19 11:00:45 3479 5429425032128142743 display 1
2016-02-19 11:00:46 3479 1221384347847832843 display 1
2016-02-19 11:00:46 3479 2242413443751657343 display 1
2016-02-19 11:00:46 3479 4803565579589481863 display 1
:
:
是否可以使用 bash 或一些 linux 命令将“column_to_encode”中的长值编码为 base 36?
当我从数据库中提取数据时,我也不介意这样做。 这是我使用的查询:
select hit_stamp, x_id, column_to_encode, type, count(1) count from xyzTable group by hit_stamp, x_id, column_to_encode, type;
有没有办法可以在查询本身中将 column_to_encode 转换为 base 36?
【问题讨论】: