Table filtering for multiquery

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>