DB Error: syntax error:SELECT COUNT(*) AS order_count, goods_code, goods_name, price, SUM(price_tax) + SUM(system_price_tax) AS price_tax_all, SUM(order_details_count) AS order_details_count, SUM(quantity) AS quantity, tax_type FROM "order" INNER JOIN (SELECT order_id, goods_code, goods_name, price, COUNT(*) AS order_details_count, SUM(price_tax * quantity) AS price_tax, SUM(system_price_tax * quantity) AS system_price_tax, SUM(quantity) AS quantity, tax_type FROM order_delivery INNER JOIN order_details ON order_delivery.order_delivery_id = order_details.order_delivery_id INNER JOIN goods ON order_details.goods_id = goods.goods_id WHERE goods.genre_id LIKE '%,3,%' AND goods.gift_genre_id LIKE '%,1,%' AND goods.status_flg = '0' AND goods.giftnavi_flg = '0' AND goods.catalog_flg = '0' AND goods.sendday != '1' AND NOW() BETWEEN goods.start_date AND goods.end_date GROUP BY order_id, goods_code, goods_name, price, tax_type) AS order_delivery ON "order".order_id = order_delivery.order_id WHERE status_flg IN (0, 20) AND "order".site = '1' AND TO_CHAR("order".add_date, 'YYYY-MM-DD') >= '2024-08-23' AND "order".add_date <= NOW() AND genre IN (3) AND 1 = 1 GROUP BY goods_code, goods_name, price, tax_type ORDER BY SUM(quantity) DESC OFFSET 0 LIMIT 20:FILE=/home/web/www.giftnavi.jp/htdocs/hikidemono/hikigashi_list.php:LINE=303