Thiscan be translated as a statement. Alternate translation: "Tell me who laid its cornerstone when ... the sons of God shouted for joy." (See: [[rc://en/ta/man/translate/figs-rquestion]])
# when the morning stars sang together and all the sons of God shouted for joy
These two lines are similar in meaning. (See: [[rc://en/ta/man/translate/figs-parallelism]])
# when the morning stars sang together
The morning stars are spoken of as singing like people sing. Possible meanings are: 1) the "morning stars" are the same as the "sons of God" in the next line or 2) "the morning stars" refer to stars in the sky. (See: [[rc://en/ta/man/translate/figs-personification]])
# the morning stars
"the bright stars that shine in the morning"
# sons of God
This refers to angels, heavenly beings. See how you translated this in [Job 1:6](../01/06.md).
The abstract noun "joy" can be translated as the adverb "joyfully." Alternate translation: "shouted joyfully" (See: [[rc://en/ta/man/translate/figs-abstractnouns]])