Q:

How to use complex filtering queries in Gmail?

I am playing with different/complex filtering queries/string in Gmail.
I found this answer (to my own question): 
after:1552896000 before:1552924800

And I was able to use it without any problems, i.e. I managed to filter e-mails with given dates.
Then I found this answer:
If email is from:semi-valuable-email-service.com AND contains:"Monday OR Wednesday OR Friday" THEN send it to trash

and got a bit lost.
Is this a real string to be pasted somewhere into Gmail (where?) or a pseudo-code to explain filter settings that need to be applied?
Where should I put queries as complex as above? When I try to create a rule to filter my emails, all that I see is a filter configuration box with some simple fields and no place to put a query directly.
Actually, I don't need queries as complex as above, but I'd like to merge two or more simple queries (as in the first example, if possible) to filter out e-mails sent in a given period of time for two or more days:
after:1502294400 before:1502352000 AND after:1552896000 before:1552924800

But I am getting no results, neither from first nor from the second day. Is this possible at all in Gmail?

A:

Is this a real string to be pasted somewhere into Gmail (where?) or a pseudo-code to explain filter settings that need to be applied?

It's a real thing and you are supposed to use it (just a part of it) in the search bar:
from:semi-valuable-email-service.com AND contains:"Monday OR Wednesday OR Friday"

To list emails from two days you need to use OR instead of AND and endclose it with () like:
(after:1552698000 before:1552777200) OR (after:1551834000 before:1551913200)
This will list all emails from 16th and 6th March 2019 received between 1 AM and 11 PM

