Answer the question
In order to leave comments, you need to log in
How to write a query in PHP database?
DB tables:
user(id, name) - employee.
object(id,user_id) - the object is attached to the worker. A worker can have multiple objects.
rabota(id,data,object_id,sum) - work is attached to an object. There may be multiple jobs on site.
The task is to find the best employee of the month.
It turns out it is necessary to find all works on all objects workers.
The output should turn out: Peter earned 30,000 rubles.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question