<?xml version="1.0"?>
<ZopeData>
  <record id="1" aka="AAAAAAAAAAE=">
    <pickle>
      <global name="SQL" module="Products.ZSQLMethods.SQL"/>
    </pickle>
    <pickle>
      <dictionary>
        <item>
            <key> <string>arguments_src</string> </key>
            <value> <string>column_value_list_list:list\r\n
column_id_list:list\r\n
group_by_expression\r\n
date\r\n
simulation_state=delivered\r\n
where_expression</string> </value>
        </item>
        <item>
            <key> <string>connection_id</string> </key>
            <value> <string>erp5_sql_connection</string> </value>
        </item>
        <item>
            <key> <string>id</string> </key>
            <value> <string>Resource_zGetFullInventoryDate</string> </value>
        </item>
        <item>
            <key> <string>src</string> </key>
            <value> <string encoding="cdata"><![CDATA[

SELECT\n
  MAX(date) as date,\n
  <dtml-var group_by_expression>\n
FROM\n
  inventory\n
WHERE\n
  is_full_inventory = TRUE\n
  <dtml-if simulation_state>\n
    AND simulation_state = <dtml-sqlvar simulation_state type="string">\n
  </dtml-if>\n
  <dtml-in prefix="loop" expr="_.range(_.len(column_id_list))">\n
    AND <dtml-var expr="column_id_list[loop_item]"> IN (\n
    <dtml-in expr="column_value_list_list[loop_item]">\n
      <dtml-sqlvar sequence-item type="int">\n
      <dtml-if sequence-end><dtml-else>,</dtml-if>\n
    </dtml-in>\n
    )\n
  </dtml-in>\n
  <dtml-if date>\n
    AND date <= <dtml-sqlvar date type="string">\n
  </dtml-if>\n
  <dtml-if where_expression>\n
    AND <dtml-var where_expression>\n
  </dtml-if>\n
GROUP BY\n
  <dtml-var group_by_expression>\n


]]></string> </value>
        </item>
        <item>
            <key> <string>title</string> </key>
            <value> <string></string> </value>
        </item>
      </dictionary>
    </pickle>
  </record>
</ZopeData>
