SELECT
u.uid AS 用戶帳號,
u.chineseName AS 用戶,
p.category AS 行業編號,
p.productName AS 採購商品名稱,
p.bidSum AS 被報價次數,
p.contactTel AS 聯繫方式,
FROM_UNIXTIME(
acc.registerTime / 1000,
'%Y-%m-%d'
) AS 註冊時間,
FROM_UNIXTIME(
acc.lastActive / 1000,
'%Y-%m-%d'
) AS 最後登陸時間
FROM
9tong.purchase_common p,
9tong_user.user_info u,
9tong_user.user_account acc
WHERE
p.uid = u.uid
AND u.uid = acc.uid
AND u.sex = 0
AND p.createTime >= UNIX_TIMESTAMP('2016-02-09') * 1000
AND p.createTime <= UNIX_TIMESTAMP('2016-05-09') * 1000
AND acc.lastActive - acc.registerTime > 7 * 24 * 60 * 60 * 60ui