0
0
DBMS Theoryknowledge~10 mins

Projection operation in DBMS Theory - Interactive Code Practice

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

Complete the SQL query to select only the 'name' column from the 'students' table.

DBMS Theory
SELECT [1] FROM students;
Drag options to blanks, or click blank then click option'
AWHERE
B*
Cstudents
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' selects all columns, not just 'name'.
Using table name instead of column name after SELECT.
2fill in blank
medium

Complete the SQL query to select the 'id' and 'email' columns from the 'users' table.

DBMS Theory
SELECT id, [1] FROM users;
Drag options to blanks, or click blank then click option'
Apassword
Bemail
Caddress
Dphone
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting unrelated columns like 'password' or 'phone'.
Forgetting to separate columns with commas.
3fill in blank
hard

Fix the error in the SQL query to select the 'title' column from the 'books' table.

DBMS Theory
SELECT [1] FROM books
Drag options to blanks, or click blank then click option'
Atitle;
Btitle
C*
Dbooks
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the semicolon at the end of the query.
Using table name instead of column name after SELECT.
4fill in blank
hard

Fill both blanks to select the 'first_name' and 'last_name' columns from the 'employees' table.

DBMS Theory
SELECT [1], [2] FROM employees;
Drag options to blanks, or click blank then click option'
Afirst_name
Bsalary
Clast_name
Ddepartment
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting columns unrelated to names.
Forgetting the comma between column names.
5fill in blank
hard

Fill all three blanks to select the uppercase 'city' name, the 'population', and only cities with population greater than 100000 from the 'cities' table.

DBMS Theory
SELECT [1](city) AS city_upper, [2] FROM cities WHERE population [3] 100000;
Drag options to blanks, or click blank then click option'
AUPPER
Bpopulation
C>
Dcity
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase function names or missing parentheses.
Selecting wrong columns or using wrong comparison operators.