MySQL metadata function to get projected column type in query?
Within MySQL, you can get this information by creating a temporary table, then using DESCRIBE on that temporary table:

CREATE TEMPORARY TABLE `temp`
SELECT ...
FROM ...
LIMIT 0;

DESCRIBE `temp`;


We cannot just use DESCRIBE on the original table because the column we want to know the type of is a calculated column, not something being directly pulled from a table.  Likewise, we cannot use DESCRIBE directly on the query, because DESCRIBE can only be used on tables.  Creating a temporary table solves both of those problems.