![]() ![]() If you want rows from A that have NO joined data in B, then you would need an outer join, otherwise you should use an INNER JOIN for efficiency. ![]() , ROW_NUMBER() OVER (PARTITION BY bb.useridīy the way, there isn't any specific reason given for using a LEFT JOIN. You need to get the MAX(TrialTime) then join back to the same table to get the appropriate rows.įor comparison, if row_number() was available, this is how it might be done: SELECT So you need to do something like this: SELECTīasically it isn't possible to get the MAX() of some columns, and all the other column values "from that row", at the same time. In many rdbms one can use ROW_NUMBER() to solve this problem, but as yet MySQL does not supply that useful function.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |