67,739
社区成员
发帖
与我相关
我的任务
分享
# Write your MySQL query statement below
select firstName,lastName,city,state
from Person
left join Address
on Address.personId=Person.personId;
比较简单的多表查询,需要注意的是这里select后的查询信息都是直接写出来的,因为在两个表中并没有同名的列,如果有同名的列需要在前面加上 ' 列名. '
# Write your MySQL query statement below
select
customer_id,count(customer_id) count_no_trans
from
visits v
left join
transactions t
on v.visit_id=t.visit_id
where amount is null
group by customer_id;
# Write your MySQL query statement below
SELECT DISTINCT author_id AS id
FROM Views
WHERE author_id = viewer_id
ORDER BY author_id
目录