25 Mar 2021

Posted on:

15 Jan 2021

2

# Hi, i think this practice is wrong here in assignment select distinct

Hi, i think this practice is wrong here in assignment select distinct

Instructor
Posted on:

16 Jan 2021

0

Hi Juan!

Thanks for reaching out.

Can you please support your question with pointing out what exactly you think is wrong? Is it a technical issue that you are facing or is there anything about the content that you think is incorrect? Only then will we be able to provide a specific answer. Thank you.

Best,
Martin

Posted on:

19 Jan 2021

0

HI, this is the practice "How many annual contracts with a value higher than or equal to \$100,000 have been registered in the salaries table? How many managers do we have in the "employees" database? Use the star symbol (*) in your code to solve this exercise.Resources for this assignment:"
SELECT DISTINCT

hire_date

FROM

employees;

I think it dont make sense, this is not the practice for this part of the course.

Posted on:

25 Feb 2021

0

HI,
The solution for this assignment is wrong. The code does not correspond with the task content. Also, the result obtained from the solution code is different than in the task.

Why does the task ask for a view and not the procedure?

Regards,
Maciej

Posted on:

03 Mar 2021

0

The solution proposed isn't coherent with the question asked!

Posted on:

25 Mar 2021

2

The assignment wants us to find
a)The number of annual contracts >= \$100k registered in salaries

My solution : SELECT * FROM salaries WHERE salary >='100000'
Some employees have had several contracts  of over \$100k that have been renewed over the years.

If i wanted to find how many employees have had contracts of over \$100k my solution would have been: SELECT DISTINCT emp_no FROM salaries WHERE salary >='100000'

b) Number of managers in the employees database,
my solution: SELECT * FROM dept_managers to get 24 managers.

The solution provided for this exercise answers the question, "Which (distinct) dates were the employees hired?" We would use SELECT DISTINCT for this question because more than 1 employee may have the same hire date thus SELECT DISTINCT hire_date FROM employees;

To conclude, the solution provided for this assignment did not answer the select distinct practice question.