write sql query following source table
jan feb mar apr
100 200 300 400
500 600 700 800
900 100 200 300
i want the output format like
month total
jan 1500
feb 900
mar 1200
apr 1500
Answer Posted / chanakya123
Hi, Using UNION ALL ,You can achieve it, here is Your Query
SELECT 'JAN' AS MONTH, SUM(JAN) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'FEB' AS MONTH, SUM(FEB) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'MAR' AS MONTH, SUM(MAR) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'APR' AS MONTH, SUM(APR) AS TOTAL FROM SRC_MONTHS
Thanks
Kalyan Sankuthula
Is This Answer Correct ? | 23 Yes | 0 No |
Post New Answer View All Answers
How to configure mapping in informatica?
What is an Integration service in Informatica?
Explain pushdown optimization $pushdownconfig parameter - informatica
Which means the first record should come as last record and last record should come as first record and load into the target file?
Is it possible to use a client with different version than that of its Informatica server?
Explain the types of transformations?
can anyone suggest best free Talend data integration training online
What is informatica metadata and where is it stored?
Explain constraint based loading in informatica
what are the different types of transformation available in informatica. And what are the mostly used ones among them?
Can we create multiple integration service on single repository?
can i any one explain me realtime healthcare project explanation..for interview .iam new to informatica .thanks in advance.
Informatica Checkpoints
What is sorter transformation?
waht type of interface is used for testing the data in informatica