Question: 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

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!