13 |
|
|
14 |
h1 { _('Statistics') } |
h1 { _('Statistics') } |
15 |
|
|
16 |
my $orgs = A3C::Model::OrganizationCollection->new; |
my $orgs = A3C::Model::hrEduOrgCollection->new; |
17 |
$orgs->unlimit; |
$orgs->unlimit; |
18 |
|
|
19 |
dt { _('Number of schools in system') } |
dt { _('Number of schools in system') } |
20 |
dd { $orgs->count } |
dd { $orgs->count } |
21 |
|
|
22 |
my $people = A3C::Model::PersonCollection->new; |
my $people = A3C::Model::hrEduPersonCollection->new; |
23 |
$people->unlimit; |
$people->unlimit; |
24 |
|
|
25 |
dt { _('Number of persons in system') } |
dt { _('Number of persons in system') } |
27 |
|
|
28 |
my $by_towns = A3C::SQL->new({ query => qq{ |
my $by_towns = A3C::SQL->new({ query => qq{ |
29 |
select count(uid),l |
select count(uid),l |
30 |
from organizations |
from hr_edu_orgs |
31 |
inner join towns on towns.name = l |
inner join towns on towns.name = l |
32 |
group by l |
group by l |
33 |
order by count desc |
order by count desc |
48 |
count(uid) as schools, |
count(uid) as schools, |
49 |
county, |
county, |
50 |
count(distinct municipality) as municipalities |
count(distinct municipality) as municipalities |
51 |
from organizations |
from hr_edu_orgs |
52 |
inner join towns on towns.name = l |
inner join towns on towns.name = l |
53 |
group by county |
group by county |
54 |
order by schools desc |
order by schools desc |