Psalm 122:4
Whither the tribes go up, the tribes of the Lord, unto the testimony of Israel, to give thanks unto the name of the Lord.
Cross-reference
Psalm 78:68 explains why the tribes go up to Jerusalem — God chose Zion as his dwelling place.
Psalm 116:17-19 depicts offering a sacrifice of thanksgiving in the courts of the Lord's house – directly parallel to giving thanks in the temple.
Psalm 132:13 reinforces that the tribes go up because the LORD chose Zion for his dwelling.
Exodus 23:17 commands the three annual pilgrimages that the tribes are fulfilling in this verse.
Exodus 34:23 reiterates the pilgrimage command to appear before the Lord, which the tribes obey here.
Deuteronomy 12:5 commands seeking the place God chooses — the very place the tribes go up to here.
Deuteronomy 12:11 designates the chosen place for worship, where the tribes go in this psalm.
Deuteronomy 16:16 commands three annual pilgrimages to the chosen place — exactly what is happening here.
Lamentations 1:1 contrasts the joyful gathering of tribes with Jerusalem's desolation and loneliness after its fall.
Exodus 34:24 adds God's promise of protection for those making the pilgrimage described in this verse.