Query parameters
Query parameters are used to provide a user that runs a report with a list of values that are returned from a query. When the report is run, the user must enter a value from the list.
The following example illustrates a list that is used when a report
is run.

The query that is used in this example, demonstrates how to query
the database and return a list of all audit event names and audit
event definition IDs.
select distinct audit_event_definition_id, name from audit_event_definition order by
audit_event_definition_id

Note: If the query contains two columns, Cloud Identity Service displays
the value of the second column as the parameter, and sends the value
of the first column to the report. For example, the query
select
distinct audit_event_definition_id, name from audit_event_definition_id
shows
the list of audit event names as available parameters, and sends audit_event_definition_id
of
the chosen audit event to the report. Multiselect
Multiselect displays a list of possible values, allowing the user to select more than one value. The selected values are passed to the report as a string in the following format, value 1, value 2, value 3, and so on.
To pass multiselect values in this example, the following sample SQL might be used.
select ae.user_name as "who", (select name from audit_event_definition where
audit_event_definition.audit_event_definition_id = ae.audit_event_definition_id)
as "what", (select auditeventdetail(ae.audit_event_id)) as "where",
aed.event_timestamp as "when" from audit_event_data aed, audit_event ae
where aed.audit_event_id=ae.audit_event_id
and ae.audit_event_definition_id=($P!{Audit_Events})order by aed.event_timestamp