How to show only one post for each categories of taxonomy of custom post that contains a specific custom field

<?php
// get all terms of the `bank` taxonomy
$banks = get_terms(
    array(
        'taxonomy' => 'bank',
        // more arguments can be used, see (1) below the code
    )
);

// look through banks, picking one post from each
foreach ( $banks as $bank ) {

    $args = array(
        'post_type'       => 'account', // your custom post type
        'posts_per_page'  => '1', // one post per bank (per term)
        'tax_query'        => array(
            array(
                'taxonomy' => 'bank',
                'terms'    => $bank->term_id,
            ),
        )
        'meta_query' => array( // your custom field stuff
            array(
                'key' => 'tax',
                'compare' => '=',
                'value' => 0,
            ),
        ), 
        // more arguments can be used, see (2) below the code
    );

    // The Loop
    $query = new WP_Query( $args );

    if ( $query->have_posts() ) {
        while ( $query->have_posts() ) {
            $query->the_post();

            /*
            Your markup goes here
            */
            the_ID();
            the_title();
        }
    }

} // END foreach bank

Also, here should be the error check, but it’s out of the question scope.

For accepted arguments see:

  1. WP_Term_Query.
  2. WP_query