Hello All,
Am trying to perform this query having the followig table:
the criteria is the flag, lets say user chose 00, then the result should be
Where total = SUM(qty * u.p)
it is causing me a big headache ,
Any suggestions ???
Thank you very much in advance.
Am trying to perform this query having the followig table:
Code:
------------------------------- Color | Flag | qty | u.p -------------------------------- red | 00 | 5 | 6 red | 00 | 12 | 2 blue | 00 | 13 | 1.8 blue | 01 | 1 | 4 red | 02 | 10 | 2 red | 01 | 2 | 2 blue | 00 | 6 | 2 blue | 02 | 6 | 2 -----------------------------------
Code:
------------------------------- Color | Flag | Total ------------------------------- Red | 00 | 54 blue | 00 | 35.4 ---------------------------
it is causing me a big headache ,
Any suggestions ???
Thank you very much in advance.
Comment