select bt.ISBN, bt.title, bt.author, bt.classmark, ct.copy#, count(s) numOnLoan
from book_tab bt, copy_tab ct, table(ct.isSubjectOf) s
where bt.ISBN like 'S.321.45%'
or bt.title like 'S.321.45%'
or bt.author like 'S.321.45%'
or bt.classmark like 'S.321.45%'
hello folks i cant seem to find any threads that answer my question.
if i remove the count this query works
each row in the copy_tab has a nested table of ref to loan_t. I want to output a column for each row that displays how many rows there are in the nested table i.e. how many copies are on loan.
i have tried a few things but none of them work! hence why im here!