this is the query how can i write a expression rule for this and the result will be like below
Discussion posts and replies are publicly visible
Accessing the data from the database can be achieved in two ways in your case:
1. Query entity : Appian's OOB functionality to query a data from the connected DB tables and views
2. Query Database Smart Service: used to retrieve information from an external database using a SQL query, and update or create process variables using the query results. This activity also permits you to create tables and select, insert, and update rows in database tables from your process model.
Please refer this link for more info
docs.appian.com/.../Query_Database_Smart_Service.html