fettlebox Posted January 5, 2018 Posted January 5, 2018 Hi - can anyone help with a query so I can tell how many of a single item have been sold between specific dates using the Query MySQL Database feature? Many thanks. Quote
bsmither Posted January 5, 2018 Posted January 5, 2018 Unfortunately (but I haven't verified this against any very recent versions of CubeCart), the Query box only issues queries. There is no provision to display the results. Quote
fettlebox Posted January 6, 2018 Author Posted January 6, 2018 Thanks. Would there be a way to do it via mysql? Quote
bsmither Posted January 6, 2018 Posted January 6, 2018 Using an external database utility, which will show you results from the query, try: SELECT SUM(`quantity`) FROM `CubeCart_order_inventory` WHERE `product_id` = 6 AND `cart_order_id` BETWEEN '140000' and '141000'; We can use the `cart_order_id` as a very good approximation of the target dates. The values used for the BETWEEN spread are the YYMMDD part of the format. You could use the `product_id`, or if more friendly, use the `product_code`. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.