use testdb;INSERT OVERWRITE TABLE method_count_debugselect method,count(1) as count,max(timestamp) as timestampfrom (select * from qa_log_debug where method is not null and method!='N/A' and timestamp>'${hivevar:myTimestamp}') my_debuggroup by method;