SELECT book_code FROM lend
GROUP BY book_code
HAVING COUNT(book_code) = (SELECT COUNT(bilet_number) FROM abonents)
select book_code, count(distinct bilet_number) lends
from lends
group by book_code
having count(distinct bilet_number) = (select count(distinct bilet_number) from abonents)