WITH deleted_textids AS (
  SELECT textid FROM "i18n-texts" WHERE category = 'productTitles'
),
deleted_data AS (
  DELETE FROM "i18n-texts_data"
  WHERE textid IN (SELECT textid FROM deleted_textids)
  RETURNING textid
),
deleted_texts AS (
  DELETE FROM "i18n-texts"
  WHERE textid IN (SELECT textid FROM deleted_textids)
  RETURNING textid
)
SELECT
  (SELECT COUNT(*) FROM deleted_data) AS deleted_data_count,
  (SELECT COUNT(*) FROM deleted_texts) AS deleted_texts_count;
