Reading up data based on query.