Sqlite database has some Nulls how to create a line graph?

Why do you have your database setup that way, wouldn't it be better (and easier) to have column labeled 'device' or 'uint' and put the device name there with it's readings. So you would end up with
ID, Device, Unix_Time, Day, Date, Time, Humidity, Temperature
Then you could query by device and adding another device would be easy as using the new name. Also, why store the Day, Date and Time when you have the Unix_time? So your table could be
ID, Device, Unix_Time, Humidity, Temperature
and you could convert the Unix_time to what ever date format you want (note: as of NR v1.1.0 the change node supports the moment.js library. Here is a thread explaining how to use it Formatting times & dates with moment.js examples