You can use this document as a reference, for importing a SQL query, as an advanced argument to the query designer:
How to create a dynamic group of ITCM scalability - CA Knowledge
Check from Step 5 of that document. The only thing that is really different, is the query you are inputting into the designer.
You'll need to change "*" in the query to dis_hw_uuid:
select top 10 dis_hw_uuid from ca_discovered_hardware order by creation_date desc
DSM Explorer expects that you are returning "computers" as the return type. Therefore the field you must return needs to be a dis_hw_uuid from ca_discovered_hardware. Or the object_uuid from ca_agent, if querying on the ca_agent table, since ca_discovered_hardware.dis_hw_uuid == ca_agent.object_uuid
You cannot specify "*" and have whatever columns returned to DSM Explorer. It will only recognize the UUID of a computer, and then you can only display fields that are pre-programmed/available in the DSM Explorer column list.