InfluxDB: selecting last() values from different tags
I found the solution. All you need to do is add an ORDER BY with the TAG field. So the end query becomes:
SELECT last(Temperature) 
FROM raw_measure 
where ID =~ /4372502|4399699|4406512|4407840/ 
ORDER BY ID