title: error when using limit with union all in NZSQL
body: <p>I have am attempting to randomly sample random entries for a one-week period.  In order to ensure that I have a balance of weekday and weekend entries, I have sketched out 2 separate sql statements as follows:</p>
  
  <pre><code>select * FROM admin.acct_activity
  where RANDOM() &lt;=1
          --weekday
          and extract(day from page_hit_ts) Between 6 and 10
  limit 500
  UNION all
  
  SELECT *
  FROM admin.acct_activity
  where RANDOM() &lt;=1
          --weekend
          and extract(day from page_hit_ts) Between 11 and 12
  limit 200
  /* to-do
   1. limit results for each query
   2. order query results by date*/
  </code></pre>
  
  <p>error message is:</p>
  
  <pre><code>"all" (at char 121) expecting a keyword (State:42000, Native Code: 1B)
  </code></pre>
  
  <p>this is in Netezza SQL (NZSQL)</p>
  
  <p>the limit statement in the first select statement seems to cause the error.  Any tips?</p>