SELECT
    coca.itemNumber,

    sum(x_checkOutCountAnnual.2006) as 2006,
    sum(x_checkOutCountAnnual.2007) as 2007,
    sum(x_checkOutCountAnnual.2008) as 2008,
    sum(x_checkOutCountAnnual.2009) as 2009,
    sum(x_checkOutCountAnnual.2010) as 2010,
    sum(x_checkOutCountAnnual.2011) as 2011,
    sum(x_checkOutCountAnnual.2012) as 2012,
    sum(x_checkOutCountAnnual.2013) as 2013,
    sum(x_checkOutCountAnnual.2014) as 2014,
    sum(x_checkOutCountAnnual.2015) as 2015,

    ib.itemNumber as ib_ItemNum,
    ib.bibNumber as ib_BibNum,

    it.itemNumber as it_ItemNum,
    it.itemType as it_ItemNum,
    bibNumber
    web.bib as web_Bib,
    web.type as web_Type
FROM
    spl.x_checkOutCountAnnual coca
        INNER JOIN
    spl.itemToBib ib ON coca.itemNumber = ib.itemNumber
        INNER JOIN
    spl.itemType it ON ib.itemNumber = it.itemNumber
        INNER JOIN
    spl3.x_splOrgWebScraping web ON web.bib = ib.bibNumber
WHERE
    (it.itemType = 'acbk' OR it.itemType = 'arbk'
        OR it.itemType = 'bcbk'
        OR it.itemType = 'drbk'
        OR it.itemType = 'jcbk'
        OR it.itemType = 'jrbk')
        AND (web.type >= 2006)

      group by ib.bibNumber
        order by ib.bibNumber
