-CREATE VIEW distribution_architectures AS
- (((((((((((((
- SELECT DISTINCT packages.distribution, 'alpha'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM alpha.packages
+CREATE VIEW distribution_architectures AS (((((((((((((
+ SELECT DISTINCT packages.distribution, 'alpha'::character varying AS architecture, count(case when state='Needs-Build' then 1 end) as needsbuild FROM alpha.packages group by packages.distribution