I think I've figured out the conditions. It's necessary that HotelCode, RoomType and the range (AccomodationPeriodBegin - AccomodationPeriodEnd) do not have duplicate AccmdMenTypeCode-s. Otherwise it makes confusion for users and difficulties when retrieving data from the DB.
Also, as @Dave.Gugg rightly pointed out, there were inaccuracies with the test data related to the date range.
I already fixed test data and changed requests to DB.
1 - detailed version with GroupIds
2 - simplier version
I'd appreciate your feedback