6. SQL Questions - Write up a School Registration DB Schema - Two table of Employee (ID, Name)/Salary History (EMP_ID, SALARY, SAL_BEGIN_DATE) - Find primary keys/foreign keys. - Find ID of employee whose salary decreased. - Find ID, total comp of employees - Find ID of employees who got only paid once.
Sigiloso
select * from employee e where e.id in(select s.empid from salary s, salary a where s.salary a.salary_bigin_date);