salary for employees before year 1990
Hi,
Notice that the salary only started from year 1990 onwards, may i know where are the salary before year 1990? From the t_dept_emp table, saw that there were from_date before 1990.
Thank you
3 answers ( 0 marked as helpful)
Hi Jaycus!
Thanks for reaching out.
You can apply the following query structure to the different tables to obtain the answer:
SELECT
*
FROM
table_name
WHERE from_date < 1990;
Hope this helps.
Best,
Martin
Hi Martin,
What i meant was that, there were employees with salary before the year 1990 as show in the t_dept_emp table, but why were they not considered when doing the comparison as shown in the solution video? from the solution video, the salary comparison only started from 1990 onwards.
Thank you.
Hi Jaycus!
Thank you very much for the clarification.
For two reasons.
- That data for employees whose contracts have started prior to 1990 is not available all relevant tables, and
- More importantly, to exercise on writing queries with a condition in MySQL.
Hope this helps.
Best,
Martin