Could you help me with a query?

1) I know some values of  id_value in the table below : PRODUCTS_VALUE.

2) I'm looking for id_product that can contemporaneously satisfy more than
an id_value (NOT ONLY ONE!!)

For example I'm looking for all id_product that can contemporaneously
satisfy
(id_value=1 AND id_value=3 AND id_value=16)

expected results :    id_product = 1 and 2   but  NON id_product= 3!  (that
can satisfy only  id_value = 1 and 16   but not 3!)

3) How can I obtain  Company's names (FROM TABLE Companies joining PRODUCTS
joining(??) PRODUCTS_VALUE  ) that sell product satisfying point   1) and 2)
?

4) My internet provider "provide" only MySQL 3.23.58 ...
So not subqueries e so on ...

I' think it was easy but I've tried in many way without result....

TIA.
Sorry for my poor english.
Michele.B

#######
TABLES
#######

PRODUCTS_VALUE
id_product   id_value
1                    1
1                    3
1                    16
1                    25
2                    1
2                    3
2                    16
2                    32
3                    1
3                    2
3                    16

PRODUCTS
id_product      name         id_company
1                     prod_1             2
2                     prod_2             3
3                     prod_3             9

COMPANIES
id_company          name
1                           company_1
2                           company_2
3                           company_3
4                           company_4





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to