title: Filter not working on a join between three tables
body: <p>I'm having difficulty joining data from three tables.</p>
  
  <p>This is an anonymous shopping cart for a real estate company. The inmuebles table holds the details of the properties.
  If some wants to have a viewing I create a record in the temppropertylist table using their asp.net sessionid, and in the 
  anonymouscart table I add a record of the property they are interested in.</p>
  
  <p>I'm showing this in a gridview control so when I rebind it I need a query that pulls the information from the three tables,
  showing all the property data, and whether or not each property has been selected for viewing. To do that it's sufficient
  to have either the propertyid or a null from the anonymouscart to be joined to each record in the inmuebles table as I can use it to toggle a checkbox.</p>
  
  <p>What I found was my original query was pulling information from the anonymous cart for all of the related records in the
  temppropertylist table so I'm trying to filter that using the sessionid in the join but it now only shows inmuebles records where there 
  is a related record in anonymouscart.</p>
  
  <p>I've read every listing I could on Stackoverflow but I can't get my head around what I'm doing wrong</p>
  
  <pre><code>CREATE TABLE [dbo].[anonymouscart](
  [Id] [int] IDENTITY(1,1) NOT NULL,
  [temppropertylist_id] [int] NOT NULL,
  [timestamp] [datetime2](7) NOT NULL,
  [propertyid] [int] NULL
  ) ON [PRIMARY]
  
  Id  temppropertylist_id timestamp                     propertyid
  40  38                  2013-09-24 08:24:00.0772687 2
  39  37                  2013-09-24 08:03:56.1163987 1
  
  CREATE TABLE [dbo].[temppropertylist](
  [ID] [int] IDENTITY(1,1) NOT NULL,
  [sessionID] [nvarchar](50) NULL,
  [userID] [int] NULL,
  [timestamp] [datetime2](7) NOT NULL
  ) ON [PRIMARY]
  
  ID  sessionID                   userID  timestamp
  37  jgyo5i4vne35bcolow23je1q    NULL      2013-09-24 08:02:29.1129679
  38  uuoawmav4jhi3hy3g3v4vr3o    NULL      2013-09-24 08:23:58.8604375
  
  CREATE TABLE [dbo].[Inmuebles](
  [Id] [int] IDENTITY(1,1) NOT NULL,
  [Title] [nvarchar](99) NULL,
  [tipodemanda] [nvarchar](10) NULL,
  [Descripcioni] [nvarchar](max) NULL,
  [PrecioVenta] [int] NULL,
  [Imagen] [nvarchar](255) NULL,
  [onhold] [bit] NOT NULL,
  ) ON [PRIMARY]
  </code></pre>
  
  <p>My query:</p>
  
  <pre><code>SELECT  inmuebles.title
      ,   inmuebles.Descripcioni
      ,   inmuebles.ID
      ,   inmuebles.PrecioVenta
      ,   inmuebles.imagen
      ,   MIN(anonymouscart.propertyID) AS propertyID
  FROM inmuebles
  FULL OUTER JOIN anonymouscart ON Inmuebles.ID = anonymouscart.propertyID
  FULL OUTER JOIN temppropertylist ON anonymouscart.temppropertylist_id = temppropertylist.ID 
      AND (temppropertylist.sessionid = 'uuoawmav4jhi3hy3g3v4vr3o')
  WHERE tipodemanda = 'venta'
      AND onhold = 0
  GROUP BY
          inmuebles.title
      ,   inmuebles.Descripcioni
      ,   inmuebles.ID
      ,   inmuebles.PrecioVenta
      ,   inmuebles.imagen
  </code></pre>
  
  <p>This returns:</p>
  
  <pre><code>title        Descripcioni     id PrecioVenta imagen propertyid
  'Two for One' 'This is a ....' 2  110000     NULL   2
  </code></pre>
  
  <p>But what I want is all the records from the inmuebles table with nulls for propertyid</p>
  
  <p>This the data from the inmuebles table:</p>
  
  <pre><code>title           Descripcioni         id    PrecioVenta   imagen                     onhold  tipodemanda
  'Casa Bodega',  'This is a...',     1,   11000,        '1_27152256.jpg',0,              'venta'
  'Two for One',  'This is a...',   2,     110000,          NULL,             0,         'venta'
  </code></pre>