Using Filters to replicate SQL query's output

Hello,

I’m trying to get the output of a SQL query I’m running but having issues.

The query looks something like this:

select attributes from identityiq.identityiq.spt_link where application = '<enter application>' and attributes like '<enter attribute>';

How would something like this be written using Filter? Additionally, would anything need to be different if I were trying to return the Link.id?

Thank you in advanced!