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 (2036)
 SQL Server interview questions  SQL Server Interview Questions (1076)
 MS Access interview questions  MS Access Interview Questions (24)
 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 (53)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (771)
 Databases AllOther interview questions  Databases AllOther Interview Questions (106)
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
 
i have a customer table. trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output. trans_id trans_amt debit_credit_indicator i want get highest credit amount and lowest credit amount and highest debit amount and lowest debit amount for each trans_id. oracle 1
in table there r so many rows write a query which two rows r updated last two day befor? Exilant 3
Explain the usage of WHERE CURRENT OF clause in cursors ?   3
Give the structure of the procedure ?   1
what is definer rights invoke rights?   1
..........refers to the disk mirroring iFlex 2
what are pl/sql collections? JPMorgan-Chase 4
If a procedure within a package is invalidated whether the entire package will be invalid and has to be recompiled again? TCS 2
wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod? Oracle 4
What is a cursor ? Why Cursor is required ?   3
When do we create bitmap indexes CTS 2
wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure Apollo 3
 
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