i know there is heaps of this same question but im having trouble making it work on multiple table joins. i have 3 tables
用户
user_id | firstname | lastname
分数
subnumber | fkuserid
交易
transid | fksubnumber | expires | transdate
一、导 言
SELECT *
FROM (SELECT *
FROM sub交易s
WHERE Expires < now()
ORDER BY NewSubTrans DESC) AS s
GROUP BY FKSubNum
What i am trying to do is select all users with a subscription that is expired. to determine if a user is expired i pull the last 交易 from the 交易 table with thier sub number, the fk fields are the links to the other tables.