我有问题,希望有人可以帮助我。
Theme.AppCompat.Light.
我现在的主要问题是我无法从与MAX对应的visit_log获取col_1和col_2(visit_log)
答案 0 :(得分:-1)
你可以试试这个: -
SELECT C.NAME, S.NAME, CN.ID, NV.Next_visit_1, VL.visited
FROM COUNTRY C INNER JOIN next_visit NV ON C.ID = NV.Country
INNER JOIN STATE S ON NV.State = S.ID
JOIN CITY
INNER JOIN visitor_log VL ON CONCAT(NV.country, NV.state, NV.city) = CONCAT(VL.country, VL.state, VL.city)