chief Posted April 29, 2020 Share Posted April 29, 2020 Hi, I have close to 5000 products, we import in a file which adds new products everyday and so my products will always grow. We are going through each product adding features (computer related), and im getting to a stage where i now need to know what products dont have any features. So, what i need (please) is a query to list all product ID's without any features assigned to them. or someone to let me know what tables i need to query to get results thanks dave Link to comment Share on other sites More sharing options...
chief Posted April 29, 2020 Author Share Posted April 29, 2020 So, i have this query which displays a list of all products with a feature and doesnt show duplicates. Now all i need is to remove these ID's from ID's of all other products and i should be left with a list of products without any features. SELECT * FROM `ps_feature_product` group by `id_product` Link to comment Share on other sites More sharing options...
chief Posted April 30, 2020 Author Share Posted April 30, 2020 (edited) A solution for display all products without features assigned. from my friend Jay taniguchi SELECT p.id_product FROM ps_product AS p WHERE p.id_product NOT IN( SELECT f.id_product FROM ps_feature_product AS f ) Edited April 30, 2020 by chief (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now