The works of Ādi Śaṅkarācārya

Chāndogyopaniṣadbhāṣyam

Verse 39

नक्षत्राण्येवर्क्चन्द्रमा साम तदेतदेतस्यामृच्यध्यूढं साम तस्मादृच्यध्यूढंसाम गीयते नक्षत्राण्येव सा चन्द्रमाअमस्तत्साम ॥ ४ ॥

In plain words

The stars themselves are the ṛk and the moon is the sāman. This sāman rests upon that very ṛk, which is why the sāman is sung as resting upon the ṛk. The stars are sā and the moon is ama, and together they make sāma.

Close to the Sanskrit

The stars indeed are the ṛk, the moon is the sāman. This sāman is founded upon this ṛk. Therefore the sāman is sung as founded upon the ṛk. The stars indeed are sā, and the moon is ama, and that is sāma.