anyone to get a help?
Using the same pattern, utilize a subquery to find the average sale price over both order_items and order_items_historic tables.
My code is:
SELECT AVG(a.sale_price) FROM (
SELECT id,sale_price FROM order_items
SELECT id,sale_price FROM order_items_historic)
Select the average sale price avg(a.sale_price) for each item id for both the order_items and order_items_historic tables.
I don't understand what is wrong with this.
Thank you for your time and help.