I finally managed to write a useful NQE query with no help. Yay! This query lists all of the loopback interfaces and their IP addresses. I tested it, and it works. But I am curious if there is a more efficient or elegant way to enumerate the IP addresses. Seems to me a little clumsy.
getSubIfaceIpInfos(iface) =
foreach subIface in iface.subinterfaces
foreach subnet in subIface.ipv4.addresses select subnet;
foreach device in network.devices
foreach interface in device.interfaces
where interface.loopbackMode
let ifaceSubnets = getSubIfaceIpInfos(interface)
select {
deviceName: device.name,
interfaceName: interface.name,
ipAddress: foreach subnet in ifaceSubnets select ipSubnet(subnet.ip, subnet.prefixLength)
}