These verses are just like Luke, chapter 6:49, which might indicate a Q source. The opposite of the preceding verses is present here. Everyone who heard these words of Jesus (καὶ πᾶς ὁ ἀκούων μου τοὺς λόγους τούτους) but did nothing about them (καὶ μὴ ποιῶν αὐτοὺς), as opposed to those who acted upon them, were like a foolish or stupid man (ὁμοιωθήσεται ἀνδρὶ μωρῷ). These foolish people built a house on a sand foundation or sandy ground (ὅστις ᾠκοδόμησεν αὐτοῦ τὴν οἰκίαν ἐπὶ τὴν ἄμμον), not a rock foundation. It is interesting to note that these must have been former followers of Jesus, since they had heard his words, not people who had never heard about Jesus, indicating a rift among the followers of Jesus. The rains fell (καὶ κατέβη ἡ βροχὴ) and the floods came (καὶ ἦλθον οἱ ποταμοὶ), just as the preceding verses. Winds would blow (καὶ ἔπνευσαν οἱ ἄνεμοι) and beat against this house also (καὶ προσέπεσαν τῇ οἰκίᾳ ἐκείνῃ). However, there was a different result here. The house fell (καὶ ἔπεσεν) because it was built on a sand foundation. The rock foundation was those who had followed the words of Jesus. The sand foundation was those who heard the words of Jesus but did not follow it. Their house would suffer not just a fall, but a great fall (καὶ ἦν ἡ πτῶσις αὐτῆς μεγάλη). It was not good enough to hear the words of Jesus, you had to act on them.
These verses are just like Luke, chapter 6:47-48, which might indicate a Q source. Jesus said that everyone who heard his words (Πᾶς οὖν ὅστις ἀκούει μου τοὺς λόγους τούτους) and actually did and followed them (καὶ ποιεῖ αὐτούς), were like wise men (ὁμοιωθήσεται ἀνδρὶ φρονίμῳ). These wise people built a house on a rock foundation or solid rocky ground (ὅστις ᾠκοδόμησεν αὐτοῦ τὴν οἰκίαν ἐπὶ τὴν πέτραν.). The rains fell (καὶ κατέβη ἡ βροχὴ and the floods came (καὶ ἦλθον οἱ ποταμοὶ). Winds would blow (καὶ ἔπνευσαν οἱ ἄνεμοι) and beat against this house (καὶ προσέπεσαν τῇ οἰκίᾳ ἐκείνῃ), but it did not fall (καὶ οὐκ ἔπεσεν), because it was built on a strong rock foundation (τεθεμελίωτο γὰρ ἐπὶ τὴν πέτραν). This rock foundation was the words of Jesus carried out in daily life. The fairy tale story of the 3 pigs with the brick, straw, and grass houses is similar to this saying about the stone foundation that could not be destroyed.
This psalm concludes with the judgment of Yahweh. The sea and everything in it, as well as the earth with everything in it would together roar about Yahweh. The floods and the mountains sing with joy at the presence of Yahweh, since he was coming to judge the world with righteousness and equity.