When you are using SWQL, there are relationship defined internally between swql entities and you can use its power to frame queries.
As in the example provided below, you can query columns like N.INTERFACES.TRAFFIC.DESCRIPTION where It represents
Description of Interface Traffic joining Interfaces joining Nodes in a single select via SWQL relations. Here underlined are the relations.
SELECT N.NODEID, N.IPADDRESS, N.INTERFACES.INTERFACEID, N.INTERFACES.CAPTION, N.INTERFACES.TRAFFIC.DESCRIPTION
FROM ORION.NODES AS N
You can also use sql like joins between these tables. You can use Metadata.relationship entity to get information on relation between entities.
Open SWQL studio and on the left pane, you can see all keys, columns, relations and verbs of all the entities.
You can read SDK pdf documentation in your SDK installed directory to know more information on this.