|
SELECT apparature.app_name, buildings.GF, buildings.Shed_primary, COUNT (apparature.kind_signal) FROM apparature INNER JOIN (buildings INNER JOIN OBJ_APP ON buildings.ID_OBJ = OBJ_APP.ID_OBJ) ON apparature.ID_APP = OBJ_APP.ID_APP WHERE apparature.kind_signal = '' GROUP BY apparature.app_name, buildings.GF, buildings.Shed_primary
http://www.sql.ru/forum/1088134/zapros-s-podschetom-kolichestva-treh-tipov-znacheniy-polya