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 UNWRAP Operator - SQL Example here shows how unwrapping can be done in longhand in SQL. Example: Unwrapping in SQL Letting CONTACT_INFO_WRAPPED denote the res

Project Description: I am looking to change FullCalendar to add/delete sql server data when events are removed or dropped from Calendar. Events should only be included by dra

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean's wants to create a trigger that automatically updates the stock level of all pr

How Exceptions Are Raised By the run-time system, the internal exceptions are raised implicitly as are user-defined exceptions that you have related with an Oracle error number

Using Savepoints The scope of the savepoint is a transaction in which it is defined. The Savepoints defined in the major transaction are not related to the savepoints defined

WHEN or THEN Key Constraints Suppose a table has two columns representing a period of time throughout which the information conveyed by the other columns is recorded as having

Recursive Subprograms The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your

Parameter and Keyword Description: cursor_variable_name: This identifies a cursor variable or the parameter formerly declared within the present scope. host_cursor_va

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system