select Contracts.idContracts, Clients.name
from Clients join Contracts on Clients.idClients=Contracts.Clients_idClients join Payment
on Contracts.idContracts=Payment.Contracts_idContracts
where day(Payment.date) > 1 and day(Payment.date) < 20 and count(Payment.Contracts_idContracts) = 3
group by Clients.name, Contracts.idContracts