Given a table T, with 2 columns Item and RequiredParts.

Where Item is the name of an item and RequiredParts is the name of
a part that an Item depends on.

Example table T:
Item , RequiredParts
A , 1
A , 2
B , 1
B , 3
C , 1
C , 2
C , 3
D , 1
D , 2

So
A depends on 1 & 2
B depends on 1 & 3
C depends on 1, 2 & 3
D depends on 1 & 2

Can a query be written such that the input is
the available Required parts, and the result
is the list of items that have dependencies
fullfilled.

Ex. f(1) = null
f(1,2) = A,D
f(1,2,3) = C
f(1,3) = B