Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

With the file attached please answer in SQL form the following.

1. Which employees (by name) have degrees? (the "answer" is Smith, Johnson and Williams)

SELECT at least the employee first and last names - SELECT other columns you think would be meaningful.

HINT: do a JOIN between the employees and degrees table ON EMPLOYEE_ID...this will in effect help you translate the

EMPLOYEE_IDs in the degree table into names.

2. Which employees (by name) do not have degrees? (the "answer" is Jones, Green, Reagan, Washington)

SELECT at least the employee first and last names.

HINTS:

- do a join LEFT OUTER JOIN between employees table and degrees table, keeping the employees table on the "left"

- use "IS NULL" in the WHERE line: WHERE DEGREES.EMPLOYEE_ID Is Null;

3. Which employees (by name) have no children? (the "answer" is Johnson, Reagan and Washington) SELECT at least the

employee first and last names.

HINT: exact same concepts apply as in Question 2

4. Which employee(s) (by name) have 2 or more children? Show a count of the number of children that the employee has AND

only show those employees with 2 or more children. (the "answer" is Green (4 kids), Jones (2 kids), Smith (2 kids))

HINT: To do this really easily, I'd suggest using two queries. (and when you use the 1st query in the 2nd query, you can refer

to it just like referring to a table: query1.fieldname OK, first: who has two or more children? Just count the employee IDs that

appear in the children table more than once. At this point you should have as a query result the employee IDs and number of

kids. Treat that query as a table (like I explain above) and do an inner join using the employees table so that you can get the

employee names.

5. Which employee(s) (by name) have a degree and at least one child? (the "answer" is Smith and Williams)

HINT: If you did an inner join between the degree table and the children table you'd have the employee IDs of people with

degrees and children, wouldn't you? You could treat that query as a table and do an inner join with the employee table in order

to translate the employee IDs into names.

6. Which employee(s) (by name) have neither a degree nor a child? (the "answer" is Reagan and Washington)

HINT: An easy way to approach this: do an OUTER JOIN (also using "IS NULL") between the employee table and the degree

table to figure out who doesnt have a degree. Do the same with the employee table and the children table (to see who doesnt

have children). Do an inner join between the results of the 2 queries to see where they intersect (to show who doesnt have a

degree or a child).

7. For those employees who have kids, what is the average number of kids they have? (the "answer" is 2.25)

HINT: First do a grouping of employee IDs and their count in the children table. Then perform a query on these query results,

figuring the average of those counts.

 

Attachment:- WK4_DB_ACCESS2000.zip

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91603315
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Programming Language

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As