Title: Error according to SQL query
Last modified: January 17, 2025

---

# Error according to SQL query

 *  [saque123](https://wordpress.org/support/users/saque123/)
 * (@saque123)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-according-to-sql-query/)
 * Hi,
 * we are seeing some errors according to the SQL query that could be caused by 
   the plugin:
 * SELECT SUM( order_item_meta.meta_value ) as qty, order_item_meta_2.meta_value
   as product_id FROM wp_posts AS orders INNER JOIN wp_woocommerce_order_items AS
   order_items ON orders.ID = order_id INNER JOIN wp_woocommerce_order_itemmeta 
   AS order_item_meta ON order_items.order_item_id = order_item_meta.order_item_id
   INNER JOIN wp_woocommerce_order_itemmeta AS order_item_meta_2 ON order_items.
   order_item_id = order_item_meta_2.order_item_id INNER JOIN wp_postmeta AS currency_postmeta
   ON posts.ID = currency_postmeta.post_id WHERE orders.post_type IN ( ‘shop_order’)
   AND orders.post_status IN ( ‘wc-completed’,’wc-processing’,’wc-on-hold’ ) AND
   order_item_meta.meta_key = ‘_qty’ AND order_item_meta_2.meta_key = ‘_product_id’
   AND orders.post_date_gmt >= ‘2024-12-01’ AND orders.post_date_gmt <= ‘2024-12-
   27 14:50:22’ AND currency_postmeta.meta_key = ‘_order_currency’ AND currency_postmeta.
   meta_value = ‘USD’ GROUP BY product_id;
 * Its mainly causing a issues in the backend as it slowed down a lot. Are you able
   to confirm that this error comes from WooCommerce Multilingual & Multicurrency
   with WPML? And how can we fix it?
 * Best regards
 * Jonathan
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-according-to-sql-query%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Andrés Cifuentes](https://wordpress.org/support/users/andrescifuentesr/)
 * (@andrescifuentesr)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/error-according-to-sql-query/#post-18249648)
 * Hello [@saque123](https://wordpress.org/support/users/saque123/),
 * With the information provided, I really can’t tell. If you are using a multivendor
   plugin, [this erratum](https://wpml.org/errata/high-query-load-on-woocommerce-orders-page-when-using-multivendor-plugins/)
   may help. Otherwise, and if you are using the standalone version of WCML, you
   can try to replicate the issue on the following [Sandbox](https://smooth-accordion.sandbox.otgs.work/?auto=AHQlITYT6fLwLakk8ooLEJpmVvjmnrBU).
 * However, from the link you shared, I think that you are also using WPML. In that
   case, please go to our [support forum](https://wpml.org/forums/forum/english-support/)
   and open a chat there, we have all the required tools to assist you and we will
   be happy to help you to solve this issue quickly.
 * Regards
   Andrés

Viewing 1 replies (of 1 total)

The topic ‘Error according to SQL query’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-multilingual/assets/icon-256x256.png?rev=2937122)
 * [WPML Multilingual & Multicurrency for WooCommerce](https://wordpress.org/plugins/woocommerce-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-multilingual/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Andrés Cifuentes](https://wordpress.org/support/users/andrescifuentesr/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/error-according-to-sql-query/#post-18249648)
 * Status: not resolved