About this site

select ProductId, LongTitleEn,IPSNumber,ProdReleaseDate,ProductType,ReleaseType
from Products
where AccessLevel < 3 and
ProductId in (
select distinct P.ProductId
from Products P,
TableDimensions TD,
Variables V
where P.ProductId=TD.ProductId and
TD.VariableId=V.VariableId and
P.CensusYear=2016 and
StatusCode = 'R' and Products.ProdReleaseDate < getdate() and
P.ProductType not in (3,109444) and
P.ReleaseType not in (128) and
P.ProductId not in (-1) and
P.IPSNumber not like '97C%'
and LTrim(V.VariableDescEn)='Population, dwellings and households (8)'
)
order by LTrim(TitleEn)