Oracle: List the employees name and total salary of a year and yearly salary is more than $10000
Oracle Operator: Exercise-2 with Solution
Write a query to list the employees name and total salary of a year and yearly salary is more than $10000.
Sample table: employees
Sample Solution:
Oracle Code:
SELECT first_name, last_name, salary*12 "Yearly Salary"
FROM employees
WHERE (salary*12) >10000;
Output:
FIRST_NAME LAST_NAME Yearly Salary -------------------- ------------------------- ------------- Steven King 288000 Neena Kochhar 204000 Lex De Haan 204000 Alexander Hunold 108000 Bruce Ernst 72000 David Austin 57600 Valli Pataballa 57600 Diana Lorentz 50400 Nancy Greenberg 144096 Daniel Faviet 108000 John Chen 98400 ......................... 107 rows selected.
Pictorial Presentation:
Improve this sample solution and post your code through Disqus.
Previous: Write a query to list the name of all the employees who are working in department number 20.
Next: Write a query to list the employees name and salary who’s daily salary is more than $100.
What is the difficulty level of this exercise?
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/oracle-exercises/operator/oracle-operator-exercise-2.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics