thanks James.
For the queries below, I got the birth_date as varchar type, but why this column can be compared as date type?


apache drill (dfs.pyh)> select typeOf(birth_date) from foodmart limit 1 ;
+---------+
| EXPR$0  |
+---------+
| VARCHAR |
+---------+
1 row selected (0.234 seconds)

apache drill (dfs.pyh)> select * from foodmart where birth_date > '1970-01-01';
+-------------+--------------------+-------------------------+------------+---------+---------------------+
| employee_id | full_name | position_title | birth_date | salary | education_level |
+-------------+--------------------+-------------------------+------------+---------+---------------------+
| 9 | Brenda Blumberg | Store Manager | 1979-06-23 | 17000.0 | Graduate Degree | | 12 | Jewel Creek | Store Manager | 1971-10-18 | 8500.0 | Graduate Degree | | 13 | Peggy Medina | Store Manager | 1975-10-12 | 15000.0 | Bachelors Degree |


Regards



On 2022/4/5 2:37 下午, James Turton wrote:
select typeOf(employee_id) from foodmart limit 1

Reply via email to