Chris Smith wrote:

[snip]
now create a view to see how many book 1 are sold:
--------------------------^^^^^^^
CREATE VIEW v_sell AS
  SELECT book,sum(num) AS num
------------------^^
  FROM sell
  GROUP BY book;
[snip]

Possibly we said 'sum' when we really meant 'count'?
R,
C

different. as in table sell: sqlite> select * from sell; book num ---------- ---------- 1 5 1 5

select sum(num) from sell
will return 10, which is the total quantity of the two deal
while
select count(num) from sell
just return 2, which is the quantity of how many deals are in table sell


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to