I agree with @Colin, the query should return an array no matter what... either empty , with one item, or many.... If it doesn't then really I would consider that a bug in the node that needs to be addressed.
I would do it like this (but yes I'm sure some magic jsonata would do a better job.
[{"id":"cfbd24a.6ac83d8","type":"inject","z":"9a4d61c8.a8bc3","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":820,"wires":[["a1e275b0.155a98"]]},{"id":"a1e275b0.155a98","type":"function","z":"9a4d61c8.a8bc3","name":"","func":"msg = {\"_msgid\":\"79ac0384.97f40c\",\"topic\":\"select * from Device WHERE client_id=7;\",\"payload\":[{\"uuid\":\"00000000a76452e1\",\"nickname\":\"Zero Lobby\",\"latitude\":37,\"longitude\":-93,\"display_res\":\"1920x1080\",\"display_type\":\"LED TV\",\"client_id\":7},{\"uuid\":\"00000000247d5c98\",\"nickname\":\"Mini iPoster\",\"latitude\":37,\"longitude\":-93,\"display_res\":\"128x320\",\"display_type\":\"P2 SMD\",\"client_id\":7},{\"uuid\":\"00000000852dccd8\",\"nickname\":\"7 Inch Demo\",\"latitude\":37,\"longitude\":-93,\"display_res\":\"800x480\",\"display_type\":\"Touchscreen Display\",\"client_id\":7}]}\n\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":820,"wires":[["82c537.fbd63ac8"]]},{"id":"82c537.fbd63ac8","type":"split","z":"9a4d61c8.a8bc3","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":150,"y":940,"wires":[["527cf82d.56adc8"]]},{"id":"67a2ac29.4cf2c4","type":"function","z":"9a4d61c8.a8bc3","name":"","func":"msg = {\"_msgid\":\"9b826e89.e0cfa\",\"topic\":\"select * from Device WHERE client_id=5;\",\"payload\":[{\"uuid\":\"00000000d56a2bdd\",\"nickname\":\"Sean Window\",\"latitude\":37,\"longitude\":-93,\"display_res\":\"1024x768\",\"display_type\":\"Projector\",\"client_id\":5}]}\n\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":860,"wires":[["82c537.fbd63ac8"]]},{"id":"527cf82d.56adc8","type":"function","z":"9a4d61c8.a8bc3","name":"","func":"var l = msg.payload.nickname;\nvar v = msg.payload.uuid;\nmsg.payload = {};\nmsg.payload[l] = v;\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":940,"wires":[["ec604c0a.4620c"]]},{"id":"31daa51c.0cd1da","type":"inject","z":"9a4d61c8.a8bc3","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":860,"wires":[["67a2ac29.4cf2c4"]]},{"id":"ec604c0a.4620c","type":"join","z":"9a4d61c8.a8bc3","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":390,"y":940,"wires":[["82aefcb1.26461"]]},{"id":"82aefcb1.26461","type":"change","z":"9a4d61c8.a8bc3","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"options","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":940,"wires":[["ee730f50.80f92","9475ad3d.d6113"]]},{"id":"ee730f50.80f92","type":"debug","z":"9a4d61c8.a8bc3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":750,"y":900,"wires":[]},{"id":"9475ad3d.d6113","type":"ui_dropdown","z":"9a4d61c8.a8bc3","name":"","label":"","tooltip":"","place":"Select option","group":"6be5b344.e6d4dc","order":0,"width":0,"height":0,"passthru":true,"options":[{"label":"","value":"","type":"str"}],"payload":"","topic":"","x":750,"y":940,"wires":[[]]},{"id":"6be5b344.e6d4dc","type":"ui_group","name":"Group 1","tab":"402eee3d.80541","order":1,"disp":true,"width":6},{"id":"402eee3d.80541","type":"ui_tab","name":"Tab 3","icon":"dashboard","order":3}]