https://techygeekshome.info/2014/01/sccm-2012-wql-query-for-machines-with_20/
SCCM - WQL Query for machines with 4GB RAM or more