Question: Hello, I need help that involves creating data for the tables implementing in Milestone 2 , then writing the SQL queries that use that data

Hello, I need help that involves creating data for the tables implementing in Milestone 2, then writing the SQL queries that use that data to create reports for users.
Add records to each table sufficient to demonstrate your reports.
Write the SQL query(ies) needed to allow the user to generate a report that shows the progress on a project similar to
Write the queries to allow users to generate two other reports needed by GCS management. Each of these reports should use at least three of the tables in your database. (10 points)
Milestone 3 Report -- The milestone report (in MS Word) consisting of:
A description of the data entered into the tables and why it is adequate for demonstrating the sufficiency of the design through the reports selected. Note: be sure to indicate the numbers of rows in related tables.The SQL query for the report in Table P5.11c and a screenshot or other evidence of the data returned from the query using the DBMS.Describe two reports that users will need in this situation, these reports must use at least three tables from your database. For each report show the SQL query that provides the data for the report and a screenshot or other evidence of the data returned from the query using the DBMS.
what I have thus far:
SELECT
p.ProjectID,
p.ProjectName,
COUNT(t.TaskID) AS TotalTasks,
SUM(CASE WHEN t.TaskStatus = 'Completed' THEN 1 ELSE 0 END) AS CompletedTasks,
SUM(t.HoursLogged) AS TotalHours,
COUNT(DISTINCT e.EmployeeID) AS EmployeesInvolved
FROM
Project p
JOIN
Task t ON p.ProjectID = t.ProjectID
JOIN
Employee e ON t.AssignedEmployeeID = e.EmployeeID
GROUP BY
p.ProjectID, p.ProjectName
ORDER BY
p.ProjectID;
SELECT
e.EmployeeID,
e.EmployeeName,
t.TaskID,
t.TaskDescription,
tl.HoursLogged,
t.TaskStatus
FROM
Employee e
JOIN
Task t ON e.EmployeeID = t.AssignedEmployeeID
JOIN
TimeLog tl ON t.TaskID = tl.TaskID
WHERE
t.TaskStatus IN ('In Progress', 'Completed')
ORDER BY
e.EmployeeID, t.TaskID;
SELECT
p.ProjectID,
p.ProjectName,
d.DepartmentName,
SUM(tl.HoursLogged) AS TotalHours,
p.Budget - SUM(tl.HoursLogged * d.HourlyRate) AS BudgetRemaining
FROM
Project p
JOIN
Task t ON p.ProjectID = t.ProjectID
JOIN
Employee e ON t.AssignedEmployeeID = e.EmployeeID
JOIN
Department d ON e.DepartmentID = d.DepartmentID
JOIN
TimeLog tl ON t.TaskID = tl.TaskID
GROUP BY
p.ProjectID, p.ProjectName, d.DepartmentName, p.Budget
ORDER BY
p.ProjectID, d.DepartmentName;

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 Programming Questions!