I am trying to find out the way to filter out records based on query but I have no clue how to do it in same query:
Query:select unnest(array_cat(a.object_references, a.dependent_object_references)) from mgmt.log_metrics a
Input::Select will provide records in below format:
(a,b,r,)
(c,d,r,)
(e,l,v,)
(g,h,i,f,)
In input r stands for table,v stands for view and f stands for function and in output I need to filter based on r so that I will get all the table records but not sure how to achieve it using above query.Can anyone please help.
Output:
(a,b,r,)
(c,d,r,)
I have tried to apply where clause and also tried to put substring but after doing research found that substring will not work directly with unnest.Also tried Right function but I am new so not sure how to achieve this hence need help with this.
user26309744 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.