10 | 27 Apr 2016 @ 06:27 PDT | Database | Reply | Rollup subtotal as percent of grand total | That is exactly what I needed. Thank you very much. I was so sure I need ROLLUP.
|
9 | 26 Apr 2016 @ 09:49 PDT | Database | Reply | Rollup subtotal as percent of grand total | Also, I should have said derived table, not subquery. Apologies for any confusion.
|
8 | 26 Apr 2016 @ 09:24 PDT | Database | Reply | Rollup 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... |
7 | 26 Apr 2016 @ 07:49 PDT | Database | Reply | Rollup subtotal as percent of grand total | I tried that but I get an error message that says Selected non-aggregate values must be part of the associated group.
|
6 | 25 Apr 2016 @ 11:12 PDT | Database | Reply | Rollup subtotal as percent of grand total | I 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... |
5 | 25 Apr 2016 @ 08:18 PDT | Database | Topic | Rollup 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_... |
4 | 06 Apr 2016 @ 09:08 PDT | Database | Reply | Filtering 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.
|
3 | 06 Apr 2016 @ 08:30 PDT | Database | Reply | Filtering on dates - Explain plan looks right but it returns 0 rows. | Integer.
|
2 | 06 Apr 2016 @ 06:42 PDT | Database | Reply | Filtering 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... |
1 | 05 Apr 2016 @ 12:38 PDT | Database | Topic | Filtering 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... |