What does mysql statement mean? What is the use of SELECTtid, MAX (a. ctime) ASa_timemax? A. What does ctime mean? Does FROMtcASaa represent the currently queried table? Does LEFTJOINtutorASbONa. tidb. idb represent the tc table? What does this sentence mean? What does WHEREa. ctime mysql statement mean?
SELECT tid, MAX (a. ctime) AS a_time // What is the use of max? A. What does ctime mean?
FROM tc AS a // a indicates the currently queried table?
Left join tutor AS B ON a. tid = B. id // B indicates the tc table? What does this sentence mean?
WHERE a. ctime> 1340590489
AND time <> 0
Group by tid
Order by a_time DESC
LIMIT 20
------ Solution --------------------
A indicates the tc table, B indicates the tutor table, and max indicates the maximum value in the ctime obtained from the tc table.
------ Solution --------------------
The entire statement is left join query.
FROM tc AS a // a indicates the currently queried table?
A is the alias of tc.
// What is the use of max? A. What does ctime mean?
Max is a mysql function.
A. ctime is the ctime field of a (tc table ).
Left join tutor AS B ON a. tid = B. id // B indicates the tc table? What does this sentence mean?
B is the alias of the tutor table. on is followed by the connection condition.
This is the foundation of mysql. I suggest you go to the manual.