write sql query following table
quarter sales
q1 1000
q1 2000
q1 3000
q1 4000
q2 5000
q2 6000
q2 7000
q2 8000
q3 1000
q3 2000
q3 3000
q3 4000
q4 5000
q4 6000
q4 7000
q4 8000
i want the output format like
q1 q2 q3 q4
1000 5000 1000 5000
2000 6000 2000 6000
3000 7000 3000 7000
4000 8000 4000 8000
Answer Posted / jj
without one more column its not possible i thing , it shoud
have prod or some thing
select prod,sum(q1),sum(q2),sum(q3),sum(q4) from (
select prod,(case when quarter='q1' then sal end) q1
,(case when quarter='q2' then sal end) q2
,(case when quarter='q3' then sal end) q3
,(case when quarter='q4' then sal end) q4 from za)
group by prod
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
I want my deployment group to refer an external configuration file, while i deploy in the production environment. How can i achieve it.
Implementation methodology
Explian the Process of deployment groups in informatica
What do you mean by DTM and Load manager and what is difference between load manager and load balancer?
Explain pushdown optimization $pushdownconfig parameter - informatica
What is the function of look up transformation?
What is a transaction control transformation?
Differentiate between a repository server and a powerhouse?
What are the different components of powercenter?
What is the reusable transformation?
What are roles and groups and benefits of using them?
What is the session task and command task?
Hi, I want to change date type char value integer value? I tried alter table tab_name modify (newcolumn newdatetype). But The columns have 10 million values(char type) so I want to load now numeric data. How it is possible? Old Values New Value(I want to load numeric data but the old value should be there in the column) Y 1 N 0 ERROR at line 1: ORA-01439: column to be modified must be empty to change datatype Please help on this. Thanks, GM
tell me 5 session failure in real time how can you solve that in your project?
Where do we use mapping variables in informatica?