SELECT IsMatAnalysis,pn.MIStatus,* FROM SL_mk_Schema.ProductNumber (nolock)as pn
LEFT JOIN SL_pe_Schema.MatAnalysis (nolock) as mat on mat.ProductNumberid=pn.ProductNumberid

where pn.IsMatAnalysis=1 and mat.AnalysisStatus=10

order by pn.createdon