( SUM (COUNT (c.vendor)) OVER (PARTITION BY (TRUNC SUM (COUNT (c.vendor)) OVER (PARTITION BY (TRUNC (SUM (l.contamt) OVER (PARTITION BY (TRUNCĬOUNT (p.cprojnum) OVER (PARTITION BY (TRUNC TRUNC (TO_CHAR (b.datelet, 'Q')) quarter, may be u need to change the datatype of the second half of union all statement Order by TRUNC (TO_CHAR (B.DATELET, 'Q')) GROUP BY TRUNC (TO_CHAR (B.DATELET, 'Q')), P.CPROJNUM, l.contamt To_char(SUM (COUNT (C.VENDOR))OVER (PARTITION BY (TRUNC (TO_CHAR (B.DATELET, 'Q')))) / count(P.CPROJNUM) OVER (PARTITION BY (TRUNC (TO_CHAR (B.DATELET, 'Q')))), '999.99') AverageNumberOfBidderĪND TRIM (UPPER (TIMELET)) = TRIM ('9:30 A.M.')ĪDD_MONTHS (TRUNC (TO_DATE (:year, 'YYYY'), 'YYYY'), SUM (COUNT (C.VENDOR))OVER (PARTITION BY (TRUNC (TO_CHAR (B.DATELET, 'Q')))) NumberOfBidders, To_char (sum(l.contamt) OVER (PARTITION BY (TRUNC (TO_CHAR (B.DATELET, 'Q')))), '$999,999,999.99') AwardedDollarAmount ,Ĭount(P.CPROJNUM) OVER (PARTITION BY (TRUNC (TO_CHAR (B.DATELET, 'Q')))) ProjectAwarded, SELECT DISTINCT 'Q'||(TRUNC (TO_CHAR (B.DATELET, 'Q')))||' - ' || :year QuarterYear ,TRUNC (TO_CHAR (B.DATELET, 'Q')) Quarter, I am just wondering if I could add another row to create a grand total for all rows returned running this query. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.8K Oracle Database Express Edition (XE).3.7K Java and JavaScript in the Database.
Want to practice sorting your table and/or sorting the bar chart? Download the spreadsheet I used in this blog post. It just re-sorts your bar chart in the opposite order of your table.Ĭomment and let me know: Which method do you prefer, and why? Do you prefer Option A, in which you anticipate that the table will do a somersault, and you sort the table upside down? Or do you prefer Option B, in which you use the Categories in Reverse Order button to sort the bar chart itself? Bonus: Download the Spreadsheet That’s a jargony name with a straightforward purpose.
Option B, my preferred method, is to leave your table alone. Option B: Re-Sort the Bars within the Chart You anticipate that your chart is going to do a somersault and sort your table the opposite of what you want to appear in your chart. A largest to smallest sorting should produce a largest to smallest chart, right? Right? Right? But the chart does a somersault! Well, that would be the logical approach. To arrange your bar chart from greatest to least, you sort the # of votes column from largest to smallest. You can see which rows I highlighted in the screenshot below. Here’s how you can sort data tables in Microsoft Excel: If you’re not working in spreadsheets all the time, you may not have discovered sorting and filtering features before.
You’ve got two options for re-sorting your bar chart.
How to Re-Sort Your Bar Charts in Microsoft Excel Our viewers will either want to know about the favorite fruit (a greatest to least ordering) or they’ll want to know about the least favorite fruit (a least to greatest ordering). Our original table is ordered alphabetically and that just won’t do. My toddler is eating two! bananas a day so bananas are the winner in this fictional fruit contest. You read my prior post about using horizontal bar charts for nominal variables like favorite fruits. “Ann, my bar chart is upside down! Help!”