Grouping and ungrouping in sql, PL-SQL Programming

Grouping and Ungrouping in SQL

Example specifying EXAM_MARK in place of COURSE in the main FROM clause.

Example: Obtaining C_ER2 from EXAM_MARK

SELECT CourseId,

CAST (

TABLE (SELECT DISTINCT StudentId, Mark

FROM EXAM_MARK AS EM2

WHERE EM1.CourseId = EM2.CourseId)

AS ROW ( StudentId SID, Mark INTEGER ) MULTISET )

AS ExamResult

FROM EXAM_MARK AS EM

Figure shows the result, named C_ER2 for convenience. It differs from the C_ER of Figure 5.3 only in the absence of a row for course C4, whose exam nobody sat.

140_Grouping and Ungrouping in SQL.png

Figure: Intermediate result C_ER2

Posted Date: 1/18/2013 6:42:15 AM | Location : United States







Related Discussions:- Grouping and ungrouping in sql, Assignment Help, Ask Question on Grouping and ungrouping in sql, Get Answer, Expert's Help, Grouping and ungrouping in sql Discussions

Write discussion on Grouping and ungrouping in sql
Your posts are moderated
Related Questions
Example of NOT EXISTS Operator - SQL Example is a translation into SQL of the corresponding example, which is included there merely to show that for any scalar comparison the

Grouping and Ungrouping in SQL Example specifying EXAM_MARK in place of COURSE in the main FROM clause. Example: Obtaining C_ER2 from EXAM_MARK SELECT CourseId, CAST

Predefined Exceptions The internal exception is raised implicitly whenever your PL/SQL program exceeds a system-dependent limit or violates an Oracle rule. Each & every Oracle

Using Aliases The Select-list items fetched from a cursor related with the %ROWTYPE should have simple names or, if they are expressions, should have aliases. In the example bel

THEO R Y OF CATASTROPHISM OR CATALYSM (CUVIER 1769-1832) - The world has passed thorugh several stages and at the end of each stage there was a catastrophe killing all the

Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the

Oracle 10G new features:- Automatic Database Diagnostic Monitor System Advancements - these methods will provides several methods for extracting reports through the Automatic

heap sort program in pl/sql

Using INNER JOIN INNER JOIN is used to retrieve the data from all tables listed based on a condition of equality listed after keyword ON. If the condition is not meet, rows ar

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot