ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Databases >> SQL PLSQL
 
 


 

 
 Oracle interview questions  Oracle Interview Questions (2041)
 SQL Server interview questions  SQL Server Interview Questions (1082)
 MS Access interview questions  MS Access Interview Questions (25)
 MySQL interview questions  MySQL Interview Questions (194)
 Postgre interview questions  Postgre Interview Questions (6)
 Sybase interview questions  Sybase Interview Questions (22)
 DB Architecture interview questions  DB Architecture Interview Questions (5)
 DB Administration interview questions  DB Administration Interview Questions (213)
 DB Development interview questions  DB Development Interview Questions (54)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (776)
 Databases AllOther interview questions  Databases AllOther Interview Questions (107)
Question
table having two columns - entity,zone 
enity  zone
pen    east
pen    west
pen    north
pen    south
pen    east
pencil  east
pencil  east
pencil  west  

I want the output as :
entity  east  west  north south
pen     2      1     1     1
pencil  2      1      0    0
 Question Submitted By :: SQL-PLSQL
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
select entity,sum(decode(zone,'east',1,0)) east,
sum(decode(zone,'west',1,0)) west,
sum(decode(zone,'north',1,0))north,
sum(decode(zone,'south',1,0))south
from t group by entity;
 
Is This Answer Correct ?    4 Yes 0 No
Aswini Mohanty
 
Answer
# 2
pls answer me this qeustion 
Is This Answer Correct ?    0 Yes 1 No
Lizamishra15
 
 
 

 
 
 
Other SQL PLSQL Interview Questions
 
  Question Asked @ Answers
 
what is global variable in package Polaris 3
What are the usage of SAVEPOINTS?   5
How can we Get the Updated Rows? ie, There is 100s of Rows i updated the Rows who have salary 5000. then i want to select the Updated Rows. How can we achieve it? Fidelity 3
What are the default Oracle triggers?? CGI 2
What is a REF CURSOR? Compare strong and week ref cursor types.   6
how can we replace the particular column value of a resulted set of executed query? I mean write down a sql query to chane the particular column's value of a resulted set of executed query   3
I m giving Source, Destination and Age. Write a procedure or function, it will give to u this source to destination tickets are available or not, if available then check this person is senior citizen or not,if this person is senior citizen then give some discount. PLZ give this answer...... Thanks advance.....   2
Can a table have two primary keys? HCL 43
What can be a size of a pl/sql block? Is there any limit?   2
Please let me know if UNION ALL and Natural Join does the same operation and are same... iGate 7
Interchange the value of a column Gender in a table where values are Male and Female. So, where the value is Male, it should changed to Female and Female to Male. IBM 3
Talk about views Polaris 9
 
For more SQL PLSQL Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com