PID | ProductDesc | ProductCode |
1 | Packet-Eye | P001 |
2 | Wiggy | W099 |
3 | Wimax-Lite | W001 |
4 | Wimax-Home | W002 |
Table1
The table1 above contains 20 Rows
Date | PID |
1/14/2009 | 1 |
1/15/2009 | 1 |
2/1/2009 | 2 |
3/3/2009 | 3 |
Table 2
Table2 contains above 80,000 Rows
Output1 needed is:
Product | Jan 2009 | Feb 2009 | March 2009 | April 2009 | May 2009 | June 2009 | July 2009 |
Packet Eye | 100 | 67 | 87 | 51 | 30 | 90 | 40 |
Wiggy | 300 | 200 | 150 | 20 | 70 | 12 | 100 |
Wimax-lite | 40 | 59 | 70 | 60 | 100 | 20 | 10 |
---- | --- | --- | --- | ----- | ---- | ----- | ----- |
Using Table1 and Table2, construct 2 separate SQL scripts to derive the output illustrated Output 1