<p>I would say yes, I can't think of a situation where it is not possible. WHERE in it self can be replaced with a join:</p>

<pre><code>select ... from A where x=10
&lt;=&gt;
select ... from A join ( values (10) ) B (x) on A.x = B.x
</code></pre>

<p>Perhaps off topic, but for transformations in general Vadim Tropashko (<a href="http://arxiv.org/abs/cs/0501053" rel="nofollow">http://arxiv.org/abs/cs/0501053</a>) shows that it is possible to reduce the set of classic relational algebra operators to two binary operations: natural join and generalized union </p>
Factor where clauses into subqueries
<p>I'm wondering if its always possible in SQL to factor a where condition through a join to a subquery. For instance, if I have</p>

<pre><code>select ... from a join b on ... where p and q
</code></pre>

<p>and <code>p</code> pertains only to <code>a</code>, <code>q</code> to <code>b</code>, then can I always rewrite as?</p>

<pre><code>select ... from (select ... from a where p) as a join (select ... from b where q) as b on ...
</code></pre>

<p>Thanks!</p>

<p>[Notes: 1) I'm using postgres in case this affects the answer. 2) Readability is not an important consideration, as these are automatically generated queries. <strong>Edit</strong>: 3) I'm not only interested in inner join but other joins as well.]</p>