Wednesday, July 24, 2024

Query to get boundary values - DB2

 


SELECT '["' || Max(LONGDESCRIPTIONID) || '"],' /*, COUNT(*)*/

FROM ( SELECT LONGDESCRIPTIONID, NTILE(30) OVER (ORDER BY LONGDESCRIPTIONID) AS nt FROM MAXIMO.LONGDESCRIPTION ) AS subquery

GROUP BY nt

ORDER BY nt;


1 comment: