WITH intersected_data AS (
    SELECT
        ST_Intersection(
            ST_GeomFromText('POLYGON ((109.51142919411961 18.322906808030652, 109.51382391646248 18.323160890707612, 109.51812407725552 18.318549085673954, 109.52096478636398 18.31677099219241, 109.52639647097506 18.31534849921383, 109.52681717214205 18.307529099172545, 109.51255360145637 18.30725787066725, 109.50859860338323 18.311988017573178, 109.51142919411961 18.322906808030652))', 4326),
            dk.geom
        ) AS intersection_geom,
        dk.lbmc
    FROM
        "TB_GHDK" AS dk
    WHERE
        ST_Intersects(
            ST_GeomFromText('POLYGON ((109.51142919411961 18.322906808030652, 109.51382391646248 18.323160890707612, 109.51812407725552 18.318549085673954, 109.52096478636398 18.31677099219241, 109.52639647097506 18.31534849921383, 109.52681717214205 18.307529099172545, 109.51255360145637 18.30725787066725, 109.50859860338323 18.311988017573178, 109.51142919411961 18.322906808030652))', 4326),
            dk.geom
        )
)
SELECT
    lbmc,
    merged_geom,
    ST_Area(merged_geom::geography) AS area
FROM (
    SELECT
        lbmc,
        ST_Union(intersection_geom) AS merged_geom
    FROM
        intersected_data
    GROUP BY
        lbmc
) AS unioned_data
ORDER BY
    lbmc;