MySQL Forums
Forum List  »  Portuguese

Re: Consulta Mysql
Posted by: Marcelo Altmann
Date: August 05, 2014 10:18AM

Olá Wilson

1 - SELECT tb_artigo.*, COUNT(*) AS comentarios FROM tb_comentario JOIN tb_artigo USING (id_artigo) GROUP BY id_artigo ORDER BY COUNT(*) DESC;

2 - SELECT * FROM tb_artigo JOIN tb_pontos_user USING (id_user) ORDER BY pontos DESC;

Options: ReplyQuote


Subject
Views
Written By
Posted
2644
July 10, 2014 03:00PM
Re: Consulta Mysql
1881
August 05, 2014 10:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.