Questionaire Set 1 - SQL 1
Questionaire Set 1 - SQL 1
Candidate Name:
Relevant Years of Exp:
Contact No:
Date:
--------------------------------------------------------------------------------------------------
----------------------
2. HAVING clause –
SELECT * FROM EMPLOYEE
GROUP BY DepartmentID
HAVING Name = ‘Bob’;
3. What is the view? Please write create view syntax. (Please refer the
table in question no 5)
Answer:
A View is nothing but a virtual table which doesn’t store data itself but represents
data from one or more underlying tables. It is often used for security purpose,
simplify complex queries or represent data in more meaningful way to users.
Changes done in underlying tables are reflected in view.
Example: CREATE VIEW DEPT AS
SELECT Name, DepartmentID
FROM Employee
WHERE DepartmentID = 10;
4. What is CTE and write down syntax? (Please refer the table in question no-5)
5. Write the query to populate the Department Name for the Employee names in the table.
Employee Table:
Department:
DepartmentID DepartmentName
10 HR
20 IT
30 Finance
40 Sales
Answer:
SELECT E.Name, D.DepartmentName
FROM Employee E
JOIN Department D
ON E.DepartmentID= D.DepartmentID;
----------------------------------------------
END----------------------------------------------------------
Test Score:
Answer
Skill Answers
Format
SQL Rating (1-5)
Python Rating (1-5)
Excel Rating (1-5)
Visualization Rating (1-5)
Media/Advertising Rating (1-5)
Troubleshooting and
Rating (1-5)
Critical Thinking
Communication Rating (1-5)
Client Facing Experience Rating (1-5)
Total Experience Years
L1 Feedback:
L2 Feedback:
Overall Feedback: