Last answered:

18 Sept 2023

Posted on:

14 Sept 2023

0

Resolved: I am trying to follow the example in the lecture

Is there a problem in this code here?

5 answers ( 1 marked as helpful)
Posted on:

15 Sept 2023

0

This code is running perfectly for me. Try to restart your workbench.



   

Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

15 Sept 2023

0

Hi,


When you use GROUP BY clause, you should also use aggregate function. Otherwise, if you have, let say, 3 rows with the same emp_no but 3 different hire dates, which one will be chosen?

Posted on:

17 Sept 2023

0

It is picking first row data for 3 rows with the same emp_no but 3 different hire dates. 

Posted on:

17 Sept 2023

0

We encountered a similar situation during our HAVING lecture when some individuals experienced this error. Instructor provided the following statement,

Please, execute the following command:
set @@global.sql_mode := replace(@@global.sql_mode, 'ONLY_FULL_GROUP_BY', '');
Then, you have to restart the Workbench in order to save the new settings.


Instructor
Posted on:

18 Sept 2023

0

Hi everyone!
Thanks for reaching out.


@: David

The first one will be chosen. But, you are right that we should use an aggregate function with the GROUP BY clause.

@: Essien

Please, use the code provided by Muhammad in order to resolve error message 1055.

Then, restart the Workbench in order to save the new settings.


Hope this helps.
Best,
Tsvetelin

Submit an answer