I'm pretty nobbish in this type of SQL so please try not to be rough for me :)
Well.. I have to convert numeric field to date, than count some upload data and group by table.
Numeric_column like 20121121133549 which is probably like YYYYMMDDHHMMSS
Other columns are acces_point_type and data_uplink.
My goal is to convert numeric to Date (without time HHMMSS), count data_uplink and group by acces_point_type.
Simple group by would not be that problem but whole idea of convert data and connect it with casted date format and group by this, is pretty dark magic for me.
Any help would be appreciated.
PS: Sorry for my terrible English :/
This should work, extract the date portion and modify it to match the internal storage:
cast(col / 1000000 - 19000000 as date)