how do i register global query in template

Declare an array at the start of your layout, or in your functions file depending on the scope required and populate the array with all the bands using get_posts and making the key the post ID.

You will then have a global array of bands, and can pull info from each one wherever you need it.

some similar code from something I worked on:

global $bands;

$bands = array();
$bandPosts = get_posts(array('numberposts' => -1, 'post_type' => 'lmfBand', 'order' => 'ASC', 'orderby' => 'title'));
foreach($bandPosts as $bandPost) {
    $bands["{$bandPost->ID}"] = array($bandPost->post_title,$bandPost->post_name);
}

then to get the band name, just use: $bands[“{band_id}”][0] (in the version above)

You could also make each band a stdClass object instead of just an array of values.