Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Last active September 29, 2023 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unlocomqx/12df750ad438933e8613371298e7ac57 to your computer and use it in GitHub Desktop.
Save unlocomqx/12df750ad438933e8613371298e7ac57 to your computer and use it in GitHub Desktop.
SELECT COALESCE(SUM(od.product_quantity), 0) FROM ps_dynamicproduct_dropdown_option op
LEFT JOIN ps_dynamicproduct_field f on op.id_field = f.id_field
LEFT JOIN ps_dynamicproduct_input_field inf on op.id_field = inf.id_field
LEFT JOIN ps_dynamicproduct_input inp on inf.id_input = inp.id_input
LEFT JOIN ps_order_detail od on inp.id_customization = od.id_customization
WHERE op.sku = 'XXXXXX'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment