Last answered:

17 May 2021

Posted on:

11 May 2021

0

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

image.png

3 answers ( 0 marked as helpful)
Instructor
Posted on:

14 May 2021

0

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

Posted on:

15 May 2021

0

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.

Instructor
Posted on:

17 May 2021

0

Hi Jaycus!

Thank you very much for the clarification.

For two reasons.

  1. That data for employees whose contracts have started prior to 1990 is not available all relevant tables, and
  2. More importantly, to exercise on writing queries with a condition in MySQL.

Hope this helps.
Best,
Martin

Submit an answer