Morning, I suspect this is related to the symptoms myself and other users of LEM 5.6 have been experiencing, which is worked around by restarting the appliance. My advice is to restart the appliance through the console and rerun the query.
Thanks Garreth. Unfortunately I had tried restarting the appliance without success. I worked with SW support for over an hour and ended up having to find and purge corrupt data in the database.
So far the new database structure is turning out to be slow and extremely error-prone. Reports run with the Reporting tool take 5-10 times longer than they used to.