Answer the question
In order to leave comments, you need to log in
Which SQL-select: MySQl one-to-many select with join?
Help with SQL query:
Task:
There is a table (id, product_id, data) with a one-to-many relationship, i.e. tovar_id can have several data values, where each value is written as a separate record . Do the following
:
Make a selection - display a list of tovar_id, where SIMULTANEOUSLY there are several different data values (according to the list). Those. not a list of all records for each occurrence of the data value, but a list of tovar_id, where ALL listed data values are found SIMULTANEOUSLY
. you don’t need data 6 or 7 separately, but only those product_id, where there is an entry for both data 6 and data 7, i.e. don't show tovar_id, where there is data 6, but not data 7
How to make a query correctly?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question