I'm creating a SQL layer from postgres database on geoserver using query and applying style on it.
I want to create two layer based on parameter passed into it, currently I'm handling this by creating two separate SQL layers.
First layer:
SELECT
activity_group_id, activity_name, application_status_code,
village_code, geom
FROM
dbt.dbt_point_primary
WHERE
village_code = '%vinCode%'
AND attributes = '%attribute%'
AND application_status_code = %statusCode%
Second layer:
SELECT
activity_group_id, activity_name, application_status_code,
village_code, geom
FROM
dbt.dbt_point_primary
WHERE
village_code = '%vinCode%'
AND attributes = '%attribute%'
AND application_status_code = %statusCode%
AND activity_group_id =