SQL help

Re: SQL help

I'm in a hurry right now. So I just skim through your problem.

What I would do first is remove the average price query and just test the results of the ones with papertype. If the results are satisfactory then pass in average price . that way youwill know where you are going wrong...

Change the dataype of papertype to a BIT(0,1) also considered as ( false or true). Set the default value to 0 which means by default the book is not a paper type.

You can say ..... where papertype = 1

I cant really test it here.. can you give some examples of raw data( looking for book types in particular)