Write a query in SQL to list the id, name, salary, and location of the employees working at PERTH,or MELBOURNE with an experience over 10 years
- برمجة سي كيو ال sql
- 2021-09-06
- mhanasmh00489829403
الأجوبة
SELECT e.emp_id,
e.emp_name,
e.dep_id,
e.salary,
d.dep_location
FROM employees e,
department d
WHERE e.dep_id = d.dep_id
AND d.dep_location IN ('PERTH',
'MELBOURNE')
AND EXTRACT(MONTH
FROM age(CURRENT_DATE, hire_date)) > 10;
Sample Output:
emp_id | emp_name | dep_id | salary | dep_location --------+----------+--------+---------+-------------- 64989 | ADELYN | 3001 | 1700.00 | PERTH 65271 | WADE | 3001 | 1350.00 | PERTH (2 rows)
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال