Explanation:
{% if data[0]|length > 1 %} {# The platform returns a table for the explanation (e.g. MySQL), display all columns #}
{% for label in data[0]|keys %}
{{ label }}
{% endfor %}
{% for row in data %}
{% for key, item in row %}
{{ item|replace({',': ', '}) }}
{% endfor %}
{% endfor %}
{% else %} {# The Platform returns a single column for a textual explanation (e.g. PostgreSQL), display all lines #}
{%- for row in data -%} {{ row|first }}{{ "\n" }} {%- endfor -%}
{% endif %}