How to create a SQL query to select the values of the field "Name 1", in which all pairs of "Parameter" + "Value" are equal to the pairs "Parameter" + "Value" from the second table.
For example, the first table:
+--------------------------------------+ | ID Имя 1 Параметр Значение | | 1 Товар 1 Длина 50 | | 2 Товар 1 Ширина 100 | | 3 Товар 2 Длина 80 | | 4 Товар 2 Ширина 100 | +--------------------------------------+ Second table
+----------------------------------------+ | ID Имя 2 Параметр Значение | | 1 Продукт 1 Длина 50 | | 2 Продукт 1 Ширина 100 | | 3 Продукт 2 Длина 25 | | 4 Продукт 2 Ширина 100 | +----------------------------------------+ Thus, product 1 corresponds to product 1. And the search query would display “Product 1”