lundi 24 août 2015

how can i structure a query which dynamically assigns an entity to a customer on sqlite

I have the data in the following format entities Customer Area_code Marketshareofcustomer sales($) 1 A xy 20% 1000 2 B xy 30% 1000 3 C xy 10% 1000 4 D xy 40% 1000 5 xy 1000 6 xy 1000 7 G ab 60% 1000 8 E ab 40% 1000 9 ab 1000

and the desired result is as Area_Code Customer Sales xy A 1400 xy B 1600 xy C 1200 xy D 1800 ab G 1600 ab E 1400

how can i structure my sql statement

Aucun commentaire:

Enregistrer un commentaire