You can do subqueries to get the data. Use one query to get the maximum fromdate for the service_id, then join that to a search for the accountservice_id that matches the service_id and max fromdate.
SELECT maxfromdate.service_id, correct_account.accountservice_id, maxfromdate.maxfromdate
FROM (SELECT
Service.service_id,
MAX (accountservice.fromdate) AS maxfromdate
FROM service
JOIN accountservice ON service.service_id = accountservice.service_id)
GROUP BY Service.service_id) maxfromdate
JOIN (SELECT
Service.service_id,
accountservice.accountservice_id,
accountservice.fromdate
FROM service
JOIN accountservice ON service.service_id = accountservice.service_id
)correct_account ON
(maxfromdate.service_id = correct_account.service_id
AND maxfromdate.maxfromdate = correct_account.fromdate)