-- #Doc: read all Dataset Versions and the Version Keeplimit by the given Dataset Puid
-- #LUp: 16.02.2022 S.Gueth initial release
SELECT
 pd.puid               As DataSetPuid,
 rev.pseq              As pd_pseq,
 ra.phighest_rev       As pd_highest_rev,
 ra.pkeep_limit        As pd_keep_limit,
 rev.pvalu_0           As DataSetVersion_Puid
FROM
 infodba.PDATASET pd
 Left Join infodba.PREVISIONS       rev   On (rev.puid = pd.rrev_chain_anchoru)
 Left Join infodba.PREVISIONANCHOR  ra    On (ra.puid =  pd.rrev_chain_anchoru)
WHERE
 pd.puid = :para_DSpuid

