I'm now doing four separate queries to select the information i need.
f.e.
SELECT value FROM data where sensor=123 AND value_id=a
SELECT value FROM data where sensor=123 AND value_id=b
SELECT value FROM data where sensor=123 AND value_id=c
SELECT value FROM data where sensor=123 AND value_id=d
Now i'm experementing with some code. I don't know if on my right way but is such a thing possible:
SELECT value180,value181,value182,value183
FROM (
SELECT
MAX(CASE WHEN DATE(time) = subdate(CURDATE(), 1) THEN value ELSE 0 END) as value180,
MAX(CASE WHEN DATE(time) = subdate(CURDATE(), 1) THEN value ELSE 0 END) as value181,
MAX(CASE WHEN DATE(time) = subdate(CURDATE(), 1) THEN value ELSE 0 END) as value182,
MAX(CASE WHEN DATE(time) = subdate(CURDATE(), 1) THEN value ELSE 0 END) as value183
FROM data
WHERE sensor_id = 1605850
AND value_id IN ("1.8.0","1.8.1","1.8.2","1.8.3")
) a
It would be nice to have a single query...thx for helping in advance!
note: i have to use max value of each day per sensor per value. In the above first example this max function was just left out for simplification.
This is the table how it looks like:

as you can see there are hourly taken values for each value_id.
What i need: I need the highest value of yesterday for defined value_id's.
f.e. 1.8.0 = 3726.12, 1.8.1 = 663.69, ...
With my combined query i'm getting wrong values but the format how i want to get the values is correct:
