Last answered:

29 May 2024

Posted on:

02 May 2023

0

emp_no < '110010'

use employees;

select e.*,d.*
from employees e
cross join 
departments d
where emp_no < '110010';


why is this not valid

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

03 May 2023

1

Hi Abdelrahman!
Thanks for reaching out.


It is because you used another emp_no in the WHERE clause.

Please, use the following code:

WHERE
    e.emp_no < 10011;


Hope this helps.
Best,
Tsvetelin

Posted on:

03 May 2023

0

Thank you for your concern

Instructor
Posted on:

10 May 2023

0

Hi Abdelrahman!
You are very welcome!
Best,
The 365 Team

Posted on:

26 Aug 2023

0

I've identified an anomaly in the database: certain employees are being assigned to multiple departments on the same hire date, which is not expected. This could indicate a data issue or error. I recommend investigating and rectifying this to maintain data accuracy.


when i follow this query 


use employees;

select e.*,d.*
from employees e
cross join 
departments d
WHERE
    e.emp_no < 10011; for task 2

Instructor
Posted on:

29 May 2024

0

Hi Aadil!
Thanks for reaching out.


The database we’re working with is purely for learning purposes and isn't a real one. It's designed to help you practice and understand SQL queries. So, some of the anomalies you’re seeing, like employees being assigned to multiple departments on the same hire date, are likely there intentionally or just part of the exercise.

These kinds of issues give you a great opportunity to develop your problem-solving skills and learn how to handle data inconsistencies. In real-life databases, making sure the data is accurate is super important, and being able to spot and fix these kinds of anomalies is a valuable skill to have. So, take this as a chance to practice and get better at writing queries that can clean up and manage data properly.


Hope this helps.
Best,
Tsvetelin

Submit an answer