G
Guest
I am making a report built on querie that shows company_name, sales, assets, assets order. The report must shows all this fields based on sales sorted descending, the problem is: sometimes when there are 2 companies has same assets figure, assets order calculated and appear same figure, for example
Company name Sales Assets Assets orde
Comp 1 5000 10000
Comp 2 4500 12000
Comp 3 4000 9000
Comp 4 3500 12000
This is the report, comp2 & comp4 has same assets but comp2 sales is higher than comp4 sales and the assets order same for both
I need the report to show that comp4 assets order as 2 because its sales is less than comp
How?
The assets order SQL as follows
assetsord: (select count(*) from companyinfo where companyinfo.assets > comp1.assets)+
Company name Sales Assets Assets orde
Comp 1 5000 10000
Comp 2 4500 12000
Comp 3 4000 9000
Comp 4 3500 12000
This is the report, comp2 & comp4 has same assets but comp2 sales is higher than comp4 sales and the assets order same for both
I need the report to show that comp4 assets order as 2 because its sales is less than comp
How?
The assets order SQL as follows
assetsord: (select count(*) from companyinfo where companyinfo.assets > comp1.assets)+