Reduce and Query 1st version