Using the spreadsheet Builder
SQLThing has a powerful spreadsheet builder that allows you to make cross-tabulations of data in tabular format. This is best seen by example. Type the following query into the editor window:
select month(orderdate) as "Month", shipcountry, productname,
quantity*unitprice as "Full Price", (quantity*Unitprice)*discount as
"Discount Price",
Quantity as "Units Sold" from sqlexamp.ordersdet;
Press Tools->Spreadsheet Builder. When the dialog appears, assure that the radio button rests on 3D spreadsheet and press Next. The following screen will appear:
Note the drop down list "Current Z Axis". Push the dropdown and select Z Totals. You are now looking at the total for all products by country by month. The Z axis will allow you to view each individual product, or the Z Totals.
Press the Variables menu. You will now see all available items. You should have "Full Price", "Discount Price" and "Units Sold"
Take a moment to note how the query turns into the different axis values. The first query column turns into the columns axis. The second element turns into the row axis. The third element turns into the Z axis. Each element after the Z element will be turned into a Variable menu item and aggregated into a matrix. You dive through the matrix via the Z axis.
You may swap axis using the rotate selection, and change the numeric formula with the calculations menu.
Place you mouse on the first Germany columns and press Graph->Current Row. Graphs can be printed.