Here's one I recently created:
[tt]
select SMS_R_System.Name, SMS_R_System.SMSAssignedSites,
SMS_R_System.IPAddresses, SMS_R_System.IPSubnets,
SMS_R_System.OperatingSystemNameandVersion,
SMS_G_System_OPERATING_SYSTEM.CSDVersion,
SMS_R_System.ResourceDomainORWorkgroup,
SMS_R_System.LastLogonUserDomain,
SMS_R_System.LastLogonUserName,
SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceId,
SMS_R_System.NetbiosName from SMS_R_System inner join
SMS_G_System_OPERATING_SYSTEM on
SMS_G_System_OPERATING_SYSTEM.ResourceID =
SMS_R_System.ResourceId where
SMS_R_System.OperatingSystemNameandVersion like "%Workstation 5.1%" and
SMS_G_System_OPERATING_SYSTEM.CSDVersion = "Service Pack 2"
[/tt]