派生テーブルを使用できます(FROM句のサブクエリ):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);
派生テーブルを使用できます(FROM句のサブクエリ):
select mydate, UNIX_TIMESTAMP(mydate)
from
(
SELECT
DATE(CONVERT_TZ(FROM_UNIXTIME(my_time + timezone_offset * 60), @@session.time_zone, '+00:00')) as mydate,
FROM my_table
);