Freshworks interview question

1 sql intermediate question and some theoretical concepts.