Coin selection puzzle, SQL Joins
Using coin_inventory and coin_types, write a query that returns every combination of three distinct physical coins whose denominations total exactly 100 cents. Each combination must be reported once, regardless of selection order.
coin_id_1, coin_id_2, coin_id_3, value_1, value_2, value_3| Column | Type | Description |
|---|---|---|
| coin_type_idPK | INTEGER | Identifier for a coin denomination type |
| coin_name | VARCHAR(40) | Name of the denomination |
| denomination_cents | INTEGER | Value of the denomination in cents |
| Column | Type | Description |
|---|---|---|
| coin_idPK | INTEGER | Identifier for an individual physical coin |
| coin_type_id | INTEGER | Reference to the coin denomination type |
| storage_bin | VARCHAR(20) | Storage location for the physical coin |