The image below shows what my source data is (HAVE) and what I'm trying to get to (WANT).
I want to be able to calculate the percentage of bad messages (where formattedMessage = false) by source and date.
I'm not sure how to achieve this in DatabricksSql. Any help appreciated.