I have an typical CUSTOMER/ORDERS set of tables and I want to display the total percentage of sales a particular customer is responsible for. I can get the
One solution is to use a nested query-
SELECT count(*) / (SELECT count(*) FROM orders) FROM orders WHERE cust_id = 541