Complete the code to create a new database named 'sales_db'.
CREATE DATABASE [1];The command CREATE DATABASE sales_db; creates a new database named 'sales_db'.
Complete the code to create a table named 'customers' with columns 'id' (int) and 'name' (string).
CREATE TABLE [1] (id INT, name STRING);The table name 'customers' is used in the CREATE TABLE statement to define the new table.
Fix the error in the code to create a database named 'analytics'.
CREATE [1] analytics;The correct keyword to create a database is DATABASE. Using CREATE DATABASE analytics; creates the database.
Fill both blanks to create a table named 'employees' with columns 'emp_id' (int) and 'emp_name' (string) in the database 'company_db'.
USE [1]; CREATE TABLE [2] (emp_id INT, emp_name STRING);
First, switch to the database company_db using USE company_db;. Then create the table employees with the specified columns.
Fill all three blanks to create a partitioned table named 'logs' with columns 'log_id' (int), 'log_message' (string), partitioned by 'log_date' (string).
CREATE TABLE [1] (log_id INT, log_message STRING) PARTITIONED BY ([2] STRING) STORED AS [3];
The table name is logs. It is partitioned by the column log_date of type STRING. The storage format is TEXTFILE.