convert database Rows into Column its easy and simple.
If you have a table "master_stu" its having values like
stu_id stu_name class percentage
==== ====== === =======
1 vin sslc 88
1 vin hsc 90
2 swin sslc 75
2 swin hsc 89
you want to display above table into
stu_id stu_name class percentage class percentage
==== ====== === ======= === ========
1 vin sslc 88 hsc 90
2 swin sslc 75 hsc 89
just write a query like
select
tbl1.stu_id as stu_id, tbl1.stu_name,tbl1.class as class,tbl1.percentage as percentage,tbl2.class as class,tbl2.percentage as percentage
from
(select * from master_stu where class = 'sslc') as tbl1,
(select * from master_stu where class = 'hsc') as tbl2,
where
tbl1.stu_id=tbl2.stu_id
any query's mail me!
All about data processing & analytics. Open source database,No-SQL and Hadoop. Discussed issues/solution which I've got during my experience..
Tuesday, October 13, 2009
Subscribe to:
Post Comments (Atom)
Labels
- #agriculture (1)
- #ai (5)
- #pdf (1)
- Big Data (30)
- blogging (3)
- data analytics (5)
- data science (7)
- Deep Learning (4)
- Hadoop (28)
- Hadoop Eco System (27)
- hdfsCommands (4)
- Hive (5)
- IssueSolution (4)
- jobs (3)
- links (1)
- Machine Learning (4)
- mahout (2)
- MapReduce (1)
- MongoDB (6)
- MySQL (4)
- PlpgSQL (8)
- postgres (6)
- PostgreSQL (53)
- R (20)
- RHadoop (2)
- search keywords (1)
- social (2)
- spark (3)
- twitter (6)
- usecase (2)
- visualization (7)
- weka (1)
No comments:
Post a Comment