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
I need to write one function and one procedure to query a Oracle 10.1 DB using PL SQL. I have the schema and exact queries...along with work Ive started and a template to put the a

1. a. Write a trigger that fires when a part's price is updated. The trigger will write a record into a table called PriceUpdates. The record should contain the information of

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl

Object Types An object type is a user-defined complex datatype which encapsulates the data structure along with the functions and procedures required to manipulate the data. Th

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

Exception handling In the PL/SQL, a warning or error condition is known as an exception. The Exceptions can be internally defined (by the run-time system) or user defined. The

Passing Cursor Parameters You use the OPEN statement to pass the parameters to a cursor. Unless you want to accept the default values, each proper parameter in the cursor decl

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin

UPDATE Command- SQL Loosely speaking, UPDATE changes some of the column values of some existing rows of its target table. Thus, although some rows disappear from the target an

3CX PBX sync Windows Service Project Description: !! You require access to a commercial version of the 3CX PBX system in order to be able to program the API !! !! You requ