For the request given above – “how many inhabitants are there in every street?” (using the table “List of Building Certificates”) it is necessary to specify the calculation condition in which the calculation group should contain the only field “Street”, the calculated field with the operation of summation should override the field “Total Inhabitants”.
To get an answer to the request it is necessary to perform the following actions:
open a browser window of the table “List of Building Certificates” (chapter 24 “Browsing a table”);
hide all the fields except “Street” and “Total Inhabitants”;
select the field “Total Inhabitants” and perform the command Fields+Calculations, a dialog box “Calculations by field Total Inhabitants” will be opened (figure 29-2);
check the box Sum in the dialog box “Calculations by field Total Inhabitants” and push the button OK. The dialog box will be closed and the browser window will take the form presented at figure 29-4.
Figure 29-4. Query – result of the request “Total Inhabitants in every street”
Let's examine some more examples of calculations in the table “List of Building Certificates”:
“number of inhabitants in buildings of municipal and non-municipal housing in every street” – hide all the fields except “Street” , “Is Municipal?” and “Total Inhabitants”, specify the operation “Sum” for the field “Total Inhabitants” (figure 29-5);
Figure 29-5. Query – result of the request “number of inhabitants in the buildings of municipal and non-municipal housing in every street”
“number of buildings in every street” – hide all the fields except “Street” and “Building Number” (or another one), specify the operation “Count” for the field “Building Number” (figure 29-6);
Figure 29-6. Query – result of the request “number of buildings in every street”
“average number of inhabitants per building in every streets” – hide all the fields except “Street” and “Total Inhabitants”, specify the operation “Average” for the field “Total Inhabitants” (figure 29-7).
Figure 29-7. Query – result of the request “average number of inhabitants per building in every street”
“average area of buildings of municipal and non-municipal housing in every street” – hide all the fields except “Street”, “Is Municipal?” and “Area”, specify the operation “Average” for the field “Area” (figure 29-8);
Figure 29-8. Query – result of the request “average area of buildings of municipal and non-municipal housing in every street”