Hey all,

 

I have some difficulties building a querie.

 

Table objects

type_id

area

 

Table 4dtypes

type_id

name 

 

what I need is a query who gives me the folowing result:

name (grouped by type_id) - sum of area  -- percentage of total area

 

so I need to group the records on type_id, but how can I get the percentage?

 

This is my query till now:

SELECT  4dtypes.name,   Sum(objects_0.area)   FROM 4dtypes, objects  where
4dtypes.type_id=objects.type_id  GROUP BY 4dtypes.type_id

 

I hope you understand,

 

Thx in advance.

Reinhart

 

 

Reply via email to