Write a query to display the names of all staff from IT Department ordered in ascending order. About the author Isabelle
Answer: SELECT name FROM employees WHERE department_id = “IT” ORDER BY department_id ASC; Explanation: It will check for department_id and if it is in IT then print the names in ascending order. Reply
Answer: SELECT staff name FROM staff WHERE department id IN (SELECT department id FROM departments WHERE department name=’IT’) ORDER BY staff name; Explanation: use under score between: 1 staff and name 2 department and id 3 department and name Reply
Answer: SELECT name
FROM employees
WHERE department_id = “IT”
ORDER BY department_id ASC;
Explanation: It will check for department_id and if it is in IT then print the names in ascending order.
Answer:
SELECT staff name FROM staff
WHERE department id
IN (SELECT department id FROM departments WHERE department name=’IT’)
ORDER BY staff name;
Explanation:
use under score between:
1 staff and name
2 department and id
3 department and name