Tuesday, October 21, 2008

Show the Percentage of Records that Meet a Criteria

Select Round(Part/Whole*100,1)||'%' Percentage
From
(Select Count(*) Whole From Emp ),
(Select Count(*) Part From Emp Where Deptno = 30);

Percentage
----------
42.9%

No comments:

Post a Comment