Citadel's data catalog maintains relationships between datasets, strategies, and other tracked entities. Write a PostgreSQL query that returns the active entities associated with the requested entity IDs 101 and 104.
101 and 104.Unclassified, and order results by association count descending, then associated entity ID ascending.| Column | Type | Description |
|---|---|---|
| entity_idPK | INTEGER | Unique catalog entity identifier |
| entity_name | VARCHAR(100) | Display name of the entity |
| entity_type | VARCHAR(30) | Classification such as strategy, dataset, or document |
| Column | Type | Description |
|---|---|---|
| association_idPK | INTEGER | Unique association identifier |
| entity_id | INTEGER | Source entity identifier |
| associated_entity_id | INTEGER | Related entity identifier |
| association_type | VARCHAR(40) | Relationship classification |
| is_active | BOOLEAN | Indicates whether the relationship is current |