SELECT COUNT(*) AS Total, SUM(CASE WHEN age > 10 THEN 1 ELSE 0 END) * 100 / COUNT(*) AS Percent FROM MyTable
Select Count (*) * 100 / (Select Count(*) From YourTable) as Score From YourTable where age>10
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)