If you’ve ever wanted to report on ConfigMgr client IPAddress you know it can be a challenge. ConfigMgr stores IP Address information in the v_GS_NETWORK_ADAPTER_CONFIGURAITON SQL view (and other places) but it is actually an array of both IPv4 and IPv6 addresses. Generally, all we care about is the first IPv4 address. With that in mind, here is some T-SQL code to return a Computer’s name, ResourceID, and IP Address properly by IP.
Sorting ConfigMgr data by IP Address