We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SELECT COUNT( 0 ) ct, any_value ( store_id ) id, any_value ( store_name ) NAME, any_value ( rec.store_type ) stype, any_value ( DATE_FORMAT( rec.create_time, '%Y-%m-%d' )) dt, any_value ( 0 ) AS type FROM op_order_hotel_accommodation_rec rec INNER JOIN basic_hotel_info hotel ON hotel.id = rec.store_id WHERE rec.actual_checkin_time BETWEEN '2023-10-18' AND '2023-11-24' AND store_id = '1782421961759117546' GROUP BY id, dt, name, stype, type UNION SELECT COUNT( 0 ) ct, any_value ( store_id ) id, any_value ( store_name ) NAME, any_value ( rec.store_type ) stype, any_value ( DATE_FORMAT( rec.create_time, '%Y-%m-%d' )) dt, any_value ( 1 ) AS type FROM op_order_hotel_accommodation_abroad rec INNER JOIN basic_hotel_info hotel ON hotel.id = rec.store_id WHERE rec.actual_checkin_time BETWEEN '2023-10-18' AND '2023-11-24' AND store_id = '1782421961759117546' GROUP BY id, dt, name, stype, type;
提示错误信息: Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Aggregate expression is illegal in GROUP BY clause。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SELECT
COUNT( 0 ) ct,
any_value ( store_id ) id,
any_value ( store_name ) NAME,
any_value ( rec.store_type ) stype,
any_value (
DATE_FORMAT( rec.create_time, '%Y-%m-%d' )) dt,
any_value ( 0 ) AS type
FROM
op_order_hotel_accommodation_rec rec
INNER JOIN basic_hotel_info hotel ON hotel.id = rec.store_id
WHERE
rec.actual_checkin_time BETWEEN '2023-10-18'
AND '2023-11-24'
AND store_id = '1782421961759117546'
GROUP BY
id,
dt,
name,
stype,
type
UNION
SELECT
COUNT( 0 ) ct,
any_value ( store_id ) id,
any_value ( store_name ) NAME,
any_value ( rec.store_type ) stype,
any_value (
DATE_FORMAT( rec.create_time, '%Y-%m-%d' )) dt,
any_value ( 1 ) AS type
FROM
op_order_hotel_accommodation_abroad rec
INNER JOIN basic_hotel_info hotel ON hotel.id = rec.store_id
WHERE
rec.actual_checkin_time BETWEEN '2023-10-18'
AND '2023-11-24'
AND store_id = '1782421961759117546'
GROUP BY
id,
dt,
name,
stype,
type;
提示错误信息:
Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Aggregate expression is illegal in GROUP BY clause。
The text was updated successfully, but these errors were encountered: