使用的查询是
SELECT modi, aid FROM (SELECT
GROUP_CONCAT(id) his,
an_id aid,
GROUP_CONCAT(m_id) modi
FROM
ah
GROUP BY an_id, m_id) t1
GROUP BY aid, modi
order by aid;
现在我需要一个MySQL query which will give me a result set where if column
帮助has the same value in two rows should create a new column with same
帮助and
modi`。
例如,图像中的前两行相同aid
但不同modi
。我需要的结果应该有3列,行应该像这样,
aid modi modi2
27 6,6,6,6,6,6,6,6,6 8
我对SQL非常陌生。预先感谢
答案 0 :(得分:1)
嗯,一种方法是:
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@RequestMapping(consumes = "application/x.company.v1+json",
produces = "application/x.company.v1+json")
public @interface CustomJsonV1RequestMapping {
@AliasFor(annotation = RequestMapping.class, attribute = "value")
String[] value() default {};
@AliasFor(annotation = RequestMapping.class, attribute = "method")
RequestMethod[] method() default {};
@AliasFor(annotation = RequestMapping.class, attribute = "params")
String[] params() default {};
@AliasFor(annotation = RequestMapping.class, attribute = "headers")
String[] headers() default {};
@AliasFor(annotation = RequestMapping.class, attribute = "consumes")
String[] consumes() default {};
@AliasFor(annotation = RequestMapping.class, attribute = "produces")
String[] produces() default {};
}