How to find number of asset created in a period along with start and end asset number?

SELECT p.period_name, p.period_counter,
COUNT (a.asset_number) COUNT,
  MIN (a.asset_number) start_number, MAX (a.asset_number) end_number
  FROM fa_additions_b a, fa_deprn_periods p
  WHERE a.creation_date BETWEEN p.period_open_date
AND NVL (p.period_close_date, SYSDATE)
  AND p.BOOK_TYPE_CODE='MY_BOOK1'
GROUP BY p.period_name, p.period_counter
ORDER BY p.period_counter

Leave a comment

Your email address will not be published. Required fields are marked *