customers
---------

`id` INT PK
`name` VARCHAR

details
-------

`id` INT PK
`detail_name` VARCHAR

customers\_details
------------------

`customer_id` INT FK
`detail_id` INT FK
`value` INT

---

For each `customer` I have a set of `details`.
The following query will get all users that have the detail #2 equals to 10:

```
SELECT c.* FROM customers c
INNER JOIN customers_details cd ON cd.customer_id = c.customer_id
WHERE cd.detail_id = 2 AND cd.value = 10

```

My problem is that I need to get all `customers` that have 2 or more specific `details`. For example: I want to get all `customers` that have detail #2 = 10 **AND** detail #3 = 20.

Is there a simple way to do that using SQL?