title: Checking sequence with SQL query
body: <p>I have a table orders that keeps all order from all our stores.
  I wrote a query to check the sequence orders for each store.
  It looks like that.</p>
  
  <pre><code>select WebStoreID, min(webordernumber), max(webordernumber), count(webordernumber) 
  from orders
  where ordertype = 'WEB' 
  group by WebStoreID
  </code></pre>
  
  <p>I can check it all orders are present with this query. web ordernumber is number from 1...n.</p>
  
  <p>How can I write query to find missing orders without joining to temporary/different table?</p>