SCCM Configmgr SQL query to find Top X missing updates for specific collection for specific update group

Since few days ,I am working on a customized Software update compliance dashboard report with some Pie charts for management to see how the patch compliance progress for each Business Unit (I say business unit means for each country). Management are interested to see the overall patch compliance summary for each country (focused on servers…