SQL Assignment 1
SQL Assignment 1
--- Q2. Show all the employee info if his/her salary is greater or equal to 100000.
SELECT*FROM Employee WHERE SALARY >= 100000;
--- Q3. Show all the employee info if his/her first name’s initial is ‘V’.
SELECT*FROM Employee WHERE FIRST_NAME LIKE 'V%';
--- Q4. Show all the employee info if he/she joined the company before 2018-01-01.
SELECT*FROM Employee WHERE STARTING_DATE < '2018-01-01';
--- Q5. Display only the names of employee who is in the Account Department.
SELECT FIRST_NAME, LAST_NAME FROM Employee WHERE DEPARTMENT =
'Account';
--- Q6. Display the average salary among all the Admin employees.
SELECT AVG(SALARY) FROM Employee WHERE DEPARTMENT = 'Admin';
--- Q8. Display the whole table using ascending order by employee’s last name (A - Z).
SELECT * FROM Employee ORDER BY LAST_NAME ASC;
--- Q9. Update the staring date of the employee who named Johnson to 2020-06-11.
UPDATE EMPLOYEE SET STARTING_DATE = '2020-06-11' WHERE FIRST_NAME =
'Johnson';