Hello All, With the select statement below and my test data of 43 files, I expected the following results
22 'Less than 1MB' 4 'Less than 5MB' 7 'Less than 10MB' 4 'Less than 15MB' 6 'Less than 20MB' Instead I get 16 'Less than 1MB' 18 'Less than 5MB' 9 'Larger than 25GB' I have been pulling my hair out trying to figure out where I went south. If someone could, would you point out my mistake, please? SELECT category, COUNT(*) AS Expr1 FROM (SELECT (CASE WHEN VI_File_Len < 1024000 THEN 'Less Than 1MB' WHEN VI_File_Len < 2048000 THEN 'Less Than 2MB' WHEN VI_File_Len < 5120000 THEN 'Less Than 5MB' WHEN VI_File_Len < 10240000 THEN 'Less Than 10MB' WHEN VI_File_Len < 102400000 THEN 'Less Than 100MB' WHEN VI_File_Len < 512000000 THEN 'Less Than 500MB' WHEN VI_File_Len < 1024000000 THEN 'Less Than 1GB' WHEN VI_File_Len < 2048000000 THEN 'Less Than 2 GB' WHEN VI_File_Len < 5120000000 THEN 'Less Than 5 GB' WHEN VI_File_Len < 10240000000 THEN 'Less Than 10 GB' WHEN VI_File_Len < 15360000000 THEN 'Less Than 15 GB' WHEN VI_File_Len < 204800000000 THEN 'Less Than 20 GB' WHEN VI_File_Len < 358400000000 THEN 'Less Than 25 GB' ELSE 'Larger Than 25GB' END) AS category FROM Volume_Information) derivedtbl_1 GROUP BY category Regards, -Ron _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

