Untitled

mail@pastecode.io avatar
unknown
plain_text
14 days ago
447 B
1
Indexable
Never
CREATE VIEW EmployeeDetailsInDelhi AS SELECT e.employee_id,CONCAT(e.first_name,' ', e.last_name) AS employee_name, e.phone_number, j.job_title, d.department_name, CONCAT(m.first_name,' ', m.last_name) AS manager_name FROM employees e JOIN departments d ON e.department_id=d.department_id JOIN jobs j ON e.job_id=j.job_id LEFT JOIN employees m ON e.manager_id= m.employee_id JOIN locations l ON d.location_id =l.location_id WHERE l.city = 'Delhi';
Leave a Comment