SELECT Statements. Lecture Notes Sree Nilakanta Fall 2010 (rev). SELECT Statements. Retrieve data from one or more tables, object tables, views, object views, or snapshots Must have SELECT privilege Examples. Examples.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Fall 2010 (rev)
SELECT a.deptno "Department", a.num_emp/b.total_count "%Employees", a.sal_sum/b.total_sal "%SalaryFROM(SELECT deptno, COUNT(*) num_emp, SUM(SAL) sal_sumFROM scott.empGROUP BY deptno) a,(SELECT COUNT(*) total_count, SUM(sal) total_salFROM scott.emp) b ;