SELECT type,COUNT(*),sum(OnHand) FROM (book NATURAL JOIN inventory) GROUP BY Type

/*counting the amount of the same type using select, while also getting the onHand sum of the types, the natural join
/*is to retreive the onHand data from inventory, grouping the table by type.
