title: Filtering out a row from return value
body: <p>I am currently creating a top 5 list which is ranked by value. I am passing <code>@InfoId = 12</code> which is returning the values as I am expecting. But I do not want to show the row that <code>@InfoId = @InformationId</code></p>
  
  <p>So for example, If I pass parameter 12 as <code>InfoId</code>; I do not want to show the first row in the table example below which `InformationId = 12.</p>
  
  <p>Here is an example of the return I am getting when running my select query </p>
  
  <pre><code>+------------------------------------+
  | StateId InformationId CurrentValue |
  +------------------------------------+
  | 1             12           453231  |
  | 1             10           394721  |
  | 1             341          309425  |
  | 1              21          308431  |
  | 1              73          301342  |
  +------------------------------------+
  </code></pre>
  
  <p>Here is an example of what I am expecting: </p>
  
  <pre><code>+------------------------------------+
  | StateId InformationId CurrentValue |
  +------------------------------------+
  | 1             10           394721  |
  | 1             341          309425  |
  | 1             21           309321  |
  | 1             73           308431  |
  | 1             62           301342  |
  +------------------------------------+
  </code></pre>
  
  <p>Here is my code:   </p>
  
  <pre><code>    @StateId int
      , @InfoId int    
      , @CurrentValue int  -- My new parameter 
  AS
  BEGIN       
          select      top 5
                      i.StateId,
                      i.InformationId,
                      i.CurrentValue,
  
          from        dbo.tblInformation i
  
          inner join  dbo.tblInformationAnalysis ia
          on          ia.StateId= i.StateId
          and         ia.InformationId= i.InformationId
          and         ia.CurrentValue= i.CurrentValue
  
          inner join  (
                      select  
                                  StateId,
                                  InformationId,
                                  CurrentValue,
                      from        dbo.tblInformationAnalysis
                      where       StateId = @StateID
  
                      group by    StateId,
                                  InformationId,
                                  CurrentValue,
                      ) via
          on          via.stateId= ia.stateid
          and         via.informationId= ia.informationId
          and         via.CurrentValue= ia.CurrentValue
  
          inner join  dbo.tblRetailData r
          on          r.stateId= i.stateid
          and         r.informationId= i.informationId
          and         r.CurrentValue= i.CurrentValue
  
          inner join  dbo.tblCounty c
          on          c.stateId= r.stateid
          and         c.informationId= r.informationId
          and         c.CurrentValue = 1
  
          inner join  dbo.tblRetailDataPublished rp
          on          rp.stateId= i.stateId
          and         rp.informationId= i.informationId
          and         rp.CurrentValue = i.CurrentValue 
  
          inner join  dbo.RetailCollection rc
          on          rc.stateId= i.stateId
          and         rc.informationId= i.informationId
  
          where       i.StateId= @StateId
          and         p.InformationId = @InfoId
  
  END
  </code></pre>