Can someone help me with the SQL for these queries
Answers
Answer:
Find Solutions For Your Homework
Find solutions for your homework
engineeringcomputer sciencecomputer science questions and answersCan Someone Help Me Create These Sql Queries?(Database Code Is Located Beneith The Questions) ...
Question: Can Someone Help Me Create These Sql Queries?(Database Code Is Located Beneith The Questions) 3.1. Create SQL To Update The Address For A Specific Customer. Include A Select Statement Before And After The Update. 3.2. Create SQL To Increase The Hourly Rate By $2 For Each Worker That Has Been An Employee For At Least 1 Year. Include A Select Before And ...
This problem has been solved!
See the answer
Can Someone help me create these sql queries?(Database code is located beneith the questions)
3.1. Create SQL to update the address for a specific customer. Include a select statement before
and after the update.
3.2. Create SQL to increase the hourly rate by $2 for each worker that has been an employee for at
least 1 year. Include a select before and after the update. Make sure that you have data so that
some rows are updated and others are not.
3.3. Create SQL to delete a specific job that has associated work hours and materials assigned to it.
Include a select before and after the statement(s).
4. Queries (5 points each)
4.1. Write a query to list all jobs that are in process. Include the Job ID and Description, Customer
ID and name, and the start date. Order by the Job ID.
4.2. Write a query to list all complete jobs for a specific customer and the materials used on each
job. Include the quantity, unit cost, and total cost for each material on each job. Order by Job
ID and material ID. Note: Select a customer that has at least 3 complete jobs and at least 1
open job and 1 in process job. At least one of the complete jobs should have multiple materials.
If needed, go back to your inserts and add data.
4.3. This step should use the same customer as in step 4.2. Write a query to list the total cost for all
materials for each completed job for the customer. Use the data returned in step 4.2 to validate
your results.
4.4. Write a query to list all jobs that have work entered for them. Include the job ID, job
description, and job status description. List the total hours worked for each job with the lowest,
highest, and average hourly rate. The average hourly rate should be weighted based on the
number of hours worked at that rate. Make sure that your data includes at least one job that
does not have hours logged. This job should not be included in the query. Order by highest to
lowest average hourly rate.
4.5. Write a query that lists all materials that have not been used on any jobs. Include Material ID
and Description. Order by Material ID.
4.6. Create a query that lists all workers with a specific skill, their hire date, and the total number of
jobs that they worked on. List the Skill ID and description with each row. Order by Worker ID.
4.7. Create a query that lists all workers that worked greater than 20 hours for all jobs that they
worked on. Include the Worker ID and name, number of hours worked, and number of jobs
that they worked on. Order by Worker ID.
4.8. Create a view that includes the labor costs associated with each job. Include Customer ID and
Name.
4.9. Use the View from 4.8 to create a query that includes the total labor cost for each customer.
Order by Customer ID.
4.10. Write a query that lists all customers who are located on 'Main Street'. Include the customer Id
and full address. Order by Customer ID. Make sure that you have at least three customers on
'Main Street' each with different house numbers. Make sure that you also have customers that
are not on 'Main Street'.
CREATE TABLE TCustomers