Hive queries for creating tables and querying