赞
踩
SELECT firstname,lastname,IFNULL(city,null) city,IFNULL(state,null) state
FROM Person p
LEFT JOIN Address a
ON p.personid=a.personid;
SELECT v.customer_id customer_id,count(*) count_no_trans
FROM Visits v
LEFT JOIN Transactions t
ON v.visit_id=t.visit_id
WHERE t.transaction_id is null
GROUP BY v.customer_id
ORDER BY count_no_trans desc;
SELECT distinct author_id id
FROM Views
WHERE author_id=viewer_id
ORDER BY id asc;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。