At present, precision agriculture and smart agriculture are the hot topics, which are based on the efficient data collection by using wireless sensor networks (WSNs). However, agricultural WSNs are still facing many challenges such as multitasks, data quality, and latency. In this paper, we propose an efficient solution for multiple data collection tasks exploiting edge computing-enabled wireless sensor networks in smart agriculture. First, a novel data collection framework is presented by merging WSN and edge computing. Second, the data collection process is modeled, including a plurality of sensors and tasks. Next, according to each specific task and correlation between task and sensors, on the edge computing server, a double selecting strategy is established to determine the best node and sensor network that fulfills quality of data and data collection time constraints of tasks. Furthermore, a data collection algorithm is designed, based on set values for quality of data. Finally, a simulation environment is constructed where the proposed strategy is applied, and results are analyzed and compared to the traditional methods. According to the comparison results, the proposal outperforms the traditional methods in metrics.