Question: (worker_id, event_date) is the PRIMARY KEY. based on the table above, Write an SQL query that reports for each worker and date, how many tasks

 (worker_id, event_date) is the PRIMARY KEY. based on the table above,

(worker_id, event_date) is the PRIMARY KEY.

based on the table above, Write an SQL query that reports for each worker and date, how many tasks finished so far by the worker. That is, the total number of tasks finished by the worker until that date.

answer should look like this:

Write an SQL query that reports for each worker and date, how

worker_id | computer_id | event_date | tasks 1 | 11 21 31 31 1 | 2 | 2019-03-01 | 2 | 2019-05-02 3 2020-06-25 1 | 2019-03-02 | 4 | 2020-07-03 | 3 2020-08-02 5 3 1 0 2 4 worker_id | event_date | tasks_finished_so_far 1 | 2019-03-01 | 1 | 2019-05-02 | 1 | 2020-08-02 | 2 | 2020-06-25 | 3 | 2019-03-02 3 | 2020-07-03 | 5 8 12 1 0 N

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!