It is not necessarily true that we do not pass parameters to a view. It is quite true that we can not set parameters (well, at least in my experiments did not roll). But who said we need it?
Look at the view, with some joins:
CREATE
VIEW 'view_ranking_candidato' AS
SELECT
'candidato'.'nick' AS 'nick',
'candidato'.'nomeCompleto' AS 'nomeCompleto',
SUM('desafios'.'pontuacao') AS 'totalPontos'
FROM
((('acertoCandidato'
JOIN 'respostaSubmetida' ON (('respostaSubmetida'.'idRespSubmetida' = 'acertoCandidato'.'idRespostaSubmetida')))
JOIN 'desafios' ON (('desafios'.'idDesafio' = 'acertoCandidato'.'idDesafio')))
JOIN 'candidato' ON (('candidato'.'idCandidato' = 'respostaSubmetida'.'idCandidato')))
GROUP BY 'candidato'.'idCandidato'
If you want to do a parametrized search, just include the where clause in the select that will consume the view:
select * from view_ranking_candidato ---> vai executar a view sem parâmetros
select * from view_ranking_candidato Where nick='tester' ---> vai executar a view incluindo a cláusula where.
Adapted from:
link