You will need to use a grouping predicate such as setof/3 like this:
setof(Name/Type/X, relation(Name,Type,X), Set),
where Set would be the List of all possible combinations. However I am not too sure how to filter out those possibilities where X is less than the weight specified