select
p.firstName ,p.lastName ,a.city,a.state
from
Person p left join Address a on p.PersonId=a.PersonId
select
distinct a.author_id as id
from
Views as v
where
v.author_id=viewer_id #自己浏览自己
order by
a.author_id
select
v.customer_id, count(*) count_no_trans
from
Visits as v left join Transactions t on v.visit_id=t.visit_id
where
t.transaction_id is null
GROUP BY
v.customer_id