Question: How to write a `sql` query to find out that there are 2 days left before the current date.
In php, this can be done via:

```
$res['end_date'] - time () < 86400 * 3;

```

How can I do the same after 1 `sql` query, well or better, only 2 days, if less so that it does not work out, well, if it works out, it's okay.

**UPD:**

It is necessary to compose a `sql` query that will select only those records that have `2` days left before the `end_date` expires

The type is `int` for the field `end_date` and is stored via the `time ()` function in `php`.

Can't compose a `WHERE` clause.

Answer: 
Since this question is under the Python tag - I assume you want this to be done in Python. Flipping can be done in `numpy`, `PIL`, or `opencv` (your choice).

```py
image = # some image translated to a numpy array
print(type(image))
>> numpy.ndarray

# np.fliplr will also do the trick
flipped_image_h = np.flip(image, axis=1) # flip horizontally

# np.flipud will also do the trick
flipped_image_v = np.flip(image, axis=0) # flip vertically

# Save flipped_image

```

[See the numpy docs for more info](https://numpy.org/doc/stable/reference/generated/numpy.flip.html)
I think there isn't an explicite way to do it. you just need to write a code that opens your JSon files and make the changes yourself