CREATE TABLE test2 ( id INTEGER, name VARCHAR(10), family VARCHAR(10), amount INTEGER) CREATE VIEW dbo.test2_v WITH SCHEMABINDING AS SELECT id, SUM(amount) as amount -