0
0
SQLquery~10 mins

Column aliases with AS in SQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to rename the column 'name' as 'employee_name'.

SQL
SELECT name [1] employee_name FROM employees;
Drag options to blanks, or click blank then click option'
AIS
BAS
CTO
DWITH
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'IS' or 'TO' instead of 'AS' for aliasing columns.
2fill in blank
medium

Complete the code to rename the column 'salary' as 'monthly_salary'.

SQL
SELECT salary [1] monthly_salary FROM payroll;
Drag options to blanks, or click blank then click option'
ATO
BIS
CBY
DAS
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'TO' or 'IS' instead of 'AS' for column aliasing.
3fill in blank
hard

Fix the error in the code to correctly alias the column 'age' as 'user_age'.

SQL
SELECT age [1] user_age FROM users;
Drag options to blanks, or click blank then click option'
AAS
BWITH
CTO
DIS
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'IS' or 'TO' instead of 'AS' causes SQL syntax errors.
4fill in blank
hard

Fill both blanks to rename 'price' as 'item_price' and 'quantity' as 'item_quantity'.

SQL
SELECT price [1] item_price, quantity [2] item_quantity FROM inventory;
Drag options to blanks, or click blank then click option'
AAS
BIS
CTO
DWITH
Attempts:
3 left
💡 Hint
Common Mistakes
Using different keywords for each alias or incorrect keywords.
5fill in blank
hard

Fill all three blanks to rename 'first_name' as 'fname', 'last_name' as 'lname', and 'dob' as 'birth_date'.

SQL
SELECT first_name [1] fname, last_name [2] lname, dob [3] birth_date FROM people;
Drag options to blanks, or click blank then click option'
AAS
BIS
CTO
DWITH
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing alias keywords or using incorrect ones like 'IS' or 'TO'.