I think I now understand the principle of what you are trying to achieve and suspect you need to use what is called a cartesian query (no joins) and use criteria
Something like
Code:
SELECT C.Supervisor, C.Relao, C.Tipo, C.LojaMelo, C.Categoria, sum(V.Qtd) as Total
FROM Vendas V , Criteros C
WHERE (V.Relao=C.Relao OR C.Relao is Null) AND (V.Tipo=C.Tipo OR C.Tipo is Null) AND (V.LojaMelo=C.V.LojaMelo OR C.LojaMelo is Null) AND (V.Categoria=C.Categoria OR C.Categoria is Null)
GROUP BY C.Supervisor, C.Relao, C.Tipo, C.LojaMelo, C.Categoria
Edit:
You have not explained the full business rules but for example assuming if Relao is not null, then you are to ignore the values in Tipo and LojaMelo then the query would be something like
Code:
SELECT C.Supervisor, C.Relao, C.Tipo, C.LojaMelo, C.Categoria, sum(V.Qtd) as Total
FROM Vendas V , Criteros C
WHERE (V.Relao=C.Relao OR C.Relao is Null) AND (V.Tipo=C.Tipo OR C.Tipo is Null OR C.Relao is NOT Null) AND (V.LojaMelo=C.V.LojaMelo OR C.LojaMelo is Null OR C.Relao is NOT Null) AND (V.Categoria=C.Categoria OR C.Categoria is Null)
GROUP BY C.Supervisor, C.Relao, C.Tipo, C.LojaMelo, C.Categoria