Rama the same connection can only either have filter by condition or query. You cannot use both on the same connection.
Having said that, whatever filter condition you applied can be replicated by query. The latter is more powerful than filter by condition.
On the same spreadsheet, however, you can have several connections with either query or filter by condition!