I don't have an answer for your second question, maybe you could post that as a separate question. But for your first question:
If you have properties with the same name (both of yours end with .temperature
, so the property will be called temperature
, you can give them an alias. Your query could be
SELECT
timeCreated,
machine.temperature AS machineTemperature,
machine.pressure AS machinePressure,
ambient.temperature AS ambientTemperature,
ambient.humidity AS ambientHumidity,
System.Timestamp as t1
This will make sure that you don't have duplicate property names.