sounds like homework
okay, let's try questions 1 though 4 all in one query
On (1)Day X which items have (2,3)left/entered the warehouse (4) how many
Code:
select iname
, sum(no_in) as how_many_in
, sum(no_out) as how_many_out
from inventory
where idate = '2005-01-24'
group
by iname
note i changed date and name to idate and iname because the former were too close to being actual reserved words
see? no mention of bees or trees!!
