Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. SQL queries (40 points total, 5 points each query) Write SQL query statements to query the following Freelancer database Tables. Customers hire programmers (also

image text in transcribedimage text in transcribed

3. SQL queries (40 points total, 5 points each query) Write SQL query statements to query the following Freelancer database Tables. Customers hire programmers (also called freelancers) to do some programming projects. "cig" is Customer ID. Fid" is the ID of a freelancer. pid" is the ID of the project, "sig" is the id of a certain kind of skill the freelancer possesses. DevAmount" means how much a project gets paid; "rating" is the customer's average satisfaction rate with a freelancer. Rating is a numerical value from 1 to 10 with 10 representing most satisfactory Customers sid foane lgame dob phone zipcode Freelancers fid foane Inamoe rating sid Skills sid SkillName Projects eid sid fid Broject Name Starting date Ending date DavAmount 1. Show project names whose pay amount is more than $1000 2. Show freelancer names who started projects before 2020 3. Show freelancer names who received total payment more than $5000 4. Show the average rating received by each freelancer in descending order of the average rating 5. Using subquery, show all the employee's names who have a SkillName "Database Administration" 6. Find the total number of all the freelancers (without duplicate entry) in each skill category. 7. Using SQL, add a foreign key constraint to Projects. If a freelancer's id is changed in the Freelancer's table, the Freelancer's id is set to null in the Projects table. Add another foreign key constraint to Projects. If a Customer's id is deleted in the Customer's table, the Customer's id is also deleted in the Projects table. 8. Find all the customers whose project was done by a freelancer whose average rating is 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions

Question

=+What is the procedure for labor relations in the workplace?

Answered: 1 week ago

Question

=+ Are ballots compulsory?

Answered: 1 week ago