
                select
                    XTH.XmlTemplateHtml_HashData as "Hash",
                    (XT.Count + EX.Count) as "Count"
                from
                    v_XmlTemplateHtml XTH
                    left join lateral (
                        select count(*) as Count
                        from v_XmlTemplate
                        where XmlTemplateHtml_id = XTH.XmlTemplateHtml_id
                        limit 1
                    ) as XT on true
                    left join lateral (
                        select count(*) as Count
                        from v_EvnXml
                        where XmlTemplateHtml_id = XTH.XmlTemplateHtml_id
                        limit 1
                    ) as EX on true
                where
                    XTH.XmlTemplateHtml_id = '450101000974652'
                limit 1
            
