title: What is "Select -1", and how is it different from "Select 1"?
body: <p>I have the following query that is part of a common table expression. I don't understand the function of the "Select -1" statement. It is obviously different than the "Select 1" that is used in "EXISTS" statements. Any ideas?</p>
  
  <pre><code>  select days_old, 
           count(express_cd),
           count(*),  
           case 
             when round(count(express_cd)*100.0/count(*),2) &lt; 1 then '0'      
             else '' 
           end ||
             cast(decimal(round(count(express_cd)*100.0/count(*),2),5,2) as varchar(7)) || 
             '%'   
    from foo.bar   
    group by days_old   
    union all  
    select -1, -- Selecting the -1 here
           count(express_cd),
           count(*),   
           case 
             when round(count(express_cd)*100.0/count(*),2) &lt; 1 then '0' 
             else ''
           end ||
             cast(decimal(round(count(express_cd)*100.0/count(*),2),5,2) as varchar(7)) || 
             '%'  
    from foo.bar   
    where days_old between 1 and 7
  </code></pre>