I want to get some Data from my db with the following statement:
SELECT *
FROM Gasstation
WHERE (LOWER(Place) LIKE 'k%ln')
OR (LOWER(Place) LIKE 'd%sseldorf')
AND (DATE(Time) BETWEEN 2021/10/06 and 2021/10/11)
AND Distance <= 0.3;
I also tried it with
WHERE ((LOWER(Place) LIKE 'k%ln')
OR (LOWER(Place) LIKE 'd%sseldorf'))
I need the "DATE(Time)" format here because in the Time column there is also the clock time saved like this : 2021-08-25 11:59:37.
I have already tried it with other statement like comparing the times with '<=' and '>=' and took out some brackets but it always shows data that is older than the date it should be. Like from August and the distance is also being ignored because it shows data with distance that is bigger than 0.3.
If I use it like this it works fine:
SELECT Date(Time), Distance
FROM Gasstation
WHERE Distance <= 0.4;
Thank you already!