Posts

Showing posts from August, 2014

Dive into Oracle : Data Grouping and Merging

Image
In this post we are going to discuss about commonly used Oracle database queries for manipulate data mainly grouping and merging. If the database structure is normalized and when it comes to visualization of data, it is required to group data based on their common characteristics. Similarly in most of the database systems including Oracle, Merging is the functionality provided in order to migrate data between two databases, schema or tables.
Let's create a simple database structure as follows. We can use a tool like SQL Fiddle to run queries and see how it works. Make sure you have selected Oracle 11g R2 as DB type before running any queries.
CREATE TABLE SEMISTER_GPA( STUDENT_ID VARCHAR2(8), SEMISTER_ID VARCHAR2(4), GPA NUMBER(5,4), PRIMARY KEY (STUDENT_ID,SEMISTER_ID) );
Adding some values to above tables.

INSERT INTO SEMISTER_GPA(STUDENT_ID,SEMISTER_ID,GPA) VALUES ('ST000001','L1S1',3.5245); INSERT INTO SEMISTER_GPA(STUDE…