关于spring boot的sql语句的写法

第一个是: select * from user where id = #{id}
第二个是: select t1.*, t2.sname from user as t1 join simple as t2 on t1.id = t2.id;

如何把这两个语句连在一起?

什么叫连在一起?子查询吗?

select t1.*, t2.sname from ( select * from user where id = #{id}) as t1 join simple as t2 on t1.id = t2.id;