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 (2038)
 SQL Server interview questions  SQL Server Interview Questions (1078)
 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 (53)
 SQL PLSQL interview questions  SQL PLSQL Interview Questions (775)
 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
 
ename empno deptno amar 1 10 akbar 2 20 anthonny 3 30 jonathan 4 40 write a procedure to dispaly the column values ina row separated by a deleimiter eg - input - select ename from emp '|' output - amar|akbar|anthony|jonathan input - select empno from emp '@' o/p - 1@2@3@4 input - select deptno from emp '/' o/p - 10/20/30/40 Pls answer this questn.   2
how can stop the sequence with mention the max value and with out mention the max value Zensar 1
How pl/sql source code can be protected?   2
how to retrieve last tree records from table? select *from emp where rownum > (select count(*)-3 from emp); i am using this query to get last three records from table but its not giving any output, so please tell me what is the error in this query.   15
how to remove records from table? no name 1 a 2 b 1 a 2 b 3 c Oracle 8
SQL Tuning, Oracle Server 10g: Why is the following hint invalid? SELECT /*+ first_rows parallel(table_name,paral_number)*/ Accenture 1
I have 2 packages A and B. Now package A references Package B and Package B references Package A. How do you compile such inter-dependent objects in PL/SQL Metric-Stream 1
In testing where do we use sql language and how it helps in testing?   2
If records are inserted into table without committing.How to refer to these values in a procedure?   2
What are the blocks in stored procedure? Microsoft 5
What is a bitmap index? Choice-Solutions 4
I want to create synonym for table emp but in my pc it is giving insufficient previliges.I am using user scott.Please suggest me.   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