This will hopefully get you started:
select p.id, p.portlet_code, p.source,
g.portlet_instance_id, g.principal_type, g.principal_id,
substr(q.nsql_text, 1, 300) || '...' as nsql_preview
from cmn_portlets p
join cmn_grids g on p.id = g.portlet_id
join cmn_nsql_queries q on g.dal_id = q.id and g.dal_type = 'nsql'
If you can perform a Clarity SQL Trace of the General properties page of a portlet where its Data Provider is showing, the trace file generated would yield the queries that Clarity itself uses to derive that information from the database. Neither that or this query provided is intended to cover all bases of the datamodel involved though.