Extract concrete tables out of query.