Answer the question
In order to leave comments, you need to log in
How to display all users who do not have a task in the "active" status?
Two tables. user and task. The task has two key fields, for this task - the status (new, in progress, rejected, completed) and the id of the performer.
It is necessary to display all users who currently do not have tasks in the statuses new and in progress.
I would be glad for a hint.
Answer the question
In order to leave comments, you need to log in
select *
from users
where not exists (
select 1
from tasks
where executor_id = users.id
and status in ('wip','new'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question