## 1 Introduction
In Section 4, we describe the state-of-the-art techniques of in-network join processing proposed in the literature. In Section 5, we discuss the open issues with future research directions. Finally, we conclude in Section 6. **Figure 1.** More examples of joins in WSN applications suggested in the literature. The examples of join queries in the literature are _not_ shown. Refer to the referenced papers for them. Additional examples based on them in the same applications are given. In [2], a vehicle surveillance application is suggested as an example. In each region, a set of sensors are deployed to capture the data of the vehicles that pass the region. The captured data in each region is modeled as a view of the sensor relation. For two regions R1 and R2, let Vehicles1 and Vehicles2 denote the views for R1 and R2, respectively. A join query to retrieve the information of the vehicles that passed R1 and R2 during time interval [t1, t2] with a speed difference exceeding 50 km\(\cdot\)h\({}^{-1}\) can be expressed as follows [2]:  
**SELECT** V1_vehld_, V1_time_, V2_time_, V1_speed_, V2_speed  
**FROM** Vehicles1 **AS** V1, Vehicles2 **AS** V2  
**WHERE** V1_vehld_ = V2_vehld  
**AND** V1_time_ **IN** Time_Interval [t1, t2]  
**AND** V2_time_ **IN** Time_Interval [t1, t2]  
**AND** V2_time_ **_speed_ - V2_speed_ \(\big{|}>50\)  
**(a)**  
In [3, 4], the animal monitoring in a national park is suggested as an example. The park is the natural habitat of the animals. A set of sensors are deployed over the park to monitor them moving around. A join query to retrieve the count of the animals whose ID starts with an R (_i.e._, raptorial) that were in region R1 during time interval [t1, t2] and were in region R2 during time interval [t3, t4] can be expressed as follows [3, 4]:  
**SELECT** **COUNT**(**DISTINCT** S1_animal_ID**)  
**FROM** Sensors **AS** S1, Sensors **AS** S2  
**WHERE** S1_animal_ID** = S2_animal_ID**  
**AND** S1_location_ **IN** Region_Specification(R1)  
**AND** S2_location_ **IN** Region_Specification(R2)  
**AND** S1_timestamp_ **IN** Time_Interval [t1, t2]  
**AND** S2_timestamp_ **IN** Time_Interval [t3, t4]  
**AND** S1_animal_ID** **LIKE** R%  
In [7], climate research is suggested as an example. The sensor readings include humidity, pressure, temperature, _etc._ The correlations among these values between a pair of locations are of interest. A join query to retrieve a pair of locations not so distant from each other whose current precipitations differ such that one is higher than the seasonal average and the other is lower than that can be expressed as a one-shot join as follows [7]:  
**SELECT** S1_location_, S2_location_,  
**S1_precipitation_, S2_precipitation_**  
**FROM** Sensors S1, Sensors S2  
**WHERE** S1_precipitation < \(\alpha\)  
**AND** S2_precipitation > \(\alpha\)  
**AND** distance(S1_location_, S2_location) < \(\delta\)  
**ONCE**  
**(b)**  
**(c)**  
In [7], climate research is suggested as an example. The sensor readings include humidity, pressure, temperature, _etc._ The correlations among these values between a pair of locations are of interest. A join query to retrieve a pair of locations not so distant from each other whose current precipitations differ such that one is higher than the seasonal average and the other is lower than that can be expressed as a one-shot join as follows [7]:  
**SELECT** S1_location_, S2_location_,  
**S1_precipitation_, S2_precipitation_**  
**FROM** Sensors S1, Sensors S2  
**WHERE** S1_precipitation < \(\alpha\)  
**AND** S2_precipitation > \(\alpha\)  
**AND** distance(S1_location_, S2_location) < \(\delta\)  
**ONCE**  
**(d)**  
In [7], climate research is suggested as an example. The sensor readings include humidity, pressure, temperature, _etc._ The correlations among these values between a pair of locations are of interest.