Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This table shows the activities of workers and how many tasks they finished by the date. Each row is a record of a worker who

This table shows the activities of workers and how many tasks they finished by the date. Each row is a record of a worker who logged in a computer and finished a number of tasks (it could be 0, no task was finished) on that date. Some sample records are listed below:

image text in transcribed

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.

image text in transcribed

worker_id | computer_id | event_date | tasks + -+ 5 3 1 11 11 21 3 3 1 11 2 | 2019-03-01 2 | 2019-05-02 3 | 2020-06-25 1 | 2019-03-02 4 | 2020-07-03 3 | 2020-08-02 2 4 Expected result: worker_id | event_date | tasks_finished_so_far 5 8 1 | 2019-03-01 1 | 2019-05-02 1 | 2020-08-02 2 | 2020-06-25 3 | 2019-03-02 3 | 2020-07-03 12 1 2

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

More Books

Students also viewed these Databases questions

Question

=+e. Construct the boxplot for this data set.

Answered: 1 week ago

Question

Why should correlations never be ignored?

Answered: 1 week ago