0

There is my request to find actualities on my website, I got error in this request and I don't know what i need to do for solve this error

Error:

Column "quote_plus_normal_gr_publi.id_post_normal" must appear in the GROUP BY clause or be used in an aggregate fun

Query:

SELECT 
    publi.date, publi.mess, publi, publi.profil, publi.color, 
    publi.name, publi.search
FROM 
    publi
INNER JOIN 
    (SELECT 
         id_post_normal, COUNT(id_post_normal)
     FROM 
         quote_plus_normal_gr_publi
     ORDER BY 
         id_post_normal) q ON q.id_post_normal = publi.id_post_normal
WHERE 
    publi.id_personnes = 1
ORDER BY 
    date DESC
0

1 Answer 1

1

I think something wrong in your select statement

SELECT publi.date, publi.mess, publi, publi.profil, publi.color, publi.name, publi.search

FROM publi
INNER JOIN (
    SELECT id_post_normal, COUNT(id_post_normal)
    FROM quote_plus_normal_gr_publi
    ORDER BY id_post_normal
) q 
ON q.id_post_normal = publi.id_post_normal
WHERE publi.id_personnes = 1
ORDER BY date DESC

in first select there are just publi and don't have column to call

select publi.date, publi.mess, publi, publi.profil

so i try query and make similar to you and i don't have any error to show.

first why the error show up group by? do you try another query? not this query?

Sign up to request clarification or add additional context in comments.

1 Comment

It's that tank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.