create or replace view item_thumb_view as 
select
	dbr_item.*, bd_file_url
from
	dbr_item
	left join 
		( select
			media_id,
			bd_file_url
		from
			dbr_media_bd
		where image_type = 'thumb'
		) as com
	on com.media_id = dbr_item.media_id