<dtml-comment>
title:
connection_id:MySQL
max_rows:100000
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>portal_type:list</params>
SELECT DISTINCT 
	catalog.relative_url AS relative_url,
	catalog.portal_type AS portal_type,
	movement.variation_text AS variation_text
FROM
	movement, catalog
WHERE
	catalog.uid = movement.resource_uid
AND	movement.is_accountable = 1
<dtml-if portal_type>AND (<dtml-in portal_type> catalog.portal_type = <dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else> OR </dtml-if></dtml-in>
) </dtml-if>