Upvote:2
This EU site Greece - Employed worker states:
To work in Greece as an employed worker, you need: a national visa for employment.
In the form of a visa (in your passport) it is clear that the type D visa exempts you from the 90 day rule while in Greece.
The 90 days starts again after the date that the visa expires.
From a question, either on this site or Expatriates, it was stated by the user that Sweden does not issue a visa for a period up to 3 months, so it is not always clear (from what is contained in your passport) that you were exempt and you must therefore retain the given paper work permit as proof.