This can be achieved fairly easy.
You can have multiple inputs with the same "type" e.g. jdbc.
just add those multiple times, is there a difference in the username you are using, or only the statement?
In the output box, you could do something like if "root" in jdbc_user { output 1 }
if the username is always the same I would go for a tagging, this would add an extra field to each of your line but, it will help you with the output. For each input you would need to add tags => "jdbc-1
afterwards you can do the same thing in the output with if "jdbc-1" in [tags]