when i handle BI data,I found the same data is not i need,so,i want use postgresql handle data, I want get the reuslt like this style,the postgesql select how write ?
-- ----------------------------
-- Table structure for data_test
-- ----------------------------
DROP TABLE IF EXISTS "public"."data_test";
CREATE TABLE "public"."data_test" (
"c_id" int4 NOT NULL,
"n_id" int4,
"b_id" int4
)
;
-- ----------------------------
-- Records of data_test
-- ----------------------------
INSERT INTO "public"."data_test" VALUES (58748, 587, 55);
INSERT INTO "public"."data_test" VALUES (5895, 587, 55);
INSERT INTO "public"."data_test" VALUES (12131, 567, 53);
INSERT INTO "public"."data_test" VALUES (33412, 568, 54);
INSERT INTO "public"."data_test" VALUES (5841, 569, 52);
INSERT INTO "public"."data_test" VALUES (587, 500, 51);
INSERT INTO "public"."data_test" VALUES (5871, 500, 51);

