home / current_collection

new_titles_view (view)

0 rows where item_format = "DVD/Videocassette"

✎ View and edit SQL

This data as json

0 records

CREATE VIEW new_titles_view AS select
  json_object(
    -- 'img_src', 'https://covers.openlibrary.org/b/isbn/0899080871-L.jpg',
    'img_src',
    'https://covers.openlibrary.org/b/isbn/' || json_extract(bib.isbn_values, '$[0]') || '-L.jpg',
    'href',
    'https://cincinnatilibrary.bibliocommons.com/v2/record/S170C' || bib.bib_record_num
  ) as jacket,
  json_object(
    --'img_src', 'https://placekitten.com/200/300',
    'href',
    'https://cincinnatilibrary.bibliocommons.com/v2/record/S170C' || bib.bib_record_num,
    'label',
    bib.best_title,
    -- || coalesce(vol_statement, ''),
    'title',
    bib.best_title || coalesce('
' || bib.best_author, ''),
    'description',
    bib.best_author || '
' || bib.publish_year || coalesce ('
' || bib.bib_level_callnumber, '')
  ) as catalog_link,
  cataloging_date,
  -- isbn_values,
  (
    select
      item_format
    from
      item
    where
      item.bib_record_num = bib.bib_record_num
    group by
      1
    order by
      count(*) DESC
    limit
      1
  ) as item_format,
  indexed_subjects
from
  bib
where
  cataloging_date >= date('now', 'weekday 1', '-7 days', '-30 days')
order by
  cataloging_date DESC;
Powered by Datasette · Queries took 1031.561ms