add query for hive