<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
