0

How can i fix the code for mysql maybe it wrong at m > 10

SELECT
    q_mem_tim.Hno,
    q_mem_tim.Moo,
    q_mem_tim.tambol,
    count(*) as m
FROM
    q_mem_tim
WHERE
    m > 10
GROUP BY
    q_mem_tim.Hno,
    q_mem_tim.Moo,
    q_mem_tim.tambol
order by m desc
1
  • What's the table structure? I don't really get what you're trying to do here... Commented May 26, 2011 at 2:59

1 Answer 1

3

Try

SELECT
    q_mem_tim.Hno,
    q_mem_tim.Moo,
    q_mem_tim.tambol, count(*) as m
FROM
    q_mem_tim
GROUP BY
    q_mem_tim.Hno,
    q_mem_tim.Moo,
    q_mem_tim.tambol
HAVING
    count(*) > 10
order by m desc
Sign up to request clarification or add additional context in comments.

Comments

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.