|
|
| Welcome to the Monastery | |
| PerlMonks |
Re^2: (Complex)Data Manipulationby poqui (Deacon) |
| on Feb 28, 2005 at 13:53 UTC ( [id://435145]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Oracle SQL-wise its pretty easy: select product, sum(decode(region, 'asia', quantity,0)) as "Asia", sum( decode(region, 'australia',quantity,0)) as "Australia", sum( decode(region, 'UK',quantity,0)) as "UK", sum(quantity) as "Total Imported" from whateverthetablenameis group by product AKA: Pivot report.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||