#DateForumTypeThreadPost
1027 Apr 2016 @ 06:27 PDTDatabaseReplyRollup subtotal as percent of grand totalThat is exactly what I needed.  Thank you very much.  I was so sure I need ROLLUP.
926 Apr 2016 @ 09:49 PDTDatabaseReplyRollup subtotal as percent of grand totalAlso, I should have said derived table, not subquery.  Apologies for any confusion.
826 Apr 2016 @ 09:24 PDTDatabaseReplyRollup subtotal as percent of grand total SELECT p.product_name, SUM(numOfCalls) TotalCalls,  SUM(CAST(numOfCalls AS FLOAT)) / SUM(TotalCalls) PercentOfCalls FROM LAB_ONE.ft_product ftp JOIN LAB_ONE.dim_s_detail dsd ON ftp.s_deta...
726 Apr 2016 @ 07:49 PDTDatabaseReplyRollup subtotal as percent of grand totalI tried that but I get an error message that says  Selected non-aggregate values must be part of the associated group.
625 Apr 2016 @ 11:12 PDTDatabaseReplyRollup subtotal as percent of grand totalI tried this select which also returns multiple rows for each product -  SELECT   p.product_name, SUM(numOfCalls), CAST (numOfCalls AS DECIMAL (5,2)) / SUM(NULLIF(numOfCalls,0)) And thi...
525 Apr 2016 @ 08:18 PDTDatabaseTopicRollup subtotal as percent of grand total SELECT p.product_name, numOfCalls *100.000/SUM(numOfCalls) OVER (PARTITION BY p.product_name ORDER BY p.product_name) FROM LAB_ONE.ft_product ftp JOIN LAB_ONE.dim_s_detail dsd ON ftp.s_detail_...
406 Apr 2016 @ 09:08 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. Thank you so much!  That works and I really appreciate the explanation of why the ADD_MONTHS didn't work as I had it.
306 Apr 2016 @ 08:30 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. Integer.
206 Apr 2016 @ 06:42 PDTDatabaseReplyFiltering on dates - Explain plan looks right but it returns 0 rows. Thanks for the responses.  The TD Version is 14.10.0.04 and database version is 14.10.06.07. Dieter, I don't know what you mean by both Explains.  I hit f6 and it shows me one a...
105 Apr 2016 @ 12:38 PDTDatabaseTopicFiltering on dates - Explain plan looks right but it returns 0 rows. I'm trying to set up a report that will run monthly and return data from the prior month.  I found a lot of information about how to do this but the only way I can get any data returned is...