Sql Excel : Nonequijoins

A nonequijoin is a join where none of the conditions is equality between two
columns. Nonequijoins are unusual. This is fortunate because there are many
fewer performance tricks available to make them run quickly. Often, a nonequijoin
is actually a mistake and indicates an error.
Note that when any of the conditions are equality, and the conditions are
connected by AND, the join is an equijoin. Consider the following question about
Orders: How many orders are greater than the median rent where the customer
resides? The following query answers this question:
SELECT zc.stab, COUNT(*) as numrows
FROM Orders o JOIN
ZipCensus zc
ON o.zipcode = zc.zcta5 AND
o.totalprice > zc.mediangrossrent
GROUP BY zc.stab

The JOIN in this query has two conditions, one specifies that the zip codes are
equal and the other specifies that the total amount of the order is greater than the
median rent in the zip code. This is still an example of an equijoin because of the
condition on zip code.