SELECT * FROM tbl_works INNER JOIN tbl_artists ON tbl_artists.artist_id = tbl_works.artist_id WHERE tbl_works.work_active = 'Yes' AND tbl_artists.artist_stockroom = 'Yes' AND tbl_works.stockroom = 'Yes' AND work_status_id != 2 AND work_status_id != 3 AND tbl_artists.artist_id = '480' ORDER BY work_rank ASC, work_type_id ASC