sql.dql.select_aggregate.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <sql-cases> <sql-case id="select_sum" value="SELECT SUM(user_id) AS user_id_sum FROM t_order" /> <sql-case id="select_count" value="SELECT COUNT(*) AS orders_count FROM t_order" /> <sql-case id="select_count_with_sub" value="SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id > 1-1" /> <sql-case id="select_count_with_sub_with_whitespace" value="SELECT COUNT(*) AS orders_count FROM t_order WHERE order_id > 1 - 1" /> <sql-case id="select_max" value="SELECT MAX(user_id) AS max_user_id FROM t_order" /> <sql-case id="select_min" value="SELECT MIN(user_id) AS min_user_id FROM t_order" /> <sql-case id="select_avg" value="SELECT AVG(user_id) AS user_id_avg FROM t_order" /> <sql-case id="select_count_with_binding_tables_without_join" value="SELECT COUNT(*) AS items_count FROM t_order o, t_order_item i WHERE o.user_id = i.user_id AND o.order_id = i.order_id AND o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ?" /> <sql-case id="select_count_with_binding_tables_with_join" value="SELECT COUNT(*) AS items_count FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ?" /> <sql-case id="select_count_with_escape_character" value="SELECT COUNT(`order_id`) AS orders_count FROM t_order" db-types="MySQL" /> </sql-cases>