Returning data where all categories exactly match
You cqan use the IN clause for that
SELECT 
`id`, `doc_title`, `doc_version` 
FROM Documents WHERE id in (SELECT `id` 
                            FROM Categories 
                            WHERE `cat_id` = 7  AND  `cat_type` = 2);



CREATE TABLE Documents (
  `id` INTEGER,
  `doc_title` VARCHAR(10),
  `doc_version` INTEGER
);

INSERT INTO Documents
  (`id`, `doc_title`, `doc_version`)
VALUES
  ('1', 'item 1', '4'),
  ('2', 'document 2', '3');

CREATE TABLE Categories (
  `id` INTEGER,
  `cat_id` INTEGER,
  `cat_type` INTEGER
);

INSERT INTO Categories
  (`id`, `cat_id`, `cat_type`)
VALUES
  ('1', '1', '3'),
  ('1', '7', '2'),
  ('1', '4', '2'),
  ('2', '7', '2');


✓

✓

✓

✓




SELECT 
`id`, `doc_title`, `doc_version` 
FROM Documents WHERE id in (SELECT `id` 
                            FROM Categories 
                            WHERE `cat_id` = 7  AND  `cat_type` = 2);


id | doc_title  | doc_version
-: | :--------- | ----------:
 1 | item 1     |           4
 2 | document 2 |           3


db&lt;&gt;fiddle here