I am using to this query to convert raster values into vector data
SELECT dp.*
     , g.gid gid
     , g.geom ggeom
FROM public.t32ulc_entire_tile rast
     , LATERAL ST_PixelAsCentroids(rast.rast, 1) as dp
JOIN raster_grid g ON dp.geom && g.geom 
;
this resulting on
b1    |geom                  |
------ ----------------------+
5135.0|POINT (300005 5800015)|
4994.0|POINT (300015 5800015)|
4515.0|POINT (300025 5800015)|
3942.0|POINT (300035 5800015)|
As my raster data contains other bands and I want to retrieve the data from that bands too with ST_PixelAsCentroids(rast.rast, 2), ST_PixelAsCentroids(rast.rast, 3). How can I extract all necessary values within this query? or should I do it with as?
 
     
    