custom query for both category and pages using global $wpdb;

What about using the UNION? Just an example:

(SELECT * FROM $wpdb->posts (with JOIN and WHERE as needed))

UNION

(SELECT * FROM $wpdb->posts (with WHERE to select pages)) 

GROUP BY/ORDER BY

The select(s) must be in parenthesis to use an order by for the whole union result.

As a second option, you can use a plugin to enable the categories and tags on pages, I used it many times to classify even the pages inside a category.

The call to be fired on WordPress “init” hook is:

register_taxonomy_for_object_type('category', 'page');

and while editing the page you’ll have the classical category chooser like the one of regular posts.