Question

Use the N2 Corporation database tables to design the following subqueries: a) Display all employees’ ID,...

Use the N2 Corporation database tables to design the following subqueries:
a) Display all employees’ ID, names (Fname Lname format) and their department name who has the same department as Jinku Shaw’s department name.
SQL File: https://pastebin.com/tR98LUb3

0 0
Add a comment Improve this question Transcribed image text
Answer #1

I believe the query asks to filter out all employee IDs, names and their Departments who are in the same department as Jinku Shaw.

Since you haven't mentioned it, let's assume the name of the table to be empDB.

The subquery would be,

SELECT employeeID, employeeFName, employeeLName,employeeDept FROM empDB

WHERE employeeDept = (SELECT employeeDept WHERE employeeFName="Jinku" AND employeeLName="Shaw");

Add a comment
Know the answer?
Add Answer to:
Use the N2 Corporation database tables to design the following subqueries: a) Display all employees’ ID,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL y...

    Use the HR database for all the questions in this lab. For each item in this lab, paste the SQL you used to complete the task and the number of rows retrieved. Ensure you follow the coding standards listed in the ETSU SQL standards guide found on D2L. Save this document as a PDF and name it your_name_lab7.pdf Display the employees’ first name, last name and phone number of employees with salaries greater than 10,000 dollars. SELECT first_name, last_name, phone_number,...

  • Part II: Group-by and subqueries The following questions use the Spy and Sailors database. Write the...

    Part II: Group-by and subqueries The following questions use the Spy and Sailors database. Write the SQL for the following queries. 1) List the sailor id and name for each sailor who has reserved two different red boats. Make sure that each sailor id/name is listed at most once. You must use group by/having. 2) List the missions and their status for each team. 3) For each country in agent, list the country and the count of agents in the...

  • Q1: The following question are based on these database tables: EMPLOYEE FNAME MIDINT LNAME SSN BDATE ADDRESS SEX SALARY SUPER_SSN Dept_No James A Borg 123123123 Hous...

    Q1: The following question are based on these database tables: EMPLOYEE FNAME MIDINT LNAME SSN BDATE ADDRESS SEX SALARY SUPER_SSN Dept_No James A Borg 123123123 Houston, TX M 55000 Null 1 Franklin S Wong 234234234 Houston, TX M 40000 123123123 5 John Q Smith 345345345 Houston, TX M 30000 234234234 5 Jennifer L Wallace 456456456 Bellaire, TX F 43000 123123123 4 Alicia M Zalaya 567567567 Spring, TX F 25000 456456456 4 Ramesh R Narayan 678678678 Humble, TX M 38000 234234234...

  • 10. For each employee in the department with code ACCNT, find the employee ID and number...

    10. For each employee in the department with code ACCNT, find the employee ID and number of assigned hours that the employee is currently working on projects for other departments. Only report an employee if she has some current project to which she is assigned more than 50% of the time and the project is for another department. Report the results in ascending order by hours. 11. Find all departments where all of their employees are assigned to all of...

  • mySQL database question.. I have a database that has the following tables: User (Id, Name, Gender)...

    mySQL database question.. I have a database that has the following tables: User (Id, Name, Gender) Primary key = Id Friends (Id1, Id2, Startdate) Primary key = (Id1, Id2) Foreign keys are also Id1, Id2 pointing to User(Id) Comments (CommentId, Poster, Recipient, Text, PostDate) Primary key = (CommentId) Foreign Keys are Poster, Recipient pointing to User(Id) I need to answer the following queries: 3. Find users who have commented at least twice to the same user 4. For each user...

  • Lab 4 – Logical Design Introduction: This lab is designed to practice database design concepts. Submission:...

    Lab 4 – Logical Design Introduction: This lab is designed to practice database design concepts. Submission: For the scenario below, draw a logical design draft on the paper, and then draw the design in the computer using PG Modeler software. After that, export the model to PNG photo. Submit to Brightspace a word file that has a photo of the draft design (on the paper) and the PNG photo that is produced from the PG modeler. Database scenario: Assume that...

  • Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y dat...

    Q.5] Answer the following questions based on the company database (based on the homework assignment 2) y database (based on the homework assignment 2) 3 IPage 1. For each department whose average employee salary is more than $30,000, write a SQL statement to retrieve the department name and the number of employees working for that department 2. Write a SQL statement to retrieve first name, last name, and address of each employee who lives in Houston, TX. 3. Write a...

  • database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED...

    database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED BELOW CREATE TABLE Department ( DECIMAL(5) VARCHAR(30) CHAR(5) DATE NOT NULL NOT NULL NOT NULL * Department number /*Department name * Department manager number */ /Manager start date DNumber DName Manager MSDate CONSTRAINT Department_PK PRIMARY KEY(DNumber) CONSTRAINT Department_CK UNIQUE(DName) CREATE TABLE DeptLocation DECIMAL(5) VARCHAR(50) NOT NULL NOT NULL DNumber * Department number */ * Department location */ Address CONSTRAINT DeptLocation_PK PRIMARY KEY(DNumber, Address) CONSTRAINT...

  • Gives the departments, their ID, name and budget. d stands for department. Employees(eID, dID, eN...

    Please explain the questions with detailed explanations. For SQL, do not use inner join. Gives the departments, their ID, name and budget. d stands for department. Employees(eID, dID, eName, eSala e stands for employee ry) Gives the employees, their IDs, where they work, their names and salaries stands for supplier. and where they are located (city and state). Also tells which employees are contact persons for the suppliers Items( ID, siCode dlD, ¡Name, MSRP) | Gives the items and the...

  • For all problems, use the following schema: Musician(id, first_name, last_name, instrument, band_id) Band(id, name, years_together) Show(id,...

    For all problems, use the following schema: Musician(id, first_name, last_name, instrument, band_id) Band(id, name, years_together) Show(id, venue_id, date) Played_in(band_id, show_id) Venue(id, name, address) Album(id, name, year, band_id, genre_id) Genre(id, name, description) Song(id, name, album_id) Primary keys are in bold, foreign keys are in italics. For each problem, write a query once using relational algebra, and again using SQL. 12. Find the names of all bands that have a member who plays "Guitar", OR have a member that plays "Keyboard". 13....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT