SELECT deviceId AS device_id, time AS sample_time, iodb.ppb AS ppb, iodb.pid AS pid, iodb.temp AS temp, iodb.humid AS humid, iodb.pres AS pres, iodb.wspd AS wspd, iodb.wdir AS wdir, iodb.sflag AS sflag, iodb.tflag AS tflag, iodb.pstat AS pstat, iodb.estat AS estat, iodb.batt AS batt, iodb.chrg AS chrg, iodb.run AS run INTO spodout FROM DeviceInputStream