Insert data in CB bucket Nested format from other bucket using N1QL

If you want use flat documents or ARRAY are depends on various use cases. It has it own advantages and disadvantages.
As I have limited knowledge on Use cases so not able advise anything on that.

You can check out

SELECT  r.ARR_DT , MIN(ARRAY_MIN(r.RATEBYTYPE[*].RATES) ) AS minrate
FROM  TARGET  AS t 
UNNEST t.RATES AS r
WHERE t.ASDT=“2020-01-10” AND t.SRC = “EXP”
GROUP BY r.ARR_DT;