Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9215107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:07:42+00:00 2026-06-18T02:07:42+00:00

Here is the teachers request with his following query as the answer: [Q12. Display

  • 0

Here is the teachers request with his following query as the answer:

[“Q12. Display all employees working for departments 10 and 60.”

mysql> select last_name, department_id
> from employees
> where department_id = 10 or department_id = 60;]

This is the result:



+-----------+---------------+
| last_name | department_id |
+-----------+---------------+
| Hunold    |            60 |
| Ernst     |            60 |
| Lorentz   |            60 |
| Whalen    |            10 |
+-----------+---------------+

In my opinion, a better question considering the information a person would want to display would be this: “Display all the employees working for departments 10 and display all of the employees working for department 60.” Under the questions current construction, it seems that he is asking to display only the employees who work for both departments, ie, employees who work for both 60 and 10 at the same time (or at least at different times during the day).

Here’s the table desc:

+----------------+--------------+------+-----+---------+-------+
| Field          | Type         | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+-------+
| Employee_id    | decimal(6,0) | NO   | PRI | NULL    |       |
| First_Name     | varchar(20)  | YES  |     | NULL    |       |
| Last_Name      | varchar(25)  | NO   |     | NULL    |       |
| Email          | varchar(20)  | YES  |     | NULL    |       |
| Phone_Number   | varchar(20)  | YES  |     | NULL    |       |
| Hire_Date      | date         | NO   |     | NULL    |       |
| Job_Id         | varchar(10)  | YES  |     | NULL    |       |
| Salary         | decimal(8,2) | YES  |     | NULL    |       |
| Commission_Pct | decimal(2,2) | YES  |     | NULL    |       |
| Manager_Id     | decimal(6,0) | YES  |     | NULL    |       |
| Department_Id  | decimal(4,0) | YES  |     | NULL    |       |
+----------------+--------------+------+-----+---------+-------+

Maybe I’m missing something here. Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:07:44+00:00Added an answer on June 18, 2026 at 2:07 am

    Under the questions current construction, it seems that he is asking to display only the employees who work for both departments, ie, employees who work for both 60 and 10 at the same time (or at least at different times during the day).

    Except, an employee can’t work in two departments with the given table structure (assuming it’s normalized).

    Have you tried:

    ... where department_id = 10 AND department_id = 60
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The site I'm working on involves teachers creating student objects. The teacher can choose
Here's my database structure: The SQL statement I'm using is: SELECT t1.Name AS Teacher_Name,
Here's my database structure: And here's the SQL statement I'm attempting: SELECT t1.Name AS
I have the following tables: Schools Teachers Courses XRefSchoolsTeachers XRefCoursesTeachers Now I am trying
Here is the scenario: I have a group of teachers teaching at the institute.
I'm working on kind of an educational site, where there are teachers and students
I am trying to pull data using an mysql query that requires that I
the tutorial here http://www.edumobile.org/android/android-beginner-tutorials/creating-image-gallery/ teaches how to put images from resources in gallery here's
I'm running through this tutorial found here: http://vb.net-informations.com/crystal-report/vb.net_crystal_report_from_multiple_tables.htm which teaches how to pass a
Here's the view: @if (stream.StreamSourceId == 1) { <img class=source src=@Url.Content(~/Public/assets/images/own3dlogo.png) alt= /> }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.