Wireless Sensor Networks (WSNs) become more and more popular nowadays. They are applied not only in civilian but also in military. However, when having numerous data, we have to preserve them secretly and can acknowledge which information we need. In this paper, while keeping data privacy, we focus on four queries: value query, range query, outlier query and hot items. Moreover, we can identify outlier values with high accuracy not only in WSNs but also in data stream. In particular, if we deal with less than 200000 values, it just takes less than 0.03 seconds when we find up to 3 hot items or 3 outlier values, and 50 seconds when we use the value query.