Complete the code to assign an alias c to the table customers.
SELECT * FROM customers [1];In MySQL, to give a table an alias, you use AS alias_name. So AS c correctly assigns the alias c to customers.
Complete the code to select the name column from the table employees using alias e.
SELECT [1] FROM employees AS e;When a table has an alias, you refer to its columns using the alias. So e.name selects the name column from the alias e.
Fix the error in the code by completing the alias for the table orders as o.
SELECT o.order_id FROM orders [1];The correct syntax to alias a table is AS alias. So AS o correctly aliases orders as o.
Fill both blanks to alias tables products as p and categories as c in the JOIN.
SELECT p.product_name, c.category_name FROM products [1] JOIN categories [2] ON p.category_id = c.id;
Each table is aliased using AS alias. So AS p and AS c correctly alias products and categories.
Fill all three blanks to alias students as s, select s.name as student_name, and filter where s.age is greater than 18.
SELECT [1] AS student_name FROM students [2] WHERE [3] > 18;
The table students is aliased as s using AS s. The column s.name is selected and renamed as student_name. The filter uses s.age to check age greater than 18.