我正在处理以nunjucks为模板的SQL文件,就像这样:
SELECT
`foo`, COUNT(0) AS `count`
FROM `bar`
WHERE
{% if a and b %}
`biu` BETWEEN {{a}} AND {{b}} AND
{% elif a %}
`biu` >= {{a}} AND
{% elif b %}
`biu` <= {{b}} AND
{% endif %}
{{c}}
GROUP BY `status`
我想同时强调SQL语法和nunjucks语法。