.......PS. [ZBX-8514] adjusted sql query style to conform with commonly used