![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Wed, 20 Nov 2002 @ 19:35:35 GMT
This looks like it has come from one of the NCR courses. Overall, the query is returning the average daily sales value. For instance, if the daily sales vaues for three days were 80, 90 and 100, this query would return a value of 90 as the single row answer. The derived table portion... SELECT calulates the total sales by date (date column is Period_Date). The outer query portion... SELECT AVG(Daily_Amt) AS Daily_Average FROM then calculates the average of these daily sales totals. Dave Ward Analytics Ltd: Information in motion (www.ward-analytics.com)
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||