Yes. According to the IRS instructions:

“If the Forms W-2 show amounts from more than one state or locality, report them as one sum in the appropriate box on Form W-3. Verify that the amount reported in each box is an accurate total of the Forms W-2.”