Hi there🙂
OK, I have an equipment table. In this table there is an onhand, receivedqty, and totalcost fields. How can I query to get an average cost and extended cost?
The math would be totalcost/receivedqty=averagecost and the extended cost would averagecost*onhand. Is it possible to do the equations within the mysql statement. I tried the below but it won't let me use average to get the extended cost.
SELECT tcost, tqty, tcost / tqty AS 'average' , average*tonhand AS 'extended'
FROM equipment