mysql用另一个select count选择count

jan*_*del 3 php mysql database select

我怎样才能在mysql中结合这两个查询?

 select count(*) as entry_count from tbl_entries where user_id = x
Run Code Online (Sandbox Code Playgroud)

select username, avatar from tbl_users where user_id = x
Run Code Online (Sandbox Code Playgroud)

我想要一个结合这2个查询的结果的结果.请帮帮我们!

谢谢!

jue*_*n d 6

select username, 
       avatar,
       (select count(*) from tbl_entries where user_id = x) as entry_count
from tbl_users 
where user_id = x
Run Code Online (Sandbox Code Playgroud)