## 1 Introduction  
In wireless sensor networks (WSNs), sensor readings can be modeled as tuples of a _logical relation_ which is physically distributed across the sensor nodes, and the retrieval of sensor readings can be expressed in relational queries. A _join_ query that matches the tuples from two or more relations when they satisfy the given predicate conditions is one of major operations in relational databases. So is the join in WSN applications, which include vehicle surveillance and tracking, animal habitat monitoring, environment monitoring, home and commercial building automation, precision agriculture, and water resource management, to name just a few. An example scenario of a join query in a river ecosystem monitoring application for water resource management, for instance, is as follows: the water quality management department is concerned about the pollution of a river, monitoring the pH values measured throughout the river. After detecting that the pH value in a region of the river has decreased below a certain threshold, which means that the acidity of the water is higher and the department needs to be alerted, the department is interested in checking whether such a phenomenon is now locally confined to the region or is possibly about to occur in the neighboring regions as well. The department would issue a query, \"retrieve pH value and location for the neighboring regions of the river where the pH value decrease is detected.\" This query can be declaratively expressed as a join, and given in SQL-like syntax as: \begin{tabular}{l} **SELECT** S\({}_{1}\)_pH_, S\({}_{1}\)_location_, S\({}_{2}\)_pH_, S\({}_{2}\)_location_ \\
**FROM** Sensors **AS** S\({}_{1}\), Sensors **AS** S\({}_{2}\) \\
**WHERE** S\({}_{1}\)_pH_ **<** \(\tau\) **AND** distance(S\({}_{1}\)_location_, S\({}_{2}\)_location_) **<** \(\delta\) \\ \end{tabular}  where Sensors in the FROM clause is the logical relation that comprises the river data tuples sampled by the sensors deployed along the river, and the condition with the function distance() in the WHERE clause is the join predicate. More examples of joins in WSN applications suggested in the literature are given in Figure 1.  
In WSNs, data transmission is orders of magnitude more costly than processing on a sensor node [1]. Given a join query, therefore, _in-network_ processing where join operators are pushed into the network such that the amount of data transmission could be considerably reduced is essential. Although the processing of joins in the conventional centralized or distributed databases is a well-known problem, that in WSNs has quite different requirements and challenges. First, the lack of statistics on sensor readings makes query optimization very difficult. Second, a naive implementation could expend much energy in transmitting data, severely shortening the network lifetime. Third, limited resources (computing power and memory) in sensor nodes make ordinary algorithmic approaches infeasible. Fourth, node or link failures could greatly undermine the correctness of the join result. In this paper, we present a survey of the state-of-the-art techniques of in-network join processing in WSNs. This topic is a young one, receiving much attention in recent years. We think that a meaningful amount of work has been accumulated in the literature, and that now it is timely to collate the various techniques for classification and comparison. To the best of our knowledge, our survey is the first one on this topic. The rest of this paper is organized as follows: in Section 2, we present the background materials for this paper: sensor networks, their modeling as a relational database, declarative query expression, external join, in-network query processing, join types and implementations in the conventional databases, and sliding window join. In Section 3, we give an overview of join processing in WSNs: requirements and challenges, join types, and components of join implementation.