From: "Michael Stassen"
> 2) In general, you should'nt put things in the JOIN condition which are
not
> part of the JOIN criteria. For example, the condition "c.salescode =
> '$salescode_param'" is a restriction on which rows in c to consider, not a
> condition of the JOIN to t or tt, so it belon
Hi Michael,
Thank you for being so kind to explain the problem to me.
Michael Stassen wrote:
sam wun wrote:
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 =
"SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolu
sam wun wrote:
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 =
"SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolume),2) 'PastSales Quantity',
ROUND(avg(tt.salesvolume),2) 'Sales Quantity',
R
sam wun wrote:
Hi,
Can anyone tell me how to optimize the following sql statement?
$sql_1 = " SELECT t.prodcode 'Product Code',
t.prodname 'Product Name',
ROUND(avg(t.salesvolume),2) 'PastSales Quantity',
ROUND(avg(tt.salesvolume)