DELETE FROM smet_mod_par WHERE metmod_id IN (
  58, 895, 414, 422, 914, 178);

DELETE FROM m_lab_jez_mod sta WHERE EXISTS (
  SELECT sifra, sifra_metapl FROM smet_moduli zag WHERE sta.sifra_metmod = zag.sifra AND sta.oznaka = zag.oznaka AND zag.id IN (
    58, 895, 414, 422, 914, 178));

DELETE FROM smet_mod_lab sta WHERE EXISTS (
  SELECT sifra, sifra_metapl FROM smet_moduli zag WHERE sta.sifra_metmod = zag.sifra AND sta.oznaka = zag.oznaka AND zag.id IN (
    58, 895, 414, 422, 914, 178));

DELETE FROM smet_mod_por sta WHERE EXISTS (
  SELECT sifra, sifra_metapl FROM smet_moduli zag WHERE sta.sifra_metmod = zag.sifra AND sta.oznaka = zag.oznaka AND zag.id IN (
    58, 895, 414, 422, 914, 178));

DELETE FROM smet_mod_rc sta WHERE EXISTS (
  SELECT sifra, sifra_metapl FROM smet_moduli zag WHERE sta.sifra_metmod = zag.sifra AND sta.oznaka = zag.oznaka AND zag.id IN (
    58, 895, 414, 422, 914, 178));

