Question: I've an AWS API gateway in front of a REST API service. I would like to remove one/some HTTP headers when I forward the request to the origin.

I know how to do this using a lambda but I'm just wondering is there is something built in.

Answer: 
I think the simpler approach is boolean logic:

```
SELECT `id`, `title`, `body`, `created_on` 
FROM `fcm_messages` 
WHERE 
    (`city` = :city AND `street` = :street AND `building` = :building)
    OR (`city` = :city AND `street` = :street AND `building` = '-')
    OR (`city` = :city AND `street` = '-' AND `building` = '-')
    OR (`city` = '-' AND `street` = '-' AND `building` = '-')

```

Note that this uses query parameters to pass the variables to the query rather than concatenating them into the query string: this is both safer and more efficient.
In MySQL, you can take advantage of tuples:

```
SELECT `id`, `title`, `body`, `created_on` 
FROM `fcm_messages` 
WHERE (city, street, building) in ( (:city, :street, :building), (:city, :street, '-'), (:city, '-', '-'), ('-', '-', '-') )

```

Note: In many cases, the "generic" value would be stored as `NULL`. That would not work with `IN`, but with `'-'` it does.