SELECT `i`.`slug` as `gallery_slug`, `d`.`slug`, `a`.`isecommerce_enabled`, `a`.`idcompany` as `masterpiece_online_galleries_id`, `b`.`dim_units`, `a`.`idcompany_item` as `masterpiece_online_items_id`, `b`.`title` as `parent_title`, `b`.`quantity`, `d`.`artist_desc` as `description`, CONCAT('http://', `f`.`server_path`, '/', f.picture) AS img_path, `b`.`edition_type` as `type`, `d`.`idcompany_artist` as `masterpiece_online_artists_id`, `b`.`title` as `title`, `a`.`retail_price_web_online` as `artprice`, CONCAT(IFNULL(e.title, ''), ' ', IFNULL(e.firstname, ''), ' ', IFNULL(e.lastname, '')) AS artist, `a`.`desc_web_online`, `d`.`logo_path` AS `artist_img_path`, `g`.`category` as `category`, `h`.`category` as `subcat`, `b`.`idcompany_art_category` as `cat_id`, `b`.`title_type` as `sub_cat_id`, `e`.`city` as `ard_city`, `e`.`state` as `ard_state`, `e`.`country` as `ard_country`, `i`.`name` as `gallery_title`, `b`.`idcompany` as `masterpiece_online_galleries_id`, `b`.`idcompany_location` as `masterpiece_online_location_id`, `b`.`qoh`, `d`.`logo_path` as `artist_img_path`, `b`.`art_height`, `b`.`art_width`, `b`.`frame_width`, `b`.`frame_height`, `j`.`idcompany_auction_item` as `masterpiece_online_auction_item_id`, `j`.`num_bidders`, `j`.`current_bid_amount`, `j`.`max_bid_amount`, `j`.`display_bid_amount`, `j`.`next_bid_amount`, `j`.`starting_bid_amount`, `b`.`starting_bid`, (CASE WHEN b.edition_type = 2 THEN b.start_date ELSE b.start_date END) as auction_start_date, (CASE WHEN b.edition_type = 2 THEN b.end_date ELSE b.end_date END) as auction_end_date, `i`.`idcompany`, `b`.`scancode` as `scan_code`, `a`.`isdisplay_retail_price_web_online`, `b`.`is_3d`, `b`.`ed_size`, `j`.`current_active_auction`, `n`.`city` as `location_name`, `e`.`full_name` as `artist_name` FROM `company_items_web_online` as `a` LEFT JOIN `company_item` as `b` ON `a`.`idcompany_item` = `b`.`idcompany_item` LEFT JOIN `company_artist` as `d` ON `b`.`idcompany_artist` = `d`.`idcompany_artist` LEFT JOIN `company_contact` as `e` ON `e`.`idcompany_contact` = `d`.`idcompany_contact` LEFT JOIN `company_item_pictures` as `f` ON `b`.`idcompany_item` = `f`.`idcompany_item` LEFT JOIN `company_art_category` as `g` ON `g`.`idcompany_art_category` = `b`.`idcompany_art_category` LEFT JOIN `company_art_category` as `h` ON `h`.`idcompany_art_category` = `b`.`title_type` LEFT JOIN `company` as `i` ON `a`.`idcompany` = `i`.`idcompany` LEFT JOIN `company_auction_item` as `j` ON `b`.`idcompany_item` = `j`.`idcompany_item` AND (`j`.`idcompany_auction` is null) LEFT JOIN `company_location` as `n` ON `n`.`idcompany_location`=`b`.`idcompany_location` WHERE `i`.`isdisplay_web_online` = 1 AND `b`.`title` = 'Longhorn Skull' AND `e`.`full_name` = 'Mick Doellinger' AND `g`.`category` = 'Sculpture' AND (SELECT count(*) FROM company_item_pictures WHERE idcompany = `b`.`idcompany` AND `idcompany_item` = b.idcompany_item) > 0 AND `a`.`isdisplay_web_online` = 1 GROUP BY `b`.`idcompany_item` ORDER BY `i`.`name` ASC