Why can't I use my SQL statement in?

Source: Internet
Author: User
Why can't I use my SQL statement in? SELECT 'products'. product_model, sum (quantity) ASsum_total, 'product _ descriptions '. product_nameFROMorder_products, pro my SQL statement in, why can't I use it?
SELECT 'products'. product_model, sum (quantity) AS sum_total, 'product _ descriptions '. product_name
FROM order_products, product_descriptions, products
WHERE 'Order _ Products'. product_id = 'products'. product_id
AND 'product _ descriptions '. product_id = 'products'. product_id
AND 'products'. order_id
IN (

SELECT 'orders '. order_id
FROM 'orders'
WHERE date_created
BETWEEN '2017-01-01'
AND '2017-01-01'
)
Group by 'products'. product_id
LIMIT 0, 30

Then the message #1054-Unknown column 'products. order_id 'in' IN/ALL/ANY subquery' is displayed'

Give me some advice !!!

------ Solution --------------------
Does the products table have the order_id field?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.