vgrabovets
11/1/2016 - 10:03 AM

non major producers

non major producers

SELECT
  v.obj_id
, v.title
, v.title_en
, v.type
FROM
  megogo2.video v
    LEFT JOIN megogo2.biz_contracts bc ON bc.id = v.contract
    LEFT JOIN megogo2.biz_contracts bc1 ON bc1.id = bc.parent_contract
    LEFT JOIN megogo2.dict_biz db ON bc1.id_biz = db.biz_id
WHERE db.biz_id NOT IN (1691, 1681, 1701, 1111, 1341, 1861)
AND v.type NOT IN ('SERIA', 'SEASON', 'TRAILER', 'ANNOUNCE')
  GROUP BY v.obj_id