SELECT
  C.ITEM_NAME,
  C.CONDITION_KBN AS OPERATOR,
  C.CONDITION_ITEM AS CONDITION
FROM
  TR_GENERIC_CSV T
INNER JOIN
  TR_GENERIC_CSV_CONDITION C
ON
  C.USER_PATTERN_NO = T.USER_PATTERN_NO
  AND C.VERSION > 0
INNER JOIN
  MS_GENERIC_CSV M
ON
  M.DEFINE_NAME = T.DEFINE_NAME
  AND M.VERSION > 0
INNER JOIN
  MS_GENERIC_CSV_DTL D
ON
  D.DEFINE_NO = M.DEFINE_NO
  AND D.PHYSICAL_ITEM_NAME = C.ITEM_NAME
  AND D.VERSION > 0
WHERE
  T.ID = /*:Id*/91
  AND T.VERSION > 0
ORDER BY
  C.DTL_NO
