I added some custom columns:
Tax1, Tax2, Tax3, Tax4, Tax5, Average Tax, Price1, Price 2, TotalPrice
I need to perform with basic arithmetric calculation to fetch the Average Tax Column from the 5 other tax defined tax columns! Then use the Average Tax to calcuate with some other price columns.
Examples of calculation i want, I just don't know SQL to work it out in LSQL:
$Average_Tax = int(($Tax1 + $Tax2 + $Tax3 + $Tax4, $Tax5)/5);
$Average_Tax = sprintf ("%.2f", $Average_Tax);
$subaverage_tax = int(10 * $Average_Tax);
$subprice1 = int(20 * $Price1);
$subprice2 = int(20 * $Price2);
$TotalPrice = int(($subaverage_tax + $price1 + $price2)/1.87);
$TotalPrice = sprintf ("%.2f", $TotalPrice);
Much appreciated if anyone can define above into SQL!
I have a few cookies to give out to helpers! Actually three chocalate chip cookies:)
Tax1, Tax2, Tax3, Tax4, Tax5, Average Tax, Price1, Price 2, TotalPrice
I need to perform with basic arithmetric calculation to fetch the Average Tax Column from the 5 other tax defined tax columns! Then use the Average Tax to calcuate with some other price columns.
Examples of calculation i want, I just don't know SQL to work it out in LSQL:
$Average_Tax = int(($Tax1 + $Tax2 + $Tax3 + $Tax4, $Tax5)/5);
$Average_Tax = sprintf ("%.2f", $Average_Tax);
$subaverage_tax = int(10 * $Average_Tax);
$subprice1 = int(20 * $Price1);
$subprice2 = int(20 * $Price2);
$TotalPrice = int(($subaverage_tax + $price1 + $price2)/1.87);
$TotalPrice = sprintf ("%.2f", $TotalPrice);
Much appreciated if anyone can define above into SQL!
I have a few cookies to give out to helpers! Actually three chocalate chip cookies:)