Yardi Systems interview question

very difficult, Schema based sql questions