SQL question!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey.

 

I have these tables.

 

Users ( id,name,etc )

Coments : ( id , comment )

 

 

How do I do this kind of query:

I thought in one thing like this but I cant figure it out.

Example: Select * from users order by id desc in (select count (id) from
comments)

 

 

Expected result:

 

List of users:

 

* User1

  See comments ( 32 comment in database )

 

* User2

  See coments (13 comments in database )

 

*	etc.

 

 

thanks in advanced.

Bruno


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux